Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.content.spi.flexspi.ticket
Interface ObjectClassOpsV1

All Superinterfaces
  ISPIMarker, ISPITicketMarker, Serializable

    public interface ObjectClassOpsV1

extends Serializable, ISPITicketMarker

ObjectClassOps is a Ticket interface for Node Type (ObjectClass) CRUD operations.

It is used to manage ObjectClasses as well as their PropertyDefinitions and PropertyChoices. Each ObjectClass may contain 0 or more PropertyDefinitions and each PropertyDefinition may contain 0 or more PropertyChoices.

All ObjectClasses, PropertyDefinitions and PropertyChoices are uniquely identified through their ID. The ID must contain the uid, unless the operation is a create then the uid should be null, since it has not yet been created.

The repository implementation may have more specific validation rules than that defined above. If a repository considers an attempted operation invalid, it must throw a RepositoryException.

For additional rules see com.bea.content.PropertyDefinition.

Nested Class Summary
`static class` | `ObjectClassOpsV1.MethodName`

Method Summary
`ObjectClass` | `createObjectClass(ObjectClass objectClass)` Creates the given ObjectClass.
`PropertyDefinition` | `createPropertyDefinition(ID objectClassId, PropertyDefinition propertyDefinition)` Adds the specified propertyDefinition to the ObjectClass with the specified objectClassId.
`void` | `deleteObjectClass(ID objectClassId)` Removes the ObjectClass with the specified objectClassId.
`void` | `deletePropertyDefinition(ID propertyDefinitionId)` Removes the propertyDefinition with the specified ID.
`ObjectClass[]` | `getAllObjectClasses()` Retrieve all of the ObjectClasses available in the content repository.
`QueryResult<ObjectClass>` | `getChildObjectClasses(ID objectClassId, QueryCriteria queryCriteria)` Retreives the first level of types which extend the given type in some way (the immediate descendents).
`Set<String>` | `getNativeFilterableProperties(String repositoryName)` Returns a set of property names which the repository can filter natively (within the repository instead of the federated API) for paging purposes.
`Set<String>` | `getNativeSortableProperties(String repositoryName)` Returns a set of property names which the repository can sort natively (within the repository instead of the federated API) for paging purposes.
`ObjectClass[]` | `getObjectClassesWithQueryCriteria(QueryCriteria queryCriteria)` Retrieve all of the ObjectClasses available in the content repository which meet the specified query criteria.
`ObjectClass` | `getObjectClassWithId(ID objectClassId)` Retrieve an ObjectClass with the specified objectClassId.
`ObjectClass` | `getObjectClassWithName(String name)` Retrieve the ObjectClass with the specified name.
`InputStream` | `getPropertyChoiceBytes(ID propertyChoiceId)` Retrieves the binary PropertyChoice value for the specified binary PropertyChoice.
`PropertyDefinition` | `getPropertyDefinition(ID propertyDefinitionId)` Retrieves a single PropertyDefinition with a specified ID.
`PropertyDefinition[]` | `getPropertyDefinitions(ID objectClassId)` Retrieves all PropertyDefinitions for the specified ObjectClass ID.
`ObjectClass` | `renameObjectClass(ID objectClassId, String newName)` Renames the ObjectClass with the specified objectClassId.
`ObjectClass` | `save(ObjectClass objectClass)` This method updates an existing object class in a single transaction.
`PropertyDefinition` | `updatePropertyDefinition(PropertyDefinition propertyDefinition)` Updates the specified propertyDefinition.

Method Detail

### getObjectClassWithName

    ObjectClass getObjectClassWithName(String name)
                                       throws RepositoryException

  Retrieve the ObjectClass with the specified name.

  Parameters
    `name` - - the name of the ObjectClass to retrieve.
  Returns
    ObjectClass - the ObjectClass with the specified name.
  Throws
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchObjectClassException` - - if the ObjectClass to get does not exist.
    `RepositoryException` - - if the repository encounters an error during the operation.

### getObjectClassesWithQueryCriteria

    ObjectClass[] getObjectClassesWithQueryCriteria(QueryCriteria queryCriteria)
                                                    throws RepositoryException

  Retrieve all of the ObjectClasses available in the content repository which meet the specified query criteria.

  Parameters
    `queryCriteria` - - The query criteria for this operation
  Returns
    ObjectClass[] - an array of all ObjectClasses, an empty array if none are currently defined.
  Throws
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `RepositoryException`

### getObjectClassWithId

    ObjectClass getObjectClassWithId(ID objectClassId)
                                     throws RepositoryException

  Retrieve an ObjectClass with the specified objectClassId.

  Parameters
    `objectClassId` - - the ID of the ObjectClass to retrieve. The ID must contain the repositoryName and UID.
  Returns
    ObjectClass - the ObjectClass with the specified id.
  Throws
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchObjectClassException` - - if the ObjectClass to retrieve does not exist.
    `RepositoryException`

