Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.content.manager
Interface ObjectClassOps

All Superinterfaces
  Serializable

Deprecated As of 9.x, replaced by `ITypeManager`

    public interface ObjectClassOps

extends Serializable

This interface represents a service for ObjectClass CRUD operations. It is used to manage ObjectClasses as well as their PropertyDefinitions and PropertyChoices. Each ObjectClass may contain 0 to many PropertyDefinitions and each PropertyDefinition may contain 0 to many PropertyChoices.

Each repository has specific validation rules that the manager will delegate to. If a repository considers an attempted operation invalid, it will throw a RepositoryException. The rules for the manager are defined below.

All ObjectClasses, PropertyDefinitions and PropertyChoices are uniquely identified through their ID. The ID must contain both the repositoryName and the uid, unless the operation is a create then the uid should be null.

This interface does not support inheritance, or nested ObjectClasses. If the underlying repository does, then all super PropertyDefinitions will be retrieved with the specified ObjectClass.

Each operation may only occur against one repository at a time. Therefore, all IDs in a single operation must all have the same repository name.

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

Method Summary
`ObjectClass` | `createObjectClass(ObjectClass objectClass)` Deprecated As of 9.x, replaced by `ITypeManager.addType(com.bea.content.ContentContext, com.bea.content.ObjectClass)`
`PropertyDefinition` | `createPropertyDefinition(ID objectClassId, PropertyDefinition propertyDefinition)` Deprecated As of 9.x, replaced by `ObjectClass.addPropertyDefinition(com.bea.content.PropertyDefinition)` followed by `ITypeManager.save(com.bea.content.ContentContext, com.bea.content.ObjectClass)`
`void` | `deleteObjectClass(ID objectClassId)` Deprecated As of 9.x, replaced by `ITypeManager.remove(com.bea.content.ContentContext, com.bea.content.ID)`
`void` | `deletePropertyDefinition(ID propertyDefinitionId)` Deprecated As of 9.x, replaced by `ObjectClass.removePropertyDefinition(String)` followed by `ITypeManager.save(com.bea.content.ContentContext, com.bea.content.ObjectClass)`
`ObjectClass` | `getObjectClass(ID objectClassId)` Deprecated As of 9.x, replaced by `ITypeManager.getType(com.bea.content.ContentContext, com.bea.content.ID)`
`ObjectClass[]` | `getObjectClasses()` Deprecated As of 9.x, replaced by `ITypeManager.getViewableTypes(com.bea.content.ContentContext, String)`
`ObjectClass[]` | `getObjectClasses(String repositoryName)` Deprecated As of 9.x, replaced by `ITypeManager.getViewableTypes(com.bea.content.ContentContext, String)`
`InputStream` | `getPropertyChoiceBytes(ID propertyChoiceId)` Deprecated As of 9.x, replaced by `ITypeManager.getStream(com.bea.content.ContentContext, com.bea.content.ID, com.bea.content.ID)`
`PropertyDefinition` | `getPropertyDefinition(ID propertyDefinitionId)` Deprecated As of 9.x, replaced by `ITypeManager.getType(com.bea.content.ContentContext, com.bea.content.ID)` followed by `ObjectClass.getPropertyDefinition(String)`
`PropertyDefinition[]` | `getPropertyDefinitions(ID objectClassId)` Deprecated As of 9.x, replaced by `ITypeManager.getType(com.bea.content.ContentContext, com.bea.content.ID)` followed by `ObjectClass.getPropertyDefinitions()`
`ObjectClass` | `renameObjectClass(ID objectClassId, String newName)` Deprecated As of 9.x, replaced by `ObjectClass.setName(String)` followed by `ITypeManager.save(com.bea.content.ContentContext, com.bea.content.ObjectClass)`
`PropertyDefinition` | `updatePropertyDefinition(PropertyDefinition propertyDefinition)` Deprecated As of 9.x, replaced by `ITypeManager.save(com.bea.content.ContentContext, com.bea.content.ObjectClass)`

Method Detail

### createObjectClass

    ObjectClass createObjectClass(ObjectClass objectClass)
                                  throws AuthenticationException,
                                         AuthorizationException,
                                         ObjectClassExistsException,
                                         RepositoryException

  Deprecated As of 9.x, replaced by `ITypeManager.addType(com.bea.content.ContentContext, com.bea.content.ObjectClass)`

  Creates the given ObjectClass and its PropertyDefinitions and PropertyChoices if applicable.

  Parameters
    `objectClass` - - the ObjectClass to create, along with any PropertyDefinitions to create also. The ObjectClass ID must contain the repositoryName.
  Returns
    ObjectClass - the new ObjectClass.
  Throws
    `AuthenticationException` - - if the user attempting the operation isn't authenticated against the repository.
    `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.

### renameObjectClass

    ObjectClass renameObjectClass(ID objectClassId,
                                  String newName)
                                  throws ObjectClassExistsException,
                                         NoSuchObjectClassException,
                                         RepositoryException

  Deprecated As of 9.x, replaced by `ObjectClass.setName(String)` followed by `ITypeManager.save(com.bea.content.ContentContext, com.bea.content.ObjectClass)`

  Renames the given ObjectClass.

  Parameters
    `objectClassId` - - the ID of the objectClass to rename. The ID must contain the repositoryName and the uid.
    `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.

### getObjectClass

    ObjectClass getObjectClass(ID objectClassId)
                               throws AuthenticationException,
                                      AuthorizationException,
                                      NoSuchObjectClassException

  Deprecated As of 9.x, replaced by `ITypeManager.getType(com.bea.content.ContentContext, com.bea.content.ID)`

  Gets the ObjectClass with the given objectClassId.

  Parameters
    `objectClassId` - - the ID of the ObjectClass to get. The ID must contain the repositoryName and the uid.
  Returns
    ObjectClass - the ObjectClass with the given id.
  Throws
    `AuthenticationException` - - if the user attempting the operation isn't authenticated against the repository.
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchObjectClassException` - - if the ObjectClass to get does not exist.

### deleteObjectClass

    void deleteObjectClass(ID objectClassId)
                           throws AuthenticationException,
                                  AuthorizationException,
                                  NoSuchObjectClassException,
                                  ObjectClassInUseException,
                                  RepositoryException

  Deprecated As of 9.x, replaced by `ITypeManager.remove(com.bea.content.ContentContext, com.bea.content.ID)`

  Deletes the ObjectClass with the given objectClassId. All of the ObjectClass PropertyDefinitions, and their PropertyChocies are also deleted if present.

  If the ObjectClass to delete has Nodes associated with it, either in the Repository or Virtual Repository it can't be removed.

  Parameters
    `objectClassId` - - the ID of the ObjectClass to delete. The ID must contain the repositoryName and the uid.
  Throws
    `AuthenticationException` - - if the user attempting the operation isn't authenticated against the repository.
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchObjectClassException` - - if the ObjectClass to delete does not exist.
    `ObjectClassInUseException` - if the type is in use.
    `RepositoryException` - - if a validation error occurred.

### getObjectClasses

    ObjectClass[] getObjectClasses()
                                   throws AuthenticationException,
                                          AuthorizationException,
                                          RepositoryException

  Deprecated As of 9.x, replaced by `ITypeManager.getViewableTypes(com.bea.content.ContentContext, String)`

  Gets all of the ObjectClasses available for all content repositories the user is currently authenticated for.

  Returns
    ObjectClass[] - an array of all ObjectClasses - an empty array if none are currently defined.
  Throws
    `AuthenticationException` - - if the user attempting the operation isn't authenticated against the repository.
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `RepositoryException` - - if a validation error occurred.

### getObjectClasses

    ObjectClass[] getObjectClasses(String repositoryName)
                                   throws AuthenticationException,
                                          AuthorizationException

  Deprecated As of 9.x, replaced by `ITypeManager.getViewableTypes(com.bea.content.ContentContext, String)`

  Gets all of the ObjectClasses available for a specific repository.

  Returns
    ObjectClass[] - an array of all ObjectClasses, an empty array if none are currently defined.
  Throws
    `AuthenticationException` - - if the user attempting the operation isn't authenticated against the repository.
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.

### getPropertyDefinitions

    PropertyDefinition[] getPropertyDefinitions(ID objectClassId)
                                                throws AuthenticationException,
                                                       AuthorizationException,
                                                       NoSuchObjectClassException

  Deprecated As of 9.x, replaced by `ITypeManager.getType(com.bea.content.ContentContext, com.bea.content.ID)` followed by `ObjectClass.getPropertyDefinitions()`

  Gets all PropertyDefinitions for the given ObjectClass.

  Parameters
    `objectClassId` - - the ID for the ObjectClass to get its PropertyDefinitions. The ID must contain the repositoryName and the uid.
  Returns
    PropertyDefinition[] - the array of PropertyDefinitions for the given ObjectClass - of an empty array if none are currently defined.
  Throws
    `AuthenticationException` - - if the user attempting the operation isn't authenticated against the repository.
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchObjectClassException` - - if the ObjectClass does not exist.

### getPropertyDefinition

    PropertyDefinition getPropertyDefinition(ID propertyDefinitionId)
                                             throws AuthenticationException,
                                                    AuthorizationException,
                                                    NoSuchPropertyDefinitionException

  Deprecated As of 9.x, replaced by `ITypeManager.getType(com.bea.content.ContentContext, com.bea.content.ID)` followed by `ObjectClass.getPropertyDefinition(String)`

  Gets the PropertyDefinition for the given id.

  Parameters
    `propertyDefinitionId` - - the ID the PropertyDefinition to get. Must contain the repositoryName and the uid.
  Returns
    PropertyDefinition - the PropertyDefinition whose id matches propertyDefinitionId.
  Throws
    `AuthenticationException` - - if the user attempting the operation isn't authenticated against the repository.
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchPropertyDefinitionException` - - if the PropertyDefinition does not exist.

