|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ObjectClassOpsV1
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 |
---|
ObjectClass getObjectClassWithName(String name) throws RepositoryException
name
- - the name of the ObjectClass to retrieve.
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.ObjectClass[] getObjectClassesWithQueryCriteria(QueryCriteria queryCriteria) throws RepositoryException
queryCriteria
- - The query criteria for this operation
AuthorizationException
- - if the user attempting the
operation is not authorized to perform it.
RepositoryException
ObjectClass getObjectClassWithId(ID objectClassId) throws RepositoryException
objectClassId
- - the ID of the ObjectClass to retrieve. The ID must contain the repositoryName and UID.
AuthorizationException
- - if the user attempting the operation is not authorized to perform it.
NoSuchObjectClassException
- - if the ObjectClass to retrieve does not exist.
RepositoryException
QueryResult<ObjectClass> getChildObjectClasses(ID objectClassId, QueryCriteria queryCriteria) throws RepositoryException
objectClassId
- The ID of the type, or an ID with no uid to retrieve top-level typesqueryCriteria
- The query criteria for this operation
QueryResult
of types which extend the given type. Ordered by path. Empty if
there are no child ObjectClasses.
NoSuchObjectClassException
- If the given type doesn't exist.
RepositoryException
- If the operation fails.ObjectClass[] getAllObjectClasses() throws RepositoryException
AuthorizationException
- - if the user attempting the operation is not authorized to perform it.
RepositoryException
ObjectClass createObjectClass(ObjectClass objectClass) throws RepositoryException
objectClass
- - the ObjectClass to create, along with any PropertyDefinitions and PropertyChoices
to create.
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.ObjectClass save(ObjectClass objectClass) throws RepositoryException
objectClass
- The object class to update.
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.ObjectClass renameObjectClass(ID objectClassId, String newName) throws 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.void deleteObjectClass(ID objectClassId) throws 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.PropertyDefinition getPropertyDefinition(ID propertyDefinitionId) throws RepositoryException
propertyDefinitionId
- - the ID the PropertyDefinition to retrieve.
AuthorizationException
- - if the user attempting the
operation is not authorized to perform it.
NoSuchPropertyDefinitionException
- - if the PropertyDefinition does not exist.
RepositoryException
PropertyDefinition[] getPropertyDefinitions(ID objectClassId) throws RepositoryException
objectClassId
- - the ID for the ObjectClass to retrieve its PropertyDefinitions.
AuthorizationException
- - if the user attempting the operation is not authorized to perform it.
NoSuchObjectClassException
- - if the ObjectClass does not exist.
RepositoryException
PropertyDefinition createPropertyDefinition(ID objectClassId, PropertyDefinition propertyDefinition) throws 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.PropertyDefinition updatePropertyDefinition(PropertyDefinition propertyDefinition) throws RepositoryException
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.
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.void deletePropertyDefinition(ID propertyDefinitionId) throws RepositoryException
propertyDefinitionId
- - the ID of the propertyDefinition to remove.
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.InputStream getPropertyChoiceBytes(ID propertyChoiceId) throws RepositoryException
propertyChoiceId
- - the ID of the propertyChoice to retrieve the BinaryValue for.
AuthorizationException
- - if the user attempting the operation is not authorized to perform it.
NoSuchPropertyChoiceException
- - if the PropertyChoice does not exist.
RepositoryException
Set<String> getNativeSortableProperties(String repositoryName) throws RepositoryException
repositoryName
- The name of the repository.
RepositoryException
- If the operation does not succeed.Set<String> getNativeFilterableProperties(String repositoryName) throws RepositoryException
repositoryName
- The name of the repository.
RepositoryException
- If the operation does not succeed.
|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |