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.
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.
ObjectClassOpsImpl
Serializable
Method Summary |
public |
|
public |
|
public void |
|
public void |
|
public |
|
public |
|
public |
|
public |
|
public |
|
public |
|
public |
|
Method Detail |
publicCreates the given ObjectClass. If the ObjectClass contains any PropertyDefinitions then they are created also.ObjectClass
createObjectClass(ObjectClass
objectClass)
throwsAuthorizationException
,ObjectClassExistsException
,RepositoryException
AuthorizationException
ObjectClassExistsException
RepositoryException
publicAdds 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.PropertyDefinition
createPropertyDefinition(ID
objectClassId,PropertyDefinition
propertyDefinition)
throwsAuthorizationException
,NoSuchObjectClassException
,RepositoryException
AuthorizationException
NoSuchObjectClassException
RepositoryException
public void deleteObjectClass(Deletes the ObjectClass with the given objectClassId. All of the ObjectClass PropertyDefinitions, their PropertyChocies are also deleted if present.ID
objectClassId)
throwsAuthorizationException
,NoSuchObjectClassException
,RepositoryException
AuthorizationException
NoSuchObjectClassException
RepositoryException
public void deletePropertyDefinition(Deletes the given propertyDefinition.ID
propertyDefinitionId)
throwsAuthorizationException
,NoSuchPropertyException
,RepositoryException
AuthorizationException
NoSuchPropertyException
RepositoryException
publicGets the ObjectClass with the given objectClassId.ObjectClass
getObjectClass(ID
objectClassId)
throwsAuthorizationException
,NoSuchObjectClassException
AuthorizationException
NoSuchObjectClassException
publicGets all of the ObjectClasses available in the content repository.ObjectClass
[] getObjectClasses()
throwsAuthorizationException
AuthorizationException
publicGets the bytes for the given PropertyChoice.InputStream
getPropertyChoiceBytes(ID
propertyChoiceId)
throwsAuthorizationException
,NoSuchPropertyChoiceException
AuthorizationException
NoSuchPropertyChoiceException
publicGets the PropertyDefinition for the given id.PropertyDefinition
getPropertyDefinition(ID
propertyDefinitionId)
throwsAuthorizationException
,NoSuchPropertyDefinitionException
AuthorizationException
NoSuchPropertyDefinitionException
publicGets all PropertyDefinitions for the given ObjectClass.PropertyDefinition
[] getPropertyDefinitions(ID
objectClassId)
throwsAuthorizationException
,NoSuchObjectClassException
AuthorizationException
NoSuchObjectClassException
publicRenames the given ObjectClass.ObjectClass
renameObjectClass(ID
objectClassId,String
newName)
throwsObjectClassExistsException
,NoSuchObjectClassException
,RepositoryException
ObjectClassExistsException
NoSuchObjectClassException
RepositoryException
publicUpdates the given propertyDefinition.PropertyDefinition
updatePropertyDefinition(PropertyDefinition
propertyDefinition)
throwsAuthorizationException
,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.
AuthorizationException
NoSuchPropertyException
RepositoryException