Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 BEA Systems, Inc. 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 BEA Weblogic Portal.BEA 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 BEA 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 of types which extend the given type.
`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
`ISortableFilterablePagedList<ObjectClass>` | `getViewableTypes(ContentContext context, String repositoryName)` Returns all the types for the given repository for which the user has VIEW privileges on
`boolean` | `hasCapability(ContentContext context, String repositoryName, ObjectClass type, TypeCapability capability)` Checks to see if the caller has the specified security capability on a node
`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

  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

  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

  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

  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

  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

  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.

  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.

  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

  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 are cannot be modified via this API: path (modifying the parent will cause the object class path to be updated properly).

  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 of types which extend the given type. If the given type is used in type inheritance by another type, then that type which extends it will be returned. Returns first levels of extension. Consider: "Type A" is extended by "Type B" which is in turn extended by "Type C". If this method is called with the parameter "Type A", the result would be a list only "Type B". This method will only return the types that have VIEW capabilities.

  Parameters
    `typeId` - - The parent type id
  Returns
    A list 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 node

  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 © 2006 BEA Systems, Inc. All Rights Reserved