### getChildObjectClasses

    QueryResult<ObjectClass> getChildObjectClasses(ID objectClassId,
                                                   QueryCriteria queryCriteria)
                                                   throws RepositoryException

  Retreives the first level of types which extend the given type in some way (the immediate descendents).

  If called with an objectClassId with no uid, then this method should return all repository top-level types (types which do not inherit from another type).

  If "Type A" is extended by "Type B" which is in turn extended by "Type C", then when this method is called with the parameter "Type A", the result would be a list containing only "Type B". If called with Type B, the results will be Type C. If called with an ID with no uid, the results will be Type A.

  The results are ordered by the type's path.

  Parameters
    `objectClassId` - The ID of the type, or an ID with no uid to retrieve top-level types
    `queryCriteria` - The query criteria for this operation
  Returns
    An ordered `QueryResult` of types which extend the given type. Ordered by path. Empty if there are no child ObjectClasses.
  Throws
    `NoSuchObjectClassException` - If the given type doesn't exist.
    `RepositoryException` - If the operation fails.

### getAllObjectClasses

    ObjectClass[] getAllObjectClasses()
                                      throws RepositoryException

  Retrieve all of the ObjectClasses available in the content repository.

  Returns
    ObjectClass[] - an array of all ObjectClasses, an empty array if none are currently defined.
  Throws
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `RepositoryException`

### createObjectClass

    ObjectClass createObjectClass(ObjectClass objectClass)
                                  throws RepositoryException

  Creates the given ObjectClass. If the ObjectClass contains any PropertyDefinitions (or PropertyChoices) then they are created also.

  Parameters
    `objectClass` - - the ObjectClass to create, along with any PropertyDefinitions and PropertyChoices to create.
  Returns
    ObjectClass - the new ObjectClass.
  Throws
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `ObjectClassExistsException` - - if the name of the ObjectClass is already in use.
    `RepositoryException` - - if a validation error occurs.

### save

    ObjectClass save(ObjectClass objectClass)
                     throws RepositoryException

  This method updates an existing object class in a single transaction. The changed object class attributes will be updated accordingly, including changed property definitions and property choices. This is a less granular way of performing actions like createPropertyDefinition, renameObjectClass and updatePropertyDefiniton.

  The object class is assumed to be retrieved from this API and therefore properly formed when this call is made. Therefore if this method is called and some property definitions are not specified, those definitions values will be removed.

  The following object class attributes are system managed and cannot be modified via this API: path (modifying the parent will cause the object class path to be updated properly).

  Parameters
    `objectClass` - The object class to update.
  Returns
    The updated objectClass
  Throws
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `ObjectClassInUseException` - if the type is in use and the update to be performed is illegal.
    `RepositoryException` - - if error occurs during the update operation.

### renameObjectClass

    ObjectClass renameObjectClass(ID objectClassId,
                                  String newName)
                                  throws RepositoryException

  Renames the ObjectClass with the specified objectClassId.

  Parameters
    `objectClassId` - - the ID of the objectClass to rename.
    `newName` - - the new name of the ObjectClass.
  Returns
    ObjectClass - the updated ObjectClass.
  Throws
    `ObjectClassExistsException` - - if the name of the ObjectClass is already in use.
    `NoSuchObjectClassException` - - if the objectClass to rename doesn't exist.
    `RepositoryException` - - if a validation error occurs.

### deleteObjectClass

    void deleteObjectClass(ID objectClassId)
                           throws RepositoryException

  Removes the ObjectClass with the specified objectClassId. All of the ObjectClass's contained PropertyDefinitions, and PropertyChocies are also removed.

  Parameters
    `objectClassId` - - the ID of the ObjectClass to delete.
  Throws
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchObjectClassException` - - if the ObjectClass to delete does not exist.
    `RepositoryException` - - if a validation error occurred.

### getPropertyDefinition

    PropertyDefinition getPropertyDefinition(ID propertyDefinitionId)
                                             throws RepositoryException

  Retrieves a single PropertyDefinition with a specified ID.

  Parameters
    `propertyDefinitionId` - - the ID the PropertyDefinition to retrieve.
  Returns
    PropertyDefinition - the PropertyDefinition whose id matches propertyDefinitionId.
  Throws
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchPropertyDefinitionException` - - if the PropertyDefinition does not exist.
    `RepositoryException`

