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 ContentRepositoryControl

    @ControlInterface
    public interface ContentRepositoryControl

Control to represent interface to Content Repository Operations in the Content Mgmt System.

Method Summary
`void` | `createRepositoryConfig(ContentContext context, RepositoryConfig config)` Create repository config
`RepositoryCredentialScope` | `getActiveCredentialScope(ContentContext context, String repositoryName)` For the current user and specified repository, identify which is the currently active credential.
`RepositoryConfig` | `getRepositoryConfig(ContentContext context, String name)` Get the named repository config.
`Map<String,RepositoryConfig>` | `getRepositoryConfigMap(ContentContext context)` Return the repository config.
`SortableFilterablePagedResult<RepositoryConfig>` | `getRepositoryConfigs(ContentContext context, int pageSize)` Return a `PagedResult` of the available `RepositoryConfig`s
`SortableFilterablePagedResult<String>` | `getRepositoryNames(ContentContext context, int pageSize)` Return a `PagedResult` of the available Repository names in the system.
`String` | `getTaxonomy(String repositoryName)` Return the taxonomy of the repository used by the DA System.
`RepositoryCredential` | `getUserCredential(ContentContext context, String repositoryName)` For the current user and the specified repository, retrieve the personal repository credential, if it exists.
`boolean` | `hasManageCapability(ContentContext context, String repositoryName)` checks if the user has the CAN_MANAGE capability on the given repository if repositoryName is null, it will test the capability on the REPOSITORY_ROOT
`boolean` | `isAnyRepositoryManaged(ContentContext context)` Return true if any repository is managed.
`boolean` | `isRemovable(ContentContext context, String name)` Determine if the given repository can be removed.
`boolean` | `isRepositoryManaged(ContentContext context, String repositoryName)` Return true if the repository is managed.
`int` | `pingRepository(String repositoryName)` Pings a repository to check if it is available or not.
`void` | `removeRepositoryConfig(ContentContext context, String name)` Remove the repository config.
`void` | `setActiveCredentialScope(ContentContext context, String repositoryName, RepositoryCredentialScope scope)` For the current user and the specified repository, specify which credential should be used.
`void` | `setUserCredential(ContentContext context, String repositoryName, RepositoryCredential credential)` For the current user and the specified repository, persist a personal repository credential.
`void` | `updateRepositoryConfig(ContentContext context, RepositoryConfig config)` Update the repository config.

Method Detail

### isRepositoryManaged

    boolean isRepositoryManaged(ContentContext context,
                                String repositoryName)
                                throws RepositoryException

  Return true if the repository is managed.

  Parameters
    `context` -
    `repositoryName` -
  Returns
    true if the repository is managed, false if not.
  Throws
    `RepositoryException`

### isAnyRepositoryManaged

    boolean isAnyRepositoryManaged(ContentContext context)
                                   throws RepositoryException

  Return true if any repository is managed.

  Parameters
    `context` -
  Returns
    true if any repository is managed, false if not
  Throws
    `RepositoryException`

### pingRepository

    int pingRepository(String repositoryName)
                       throws NoSuchRepositoryConfigException,
                              RepositoryException

  Pings a repository to check if it is available or not. This method tries to connect to that specific repository to check for it's availability. It does not persist the connection information.

  Parameters
    `repositoryName` - The name of the repository
  Returns
    an integer specifying the connection status of the repository. If the repository can be pinged successfully it will return a status of RepositorySession.AUTHENTICATED or any one of the other statuses defined in RepositorySession.
  Throws
    `NoSuchRepositoryConfigException` - If the repository config does not exist
    `RepositoryException` - If an error happens during ping

### getRepositoryConfigMap

    Map<String,RepositoryConfig> getRepositoryConfigMap(ContentContext context)
                                                        throws RepositoryException,
                                                               AuthorizationException

  Return the repository config.

  Parameters
    `context` -
  Throws
    `RepositoryException`
    `AuthorizationException`

### getRepositoryNames

    SortableFilterablePagedResult<String> getRepositoryNames(ContentContext context,
                                                             int pageSize)
                                                             throws RepositoryException

  Return a `PagedResult` of the available Repository names in the system. Note: This call is NOT security enabled...

  Parameters
    `context` -
    `pageSize` -
  Throws
    `RepositoryException`

### getRepositoryConfigs

    SortableFilterablePagedResult<RepositoryConfig> getRepositoryConfigs(ContentContext context,
                                                                         int pageSize)
                                                                         throws RepositoryException,
                                                                                AuthorizationException

  Return a `PagedResult` of the available `RepositoryConfig`s

  Parameters
    `context` -
    `pageSize` -
  Throws
    `RepositoryException`
    `AuthorizationException`

### createRepositoryConfig

    void createRepositoryConfig(ContentContext context,
                                RepositoryConfig config)
                                throws RepositoryException,
                                       AuthorizationException,
                                       RepositoryConfigExistsException

  Create repository config

  Parameters
    `context` -
    `config` -
  Throws
    `RepositoryException`
    `AuthorizationException`
    `RepositoryConfigExistsException`

