|
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 | ||||||||
public interface ITypeManager
Interface to manage types (ObjectClasses) in the content system. This interface honors DA/Visitor security policies laid on types.
Methods returning an ISortableFilterablePagedList may perform sorting and filtering. See the documentation
in com.bea.content.paging and ObjectClass.
Note: new methods may be added to this interface periodically -- therefore, this not a good CM extension point. The recommended extension point is at the Service Provider Interface, in package com.bea.content.spi
| Method Summary | |
|---|---|
ObjectClass |
addType(ContentContext context,
ObjectClass type)
Create a type in the specified repository. |
ObjectClass |
addType(ContentContext context,
String repositoryName,
String name)
Create a type in the specified repository. |
ISortableFilterablePagedList<ObjectClass> |
getChildTypes(ContentContext context,
ID typeId)
Returns a list (possibly empty) of types which extend the given type via type inheritance. |
ISortableFilterablePagedList<ObjectClass> |
getInstantiableTypes(ContentContext context,
String repositoryName)
Returns all the types for the given repository for which the user has INSTANTIATION privileges on that type. |
InputStream |
getStream(ContentContext context,
ID typeId,
ID propertyChoiceId)
Return the bytes for the given property choice. |
ObjectClass |
getType(ContentContext context,
ID typeId)
Returns the type with the given ID. |
ObjectClass |
getType(ContentContext context,
String repositoryName,
String typeName)
Returns the type with the given name. |
ISortableFilterablePagedList<ObjectClass> |
getViewableTypes(ContentContext context)
Returns all the types across all repositories for which the user has VIEW privileges on Will ignore any configured repository which does not support the TypeFeatureCapability.TypeRetrieval
capability. |
ISortableFilterablePagedList<ObjectClass> |
getViewableTypes(ContentContext context,
String repositoryName)
Returns all the types for the given repository for which the user has VIEW privileges on Will throw a RepositoryException if the repository specified by the repositoryName does not support the TypeFeatureCapability.TypeCreate capability. |
boolean |
hasCapability(ContentContext context,
String repositoryName,
ObjectClass type,
TypeCapability capability)
Checks to see if the caller has the specified security capability on a type |
void |
remove(ContentContext context,
ID typeId)
Deletes the type with the given ID. |
ObjectClass |
save(ContentContext context,
ObjectClass objectClass)
This method updates an existing object class in a single transaction. |
| Method Detail |
|---|
ObjectClass addType(ContentContext context,
String repositoryName,
String name)
throws AuthenticationException,
AuthorizationException,
ObjectClassExistsException,
RepositoryException
TypeFeatureCapability.TypeCreate capability.
context - - The content context objectrepositoryName - - The name of the repositoryname - - The name of the new type
AuthenticationException - - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException - - if the user does not have CREATE capability on the type
ObjectClassExistsException - - if the name of the type is already in use.
RepositoryException - - for any other exception
ObjectClass addType(ContentContext context,
ObjectClass type)
throws AuthenticationException,
AuthorizationException,
ObjectClassExistsException,
RepositoryException
TypeFeatureCapability.TypeCreate capability.
If attempting to use a property definition which uses multi-value, primary, property choices, readOnly,
mandatory, restricted or searchable, will throw a RepositoryException if the repository specified by the
objectClass.getId().getRepositoryName() does not support the relevant capability from:
TypeFeatureCapability such as TypeFeatureCapability.TypePropertyDefinitionMultiValued.
If attempting to use the Link, Nested or Binary property types, will throw a RepositoryException if the
repository specified by the objectClass.getId().getRepositoryName() does not support the
TypeFeatureCapability.TypePropertyLink, TypeFeatureCapability.TypePropertyNested or
TypeFeatureCapability.TypePropertyBinary capability.
If attempting to use the searchable type or abstract type mechanism, will throw a RepositoryException if the
repository specified by the objectClass.getId().getRepositoryName() does not support the
TypeFeatureCapability.TypeAbstract or TypeFeatureCapability.TypeSearchable capability.
context - - The content context objecttype - - If a user already has an object class with property definitions, they can use this.
AuthenticationException - - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException - - if the user does not have CREATE capability on the type
ObjectClassExistsException - - if the name of the type is already in use.
RepositoryException - - for any other exception
ObjectClass getType(ContentContext context,
ID typeId)
throws AuthenticationException,
AuthorizationException,
NoSuchObjectClassException,
RepositoryException
TypeFeatureCapability.TypeRetrieval capability.
If attempting to use a property definition which uses multi-valude, primary, property choices, readOnly,
restricted or searchable, will throw a RepositoryException if the repository specified by the
objectClass.getId().getRepositoryName() does not support the relevant capability from:
TypeFeatureCapability such as TypeFeatureCapability.TypePropertyDefinitionMultiValued.
If attempting to use the Link, Nested or Binary property types, will throw a RepositoryException if the
repository specified by the objectClass.getId().getRepositoryName() does not support the
TypeFeatureCapability.TypePropertyLink, TypeFeatureCapability.TypePropertyNested or
TypeFeatureCapability.TypePropertyBinary capability.
If attempting to use the searchable type or abstract type mechanism, will throw a RepositoryException if the
repository specified by the objectClass.getId().getRepositoryName() does not support the
TypeFeatureCapability.TypeAbstract or TypeFeatureCapability.TypeSearchable capability.
context - -The content context objecttypeId - - The id of the type
AuthenticationException - - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException - - if the user does not have VIEW or INSTANTIATION capability on the type
NoSuchObjectClassException - - if the type can't be found
RepositoryException - - for any other exception
ObjectClass getType(ContentContext context,
String repositoryName,
String typeName)
throws AuthenticationException,
AuthorizationException,
NoSuchObjectClassException,
RepositoryException
TypeFeatureCapability.TypeRetrieval capability.
context - - The content context objectrepositoryName - - The name of the repository to querytypeName - - The name of the type
AuthenticationException
AuthorizationException - - If the user does not have VIEW or INSTANTIATION capability on the type
NoSuchObjectClassException - - if the type can't be found
RepositoryException - - for any other exception
ISortableFilterablePagedList<ObjectClass> getViewableTypes(ContentContext context)
throws AuthenticationException,
AuthorizationException,
RepositoryException
TypeFeatureCapability.TypeRetrieval
capability.
context - - The content context object
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 - - for any other exception
ISortableFilterablePagedList<ObjectClass> getViewableTypes(ContentContext context,
String repositoryName)
throws AuthenticationException,
AuthorizationException,
RepositoryException
TypeFeatureCapability.TypeCreate capability.
context - - The content context objectrepositoryName - - The name of the repository
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 - - for any other exception.
ISortableFilterablePagedList<ObjectClass> getInstantiableTypes(ContentContext context,
String repositoryName)
throws AuthenticationException,
AuthorizationException,
RepositoryException
TypeFeatureCapability.TypeRetrieval capability.
context - - The content context objectrepositoryName - - The name of the repository
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 - - for any other exception.
void remove(ContentContext context,
ID typeId)
throws AuthenticationException,
AuthorizationException,
NoSuchObjectClassException,
ObjectClassInUseException,
RepositoryException
TypeFeatureCapability.TypeRemove capability.
context - - The content context objecttypeId - - The ID of the type to be deleted.
AuthenticationException - - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException - - if the user does not have DELETE capability on the type.
NoSuchObjectClassException - - The type can't be found
ObjectClassInUseException - - if the type is in use
RepositoryException - - for any other exception
InputStream getStream(ContentContext context,
ID typeId,
ID propertyChoiceId)
throws AuthenticationException,
AuthorizationException,
NoSuchPropertyChoiceException,
RepositoryException
TypeFeatureCapability.TypePropertyBinary capability.
context - - The content context objecttypeId - - The id of the typepropertyChoiceId - - The property choice id whose bytes are to be retrieved
AuthenticationException - - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException - - if the user does not have VIEW or INSTANTIATION capability on the type
NoSuchPropertyChoiceException - - the property choice can't be found
RepositoryException
ObjectClass save(ContentContext context,
ObjectClass objectClass)
throws AuthenticationException,
AuthorizationException,
ObjectClassInUseException,
RepositoryException
TypeFeatureCapability.TypeUpdate capability.
If attempting to use a property definition which uses multi-value, primary, property choices, readOnly,
mandatory, restricted or searchable, will throw a RepositoryException if the repository specified by the
objectClass.getId().getRepositoryName() does not support the relevant capability from:
TypeFeatureCapability such as TypeFeatureCapability.TypePropertyDefinitionMultiValued.
If attempting to use the Link, Nested or Binary property types, will throw a RepositoryException if the
repository specified by the objectClass.getId().getRepositoryName() does not support the
TypeFeatureCapability.TypePropertyLink, TypeFeatureCapability.TypePropertyNested or
TypeFeatureCapability.TypePropertyBinary capability.
If attempting to use the searchable type or abstract type mechanism, will throw a RepositoryException if the
repository specified by the objectClass.getId().getRepositoryName() does not support the
TypeFeatureCapability.TypeAbstract or TypeFeatureCapability.TypeSearchable capability.
context - - The content context objectobjectClass - - The object class to update.
AuthenticationException - - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException - - if the user does not have UPDATE capability on the type.
This exception will also be thrown if the user is not authorizated by the repository.
ObjectClassInUseException - - if the type is in use and the update to be performed is illegal.
RepositoryException - - if error occurs during the update operation.
ISortableFilterablePagedList<ObjectClass> getChildTypes(ContentContext context,
ID typeId)
throws AuthenticationException,
AuthorizationException,
RepositoryException
TypeFeatureCapability.TypeInheritance capability.
typeId - - The parent type id, or an ID with no uid to retrieve top-level types.
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 an error occurs while looking up the child types.
boolean hasCapability(ContentContext context,
String repositoryName,
ObjectClass type,
TypeCapability capability)
throws AuthorizationException
context - - The ContentContext objectrepositoryName - -The name of the repositorytype - - The type.capability - - The capability to check for.
AuthorizationException - - if the user attempting the
operation is not authorized to perform it.
|
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 | ||||||||