Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

## com.bea.content.federated
Interface ITypeManager

    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

This interface is intended to be implemented only by Oracle Weblogic Portal. Oracle Systems reserves the right to add abstract methods to this interface without notice. Implementations of this interface by other parties must not be expected to compile without change in future versions of Oracle Weblogic Portal.

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.TypeRetrieval` 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

### addType

    ObjectClass addType(ContentContext context,
                        String repositoryName,
                        String name)
                        throws AuthenticationException,
                               AuthorizationException,
                               ObjectClassExistsException,
                               RepositoryException

  Create a type in the specified repository. Will throw an AuthorizationException if user does not have CREATE privileges on the repository to create types Will throw a RepositoryException if the repository specified by the repositoryName does not support the `TypeFeatureCapability.TypeCreate` capability.

  Parameters
    `context` - - The content context object
    `repositoryName` - - The name of the repository
    `name` - - The name of the new type
  Returns
    The created type
  Throws
    `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

### addType

    ObjectClass addType(ContentContext context,
                        ObjectClass type)
                        throws AuthenticationException,
                               AuthorizationException,
                               ObjectClassExistsException,
                               RepositoryException

  Create a type in the specified repository. Will throw an AuthorizationException if user does not have CREATE privileges on the repository to create types Will throw a RepositoryException if the repository specified by the type.getId().getRepositoryName() does not support the `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.

  Parameters
    `context` - - The content context object
    `type` - - If a user already has an object class with property definitions, they can use this.
  Returns
    The created type
  Throws
    `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

### getType

    ObjectClass getType(ContentContext context,
                        ID typeId)
                        throws AuthenticationException,
                               AuthorizationException,
                               NoSuchObjectClassException,
                               RepositoryException

  Returns the type with the given ID. Will throw an AuthorizationException if the user does not have VIEW or INSTANTIATION capabilities set on the type Will throw a RepositoryException if the repository specified by the typeId does not support the `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.

  Parameters
    `context` - -The content context object
    `typeId` - - The id of the type
  Returns
    The specified type
  Throws
    `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

### getType

    ObjectClass getType(ContentContext context,
                        String repositoryName,
                        String typeName)
                        throws AuthenticationException,
                               AuthorizationException,
                               NoSuchObjectClassException,
                               RepositoryException

  Returns the type with the given name. Will throw an AuthorizationException if the user does not have VIEW or INSTANTIATION capabilities set on the type Will throw a RepositoryException if the repository specified by the repositoryName does not support the `TypeFeatureCapability.TypeRetrieval` capability.

  Parameters
    `context` - - The content context object
    `repositoryName` - - The name of the repository to query
    `typeName` - - The name of the type
  Returns
    The specified type
  Throws
    `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

### getViewableTypes

    ISortableFilterablePagedList<ObjectClass> getViewableTypes(ContentContext context)
                                                               throws AuthenticationException,
                                                                      AuthorizationException,
                                                                      RepositoryException

  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.

  Parameters
    `context` - - The content context object
  Returns
    A page list which allows user to iterate though the types.
  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` - - for any other exception

### getViewableTypes

    ISortableFilterablePagedList<ObjectClass> getViewableTypes(ContentContext context,
                                                               String repositoryName)
                                                               throws AuthenticationException,
                                                                      AuthorizationException,
                                                                      RepositoryException

  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.TypeRetrieval` capability.

  Parameters
    `context` - - The content context object
    `repositoryName` - - The name of the repository
  Returns
    A page list which allows user to iterate though the types.
  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` - - for any other exception.