### createPropertyDefinition

    PropertyDefinition createPropertyDefinition(ID objectClassId,
                                                PropertyDefinition propertyDefinition)
                                                throws AuthenticationException,
                                                       AuthorizationException,
                                                       NoSuchObjectClassException,
                                                       ObjectClassInUseException,
                                                       RepositoryException

  Deprecated As of 9.x, replaced by `ObjectClass.addPropertyDefinition(com.bea.content.PropertyDefinition)` followed by `ITypeManager.save(com.bea.content.ContentContext, com.bea.content.ObjectClass)`

  Adds the given propertyDefinition to the ObjectClass with the given 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. The ID must contain the repositoryName and the uid.
    `propertyDefinition` - - the propertyDefinition to create and add to the ObjectClass. The ID must contain the repositoryName and the uid. There can only be one primary PropertyDefinition that defines the primary content Property for a Node.
  Returns
    PropertyDefinition - the PropertyDefinition that was added to the ObjectClass.
  Throws
    `AuthenticationException` - - if the user attempting the operation isn't authenticated against the repository.
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchObjectClassException` - - if the objectClass does not exist.
    `ObjectClassInUseException` - if the type is in use and the update to be performed is illegal.
    `RepositoryException` - - if a validation error occurs.

### updatePropertyDefinition

    PropertyDefinition updatePropertyDefinition(PropertyDefinition propertyDefinition)
                                                throws AuthenticationException,
                                                       AuthorizationException,
                                                       NoSuchPropertyException,
                                                       ObjectClassInUseException,
                                                       RepositoryException

  Deprecated As of 9.x, replaced by `ITypeManager.save(com.bea.content.ContentContext, com.bea.content.ObjectClass)`

  Updates the given propertyDefinition.

  The PropertyDefinition IDs and all of its PropertyChoices Ids should remain intact when updated. If PropertyChoices are no longer present on the PropertyDefinition, they should be deleted. 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. The PropertyDefinition ID must contain the repositoryName and the uid. There can only be one primary PropertyDefinition that defines the primary content Property for a Node.
  Returns
    PropertyDefinition - the updated PropertyDefinition.
  Throws
    `AuthenticationException` - - if the user attempting the operation isn't authenticated against the repository.
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchPropertyDefinitionException` - - if the PropertyDefinition does not exist.
    `ObjectClassInUseException` - if the type is in use and the update to be performed is illegal.
    `RepositoryException` - - if a validation error occurs.
    `NoSuchPropertyException`

### deletePropertyDefinition

    void deletePropertyDefinition(ID propertyDefinitionId)
                                  throws AuthenticationException,
                                         AuthorizationException,
                                         NoSuchPropertyException,
                                         ObjectClassInUseException,
                                         RepositoryException

  Deprecated As of 9.x, replaced by `ObjectClass.removePropertyDefinition(String)` followed by `ITypeManager.save(com.bea.content.ContentContext, com.bea.content.ObjectClass)`

  Deletes the given propertyDefinition. If the PropertyDefinition to delete has Nodes associated with it's ObjectClass, either in the Repository or Virtual Repository it can't be removed.

  Parameters
    `propertyDefinitionId` - - the ID of the propertyDefinition to delete. The PropertyDefinition ID must contain the repositoryName and the uid.
  Throws
    `AuthenticationException` - - if the user attempting the operation isn't authenticated against the repository.
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchPropertyDefinitionException` - - if the PropertyDefinition does not exist.
    `ObjectClassInUseException` - if the type is in use and the update to be performed is illegal.
    `RepositoryException` - - if a validation error occurs.
    `NoSuchPropertyException`

### getPropertyChoiceBytes

    InputStream getPropertyChoiceBytes(ID propertyChoiceId)
                                       throws AuthenticationException,
                                              AuthorizationException,
                                              NoSuchPropertyChoiceException

  Deprecated As of 9.x, replaced by `ITypeManager.getStream(com.bea.content.ContentContext, com.bea.content.ID, com.bea.content.ID)`

  Gets the bytes for the given PropertyChoice.

  WARNING: If using this interface to retrieve binary content from a BEA Repository, please read the javadoc for `RepositoryConfig`.

  After calling this method and retrieving the InputStream, you must close the InputStream when finished reading it.

  Parameters
    `propertyChoiceId` - - the ID of the propertyChoice to get the BinaryValue for. Must contain the repositoryName and the uid.
  Returns
    InputStream - the binary data for the Binary PropertyChoice.
  Throws
    `AuthenticationException` - - if the user attempting the operation isn't authenticated against the repository.
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `NoSuchPropertyChoiceException` - - if the PropertyChoice does not exist.

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

Copyright © 2008 BEA Systems, Inc. All Rights Reserved