### getRepositoryConfig

    RepositoryConfig getRepositoryConfig(ContentContext context,
                                         String name)
                                         throws RepositoryException,
                                                AuthorizationException,
                                                NoSuchRepositoryConfigException

  Get the named repository config.

  Parameters
    `context` -
    `name` -
  Throws
    `RepositoryException`
    `AuthorizationException`
    `NoSuchRepositoryConfigException`

### updateRepositoryConfig

    void updateRepositoryConfig(ContentContext context,
                                RepositoryConfig config)
                                throws RepositoryException,
                                       AuthorizationException,
                                       NoSuchRepositoryConfigException

  Update the repository config.

  Parameters
    `context` -
    `config` -
  Throws
    `RepositoryException`
    `AuthorizationException`
    `NoSuchRepositoryConfigException`

### removeRepositoryConfig

    void removeRepositoryConfig(ContentContext context,
                                String name)
                                throws RepositoryException,
                                       AuthorizationException,
                                       NoSuchRepositoryConfigException

  Remove the repository config.

  Parameters
    `context` -
    `name` -
  Throws
    `RepositoryException`
    `AuthorizationException`
    `NoSuchRepositoryConfigException`

### hasManageCapability

    boolean hasManageCapability(ContentContext context,
                                String repositoryName)
                                throws AuthorizationException

  checks if the user has the CAN_MANAGE capability on the given repository if repositoryName is null, it will test the capability on the REPOSITORY_ROOT

  Parameters
    `context` -
    `repositoryName` -
  Throws
    `AuthorizationException`

### getTaxonomy

    String getTaxonomy(String repositoryName)

  Return the taxonomy of the repository used by the DA System.

  Parameters
    `repositoryName` - The name of the repository. If repositoryName is null, it will give the taxonomy of the Virtual Repository Root
  Returns
    The taxonomy

### isRemovable

    boolean isRemovable(ContentContext context,
                        String name)
                        throws RepositoryException

  Determine if the given repository can be removed. This is possible through the API when the configuration is not defined in the application's content-config.xml.

  Parameters
    `context` - The ContentContext object
    `name` - THe name of the repository
  Returns
    true or false depending on whether the repository is defined in the application's content-config.xml.
  Throws
    `RepositoryException` - If this operation fails.

### getActiveCredentialScope

    RepositoryCredentialScope getActiveCredentialScope(ContentContext context,
                                                       String repositoryName)
                                                       throws AuthorizationException,
                                                              NoSuchRepositoryConfigException,
                                                              RepositoryException

  For the current user and specified repository, identify which is the currently active credential. For example, both a repository and user credential may exist. This method indicates which credential is currently active.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - the repository to retrieve the scope for
  Returns
    the currently active scope
  Throws
    `AuthorizationException` - If the caller is not authorized
    `NoSuchRepositoryConfigException` - If the repository config does not exist
    `RepositoryException` - if this operation fails

### setActiveCredentialScope

    void setActiveCredentialScope(ContentContext context,
                                  String repositoryName,
                                  RepositoryCredentialScope scope)
                                  throws AuthorizationException,
                                         NoSuchRepositoryConfigException,
                                         RepositoryException

  For the current user and the specified repository, specify which credential should be used. For example, both a repository and user credential may exist. This method can be called to specify that the repository credential should be used anytime this user accesses this repository.

  It is not valid to specify a user credential scope if a user credential has not been set.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - the repository to set the scope for
    `scope` - the scope to set
  Throws
    `AuthorizationException` - If the caller is not authorized
    `NoSuchRepositoryConfigException` - If the repository config does not exist
    `RepositoryException` - if this operation fails

### getUserCredential

    RepositoryCredential getUserCredential(ContentContext context,
                                           String repositoryName)
                                           throws AuthorizationException,
                                                  NoSuchRepositoryConfigException,
                                                  RepositoryException

  For the current user and the specified repository, retrieve the personal repository credential, if it exists. Returns NULL if the current user has no personal repository credential for the specified repository.

  Note a user credential may exist without being active -- call `setActiveCredentialScope(ContentContext,String,RepositoryCredentialScope)` to activate the credential.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - the repository to retrieve personal repository credential for.
  Returns
    the personal repository credential for this user, or NULL if none exist.
  Throws
    `AuthorizationException` - If the caller is not authorized
    `NoSuchRepositoryConfigException` - If the repository config does not exist
    `RepositoryException` - if this operation fails

### setUserCredential

    void setUserCredential(ContentContext context,
                           String repositoryName,
                           RepositoryCredential credential)
                           throws AuthorizationException,
                                  NoSuchRepositoryConfigException,
                                  RepositoryException

  For the current user and the specified repository, persist a personal repository credential. The user must be authenticated. This will not work for an anonymous user.

  Note the user credential may exist without being active -- call `setActiveCredentialScope(ContentContext,String,RepositoryCredentialScope)` to activate the credential.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - the repository these credential applies to.
    `credential` - the repository credential
  Throws
    `AuthorizationException` - If the caller is not authorized
    `NoSuchRepositoryConfigException` - If the repository config does not exist
    `RepositoryException` - if this operation fails

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.