|
© 2004 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
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.
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.
The repository implementation may have more specific validation rules than that defined above. If a repository considers an attempted operation invalid, it will throw a RepositoryException.
For additional rules see com.bea.content.PropertyDefinition.
Method Summary | |
ObjectClass |
createObjectClass(ObjectClass objectClass)
Creates the given ObjectClass. |
PropertyDefinition |
createPropertyDefinition(ID objectClassId,
PropertyDefinition propertyDefinition)
Adds the given propertyDefinition to the ObjectClass with the given objectClassId. |
void |
deleteObjectClass(ID objectClassId)
Deletes the ObjectClass with the given objectClassId. |
void |
deletePropertyDefinition(ID propertyDefinitionId)
Deletes the given propertyDefinition. |
ObjectClass |
getObjectClass(ID objectClassId)
Gets the ObjectClass with the given objectClassId. |
ObjectClass[] |
getObjectClasses()
Gets all of the ObjectClasses available in the content repository. |
InputStream |
getPropertyChoiceBytes(ID propertyChoiceId)
Gets the bytes for the given PropertyChoice. |
PropertyDefinition |
getPropertyDefinition(ID propertyDefinitionId)
Gets the PropertyDefinition for the given id. |
PropertyDefinition[] |
getPropertyDefinitions(ID objectClassId)
Gets all PropertyDefinitions for the given ObjectClass. |
ObjectClass |
renameObjectClass(ID objectClassId,
String newName)
Renames the given ObjectClass. |
PropertyDefinition |
updatePropertyDefinition(PropertyDefinition propertyDefinition)
Updates the given propertyDefinition. |
Method Detail |
public ObjectClass createObjectClass(ObjectClass objectClass) throws AuthorizationException, ObjectClassExistsException, RepositoryException
objectClass
- - the ObjectClass to create, along with any PropertyDefinitions
to create also.
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.public PropertyDefinition createPropertyDefinition(ID objectClassId, PropertyDefinition propertyDefinition) throws AuthorizationException, NoSuchObjectClassException, RepositoryException
objectClassId
- - the id of the ObjectClass to add the PropertyDefinition to.propertyDefinition
- - the propertyDefinition to create and add to the ObjectClass.
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.public void deleteObjectClass(ID objectClassId) throws AuthorizationException, NoSuchObjectClassException, RepositoryException
objectClassId
- - the ID of the ObjectClass to delete.
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.public void deletePropertyDefinition(ID propertyDefinitionId) throws AuthorizationException, NoSuchPropertyException, RepositoryException
propertyDefinitionId
- - the ID of the propertyDefinition to delete.
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.
NoSuchPropertyException
public ObjectClass getObjectClass(ID objectClassId) throws AuthorizationException, NoSuchObjectClassException
objectClassId
- - the ID of the ObjectClass to get. The ID
must contain the repositoryName.
AuthorizationException
- - if the user attempting the
operation is not authorized to perform it.
NoSuchObjectClassException
- - if the ObjectClass to get does not exist.public ObjectClass[] getObjectClasses() throws AuthorizationException
AuthorizationException
- - if the user attempting the
operation is not authorized to perform it.public InputStream getPropertyChoiceBytes(ID propertyChoiceId) throws AuthorizationException, NoSuchPropertyChoiceException
propertyChoiceId
- - the ID of the propertyChoice to get the BinaryValue for.
AuthorizationException
- - if the user attempting the
operation is not authorized to perform it.
NoSuchPropertyChoiceException
- - if the PropertyChoice does not exist.public PropertyDefinition getPropertyDefinition(ID propertyDefinitionId) throws AuthorizationException, NoSuchPropertyDefinitionException
propertyDefinitionId
- - the ID the PropertyDefinition to get.
AuthorizationException
- - if the user attempting the
operation is not authorized to perform it.
NoSuchPropertyDefinitionException
- - if the PropertyDefinition does not exist.public PropertyDefinition[] getPropertyDefinitions(ID objectClassId) throws AuthorizationException, NoSuchObjectClassException
objectClassId
- - the ID for the ObjectClass to get its PropertyDefinitions.
AuthorizationException
- - if the user attempting the
operation is not authorized to perform it.
NoSuchObjectClassException
- - if the ObjectClass does not exist.public ObjectClass renameObjectClass(ID objectClassId, String newName) throws ObjectClassExistsException, NoSuchObjectClassException, RepositoryException
objectClassId
- - the ID of the objectClass to rename.newName
- - the new name of the ObjectClass.
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.public PropertyDefinition updatePropertyDefinition(PropertyDefinition propertyDefinition) throws AuthorizationException, NoSuchPropertyException, RepositoryException
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.
propertyDefinition
- - the propertyDefinition to update.
There can only be one primary PropertyDefinition that defines the primary content
Property for a Node.
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.
NoSuchPropertyException
|
© 2004 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |