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.portal.tools.content.controls
Interface ContentTypeControl

    @ControlInterface
    public interface ContentTypeControl

Method Summary
`ObjectClass` | `createType(ContentContext context, ObjectClass type)` Create a type in the specified repository.
`ObjectClass` | `createType(ContentContext context, String repositoryName, String name)` Create a type in the specified repository.
`SortableFilterablePagedResult<ObjectClass>` | `getChildTypes(ContentContext context, ID typeId, int pageSize)` Returns a list of types which extend the given type.
`SortableFilterablePagedResult<ObjectClass>` | `getInstantiableFolderTypes(ContentContext context, String repositoryName, int pageSize)` Returns all the folder types for which the user has INSTANTIATE privileges on that type.
`SortableFilterablePagedResult<ObjectClass>` | `getInstantiableNonFolderTypes(ContentContext context, String repositoryName, int pageSize)` Returns all the non-folder types for which the user has INSTANTIATE privileges on that type.
`SortableFilterablePagedResult<ObjectClass>` | `getInstantiableTypes(ContentContext context, String repositoryName, int pageSize)` 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.
`SortableFilterablePagedResult<ObjectClass>` | `getViewableTypes(ContentContext context, String repositoryName, int pageSize)` Returns all the types for the given repository for which the user has VIEW privileges on
`boolean` | `hasAssociateCapability(ContentContext context, String repositoryName, ObjectClass type)` Check to see if the given type has CAN_ASSOCIATE capability for it to be associated with any workflow.
`boolean` | `hasCreateCapability(ContentContext context, String repositoryName, ObjectClass objectClass)` Check to see if the given type hasCreateCapability
`boolean` | `hasDeleteCapability(ContentContext context, String repositoryName, ObjectClass objectClass)` Check to see if the given type hasDeleteCapability for the current user.
`boolean` | `hasInstantiateCapability(ContentContext context, String repositoryName, ObjectClass objectClass)` Check to see if the given type can be instantiated by the given user
`boolean` | `hasUpdateCapability(ContentContext context, String repositoryName, ObjectClass objectClass)` Check to see if the given type hasUpdateCapability for the current user.
`boolean` | `hasViewCapability(ContentContext context, String repositoryName, ObjectClass objectClass)` Check to see if the given type hasViewCapability for the current user.
`boolean` | `isFolder(ObjectClass type)` Determine whether the given ObjectClass is a folder 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

### createType

    ObjectClass createType(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 DA 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
  Throws
    `AuthenticationException`
    `AuthorizationException`
    `ObjectClassExistsException`
    `RepositoryException`

### createType

    ObjectClass createType(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 DA 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.
  Throws
    `AuthenticationException`
    `AuthorizationException`
    `ObjectClassExistsException`
    `RepositoryException`

### 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 capabilities set on the type

  Parameters
    `context` - The content context object
    `typeId` - The id of the type
  Returns
    The specified type
  Throws
    `AuthenticationException`
    `AuthorizationException`
    `NoSuchObjectClassException`
    `RepositoryException`

### 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 capabilities set on the type

  Parameters
    `context` - The content context object
    `repositoryName` - The name of the repository to query
    `typeName` - The id of the type
  Returns
    The specified type
  Throws
    `AuthenticationException`
    `AuthorizationException`
    `NoSuchObjectClassException`
    `RepositoryException`

### getViewableTypes

    SortableFilterablePagedResult<ObjectClass> getViewableTypes(ContentContext context,
                                                                String repositoryName,
                                                                int pageSize)
                                                                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
  Throws
    `AuthenticationException`
    `AuthorizationException`
    `RepositoryException`

### getInstantiableTypes

    SortableFilterablePagedResult<ObjectClass> getInstantiableTypes(ContentContext context,
                                                                    String repositoryName,
                                                                    int pageSize)
                                                                    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
  Throws
    `AuthenticationException`
    `AuthorizationException`
    `RepositoryException`

### isFolder

    boolean isFolder(ObjectClass type)

  Determine whether the given ObjectClass is a folder type

  Parameters
    `type` -
  Returns

### getInstantiableFolderTypes

    SortableFilterablePagedResult<ObjectClass> getInstantiableFolderTypes(ContentContext context,
                                                                          String repositoryName,
                                                                          int pageSize)
                                                                          throws AuthenticationException,
                                                                                 AuthorizationException,
                                                                                 RepositoryException

  Returns all the folder types for which the user has INSTANTIATE privileges on that type. Returns the base folder type and all levels of extension of the base folder type.

  Returns
    A list of instantiable object classes which extend the given type
  Throws
    `AuthenticationException`
    `AuthorizationException`
    `RepositoryException`

### getInstantiableNonFolderTypes

    SortableFilterablePagedResult<ObjectClass> getInstantiableNonFolderTypes(ContentContext context,
                                                                             String repositoryName,
                                                                             int pageSize)
                                                                             throws AuthenticationException,
                                                                                    AuthorizationException,
                                                                                    RepositoryException

  Returns all the non-folder types for which the user has INSTANTIATE privileges on that type. Returns any instantiable type that is not the folder type and does not extend the folder type.

  Returns
    A list of instantiable object classes which extend the given type
  Throws
    `AuthenticationException`
    `AuthorizationException`
    `RepositoryException`

### remove

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

  Deletes the type with the given ID. 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`
    `AuthorizationException`
    `NoSuchObjectClassException`
    `RepositoryException`

### 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 capabilities on the object class

  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`
    `AuthorizationException`
    `NoSuchPropertyChoiceException`
    `RepositoryException`

### save

    ObjectClass save(ContentContext context,
                     ObjectClass objectClass)
                     throws AuthenticationException,
                            AuthorizationException,
                            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
    `objectClass` - The object class to update.
  Returns
    The updated objectClass
  Throws
    `AuthenticationException`
    `AuthorizationException` - - if the user attempting the operation is not authorized to perform it.
    `RepositoryException` - - if error occurs during the update operation.

### getChildTypes

    SortableFilterablePagedResult<ObjectClass> getChildTypes(ContentContext context,
                                                             ID typeId,
                                                             int pageSize)
                                                             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.

### hasInstantiateCapability

    boolean hasInstantiateCapability(ContentContext context,
                                     String repositoryName,
                                     ObjectClass objectClass)
                                     throws AuthorizationException

  Check to see if the given type can be instantiated by the given user

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository
    `objectClass` - The objectClass
  Returns
    true or false depending on whether the type has the capability or not.
  Throws
    `AuthorizationException`

### hasCreateCapability

    boolean hasCreateCapability(ContentContext context,
                                String repositoryName,
                                ObjectClass objectClass)
                                throws AuthorizationException

  Check to see if the given type hasCreateCapability

  Parameters
    `context` - The ContentContext object
    `objectClass` - The objectClass - null checks at the root
  Returns
    true or false depending on whether the type has the capability or not.
  Throws
    `AuthorizationException`

### hasDeleteCapability

    boolean hasDeleteCapability(ContentContext context,
                                String repositoryName,
                                ObjectClass objectClass)
                                throws AuthorizationException

  Check to see if the given type hasDeleteCapability for the current user.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository
    `objectClass` - The objectclass
  Returns
    true or false depending on whether the type has the capability or not.
  Throws
    `AuthorizationException`

### hasViewCapability

    boolean hasViewCapability(ContentContext context,
                              String repositoryName,
                              ObjectClass objectClass)
                              throws AuthorizationException

  Check to see if the given type hasViewCapability for the current user.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository
    `objectClass` - The objectclass
  Returns
    true or false depending on whether the type has the capability or not.
  Throws
    `AuthorizationException`

### hasUpdateCapability

    boolean hasUpdateCapability(ContentContext context,
                                String repositoryName,
                                ObjectClass objectClass)
                                throws AuthorizationException

  Check to see if the given type hasUpdateCapability for the current user.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository
    `objectClass` - The objectclass
  Returns
    true or false depending on whether the type has the capability or not.
  Throws
    `AuthorizationException`

### hasAssociateCapability

    boolean hasAssociateCapability(ContentContext context,
                                   String repositoryName,
                                   ObjectClass type)
                                   throws AuthorizationException

  Check to see if the given type has CAN_ASSOCIATE capability for it to be associated with any workflow.

  Parameters
    `context` - The ContentContext object
    `type` - The type. Null checks at the root
  Returns
    true or false depending on whether the type has the capability or not.
  Throws
    `AuthorizationException`

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.