### getInstantiableTypes

    ISortableFilterablePagedList<ObjectClass> getInstantiableTypes(ContentContext context,
                                                                   String repositoryName)
                                                                   throws AuthenticationException,
                                                                          AuthorizationException,
                                                                          RepositoryException

  Returns all the types for the given repository for which the user has INSTANTIATION privileges on that type. Will throw a RepositoryException if the repository specified by the repositoryName does not support the `TypeFeatureCapability.TypeRetrieval` capability.

  Parameters
    `context` - - The content context object
    `repositoryName` - - The name of the repository
  Returns
    A page list which allows user to iterate though the types.
  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` - - for any other exception.

### remove

    void remove(ContentContext context,
                ID typeId)
                throws AuthenticationException,
                       AuthorizationException,
                       NoSuchObjectClassException,
                       ObjectClassInUseException,
                       RepositoryException

  Deletes the type with the given ID. All of the ObjectClass PropertyDefinitions, and their PropertyChocies are also deleted if present. This method will throw an AuthorizationException if user does not have enough privileges on that type. Will throw a RepositoryException if the repository specified by the typeId does not support the `TypeFeatureCapability.TypeRemove` capability.

  Parameters
    `context` - - The content context object
    `typeId` - - The ID of the type to be deleted.
  Throws
    `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

### getStream

    InputStream getStream(ContentContext context,
                          ID typeId,
                          ID propertyChoiceId)
                          throws AuthenticationException,
                                 AuthorizationException,
                                 NoSuchPropertyChoiceException,
                                 RepositoryException

  Return the bytes for the given property choice. Will throw an AuthorizationException if the user does not have VIEW or INSTANTIATION capabilities on the type Will throw a RepositoryException if the repository specified by the typeId does not support the `TypeFeatureCapability.TypePropertyBinary` capability.

  Parameters
    `context` - - The content context object
    `typeId` - - The id of the type
    `propertyChoiceId` - - The property choice id whose bytes are to be retrieved
  Returns
    An InputStream of the bytes.
  Throws
    `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`

### save

    ObjectClass save(ContentContext context,
                     ObjectClass objectClass)
                     throws AuthenticationException,
                            AuthorizationException,
                            ObjectClassInUseException,
                            RepositoryException

  This method updates an existing object class in a single transaction. The changed object class attributes will be updated accordingly, including changed property definitions and property choices. This is a less granular way of performing actions like createPropertyDefinition, renameType and updatePropertyDefiniton. The object class is assumed to be retrieved from this API and therefore properly formed when this call is made. Therefore if this method is called and some property definitions are not specified, those definitions values will be removed. The following object class attributes cannot be modified via this API: path (modifying the parent will cause the object class path to be updated properly). Will throw a RepositoryException if the repository specified by the objectClass.getId().getRepositoryName() does not support the `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.

  Parameters
    `context` - - The content context object
    `objectClass` - - The object class to update.
  Returns
    The updated objectClass
  Throws
    `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.

### getChildTypes

    ISortableFilterablePagedList<ObjectClass> getChildTypes(ContentContext context,
                                                            ID typeId)
                                                            throws AuthenticationException,
                                                                   AuthorizationException,
                                                                   RepositoryException

  Returns a list (possibly empty) of types which extend the given type via type inheritance. Returns types in the first level of extension.

  For example, if "Type A" is extended by "Type B" which is in turn extended by "Type C", then when this method is called with the parameter "Type A", the result would be a list containing only "Type B".

  If this method is called and typeId has no UID, then this method will return all top-level types (types which are not inherited).

  This method will only return the types that the user has VIEW capabilities on.

  Will throw a RepositoryException if the repository specified by the typeId does not support the `TypeFeatureCapability.TypeInheritance` capability.

  Parameters
    `typeId` - - The parent type id, or an ID with no uid to retrieve top-level types.

  Returns
    A list (possibly empty) of object classes which extend the given type.

  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 an error occurs while looking up the child types.

### hasCapability

    boolean hasCapability(ContentContext context,
                          String repositoryName,
                          ObjectClass type,
                          TypeCapability capability)
                          throws AuthorizationException

  Checks to see if the caller has the specified security capability on a type

  Parameters
    `context` - - The ContentContext object
    `repositoryName` - -The name of the repository
    `type` - - The type.
    `capability` - - The capability to check for.
  Returns
    true or false depending on whether the caller has the capability on the type or not.
  Throws
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.

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

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.