### getPropertyDefinitions

    PropertyDefinition[] getPropertyDefinitions(ID objectClassId)
                                                throws RepositoryException

  Retrieves all PropertyDefinitions for the specified ObjectClass ID.

  Parameters
    `objectClassId` - - the ID for the ObjectClass to retrieve its PropertyDefinitions.
  Returns
    PropertyDefinition[] - the array of PropertyDefinitions for the specified ObjectClass, of an empty array of none are currently defined.
  Throws
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchObjectClassException` - - if the ObjectClass does not exist.
    `RepositoryException`

### createPropertyDefinition

    PropertyDefinition createPropertyDefinition(ID objectClassId,
                                                PropertyDefinition propertyDefinition)
                                                throws RepositoryException

  Adds the specified propertyDefinition to the ObjectClass with the specified objectClassId. If isPrimary is true then this PropertyDefinition will be set to the primary PropertyDefinition for the ObjectClass. If there is already a primary PropertyDefinition, then it will be unset.

  Parameters
    `objectClassId` - - the id of the ObjectClass to add the PropertyDefinition to.
    `propertyDefinition` - - the propertyDefinition to create and add to the ObjectClass.
  Returns
    PropertyDefinition - the PropertyDefinition that was added to the ObjectClass.
  Throws
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchObjectClassException` - - if the objectClass does not exist.
    `RepositoryException` - - if a validation error occurs.

### updatePropertyDefinition

    PropertyDefinition updatePropertyDefinition(PropertyDefinition propertyDefinition)
                                                throws RepositoryException

  Updates the specified propertyDefinition.

  The PropertyDefinition ID and all of its PropertyChoices IDs should remain intact when updated. If PropertyChoices are no longer present on the PropertyDefinition, they should be removed. If new PropertyChoices are present on the PropertyDefinition they should be added.

  If isPrimary is true then this PropertyDefinition will be set to the primary PropertyDefinition for the ObjectClass. If there is already a primary PropertyDefinition, then it will be unset.

  Parameters
    `propertyDefinition` - - the propertyDefinition to update. There can only be one primary PropertyDefinition that defines the primary content Property for a Node.
  Returns
    PropertyDefinition - the updated PropertyDefinition.
  Throws
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchPropertyDefinitionException` - - if the PropertyDefinition does not exist.
    `RepositoryException` - - if a validation error occurs.

### deletePropertyDefinition

    void deletePropertyDefinition(ID propertyDefinitionId)
                                  throws RepositoryException

  Removes the propertyDefinition with the specified ID.

  Parameters
    `propertyDefinitionId` - - the ID of the propertyDefinition to remove.
  Throws
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchPropertyDefinitionException` - - if the PropertyDefinition does not exist.
    `RepositoryException` - - if a validation error occurs.

### getPropertyChoiceBytes

    InputStream getPropertyChoiceBytes(ID propertyChoiceId)
                                       throws RepositoryException

  Retrieves the binary PropertyChoice value for the specified binary PropertyChoice.

  Parameters
    `propertyChoiceId` - - the ID of the propertyChoice to retrieve the BinaryValue for.
  Returns
    InputStream - the binary data for the BinaryChoice.
  Throws
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchPropertyChoiceException` - - if the PropertyChoice does not exist.
    `RepositoryException`

### getNativeSortableProperties

    Set<String> getNativeSortableProperties(String repositoryName)
                                            throws RepositoryException

  Returns a set of property names which the repository can sort natively (within the repository instead of the federated API) for paging purposes.

  Parameters
    `repositoryName` - The name of the repository.
  Returns
    The property names which can be sorted at the repository level.
  Throws
    `RepositoryException` - If the operation does not succeed.

### getNativeFilterableProperties

    Set<String> getNativeFilterableProperties(String repositoryName)
                                              throws RepositoryException

  Returns a set of property names which the repository can filter natively (within the repository instead of the federated API) for paging purposes.

  Parameters
    `repositoryName` - The name of the repository.
  Returns
    The property names which can be filtered at the repository level.
  Throws
    `RepositoryException` - If the operation does not succeed.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.