|
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 IVirtualRepositoryManager
Interface to manage repositories and user credentials while honoring DA rights on the repositories.
For a each repository, credentials can be configured on both a per-user and per-repository basis. Each user can also select whether to use their own repository credentials or the global repository credentials configured on the RepositoryConfig. 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 | |
---|---|
void |
createRepositoryConfig(ContentContext context,
RepositoryConfig config)
Persist a given repository configuration. |
RepositoryCredential |
getActiveCredential(ContentContext context,
String repositoryName)
For the current user and the specified repository, retrieve the currently active credential. |
RepositoryCredentialScope |
getActiveCredentialScope(ContentContext context,
String repositoryName)
For the current user and specified repository, identify which is the currently active credential. |
RepositoryConfig |
getPublicRepositoryConfig(ContentContext context,
String name)
Get the named repository config, without the password populated. |
RepositoryConfig |
getRepositoryConfig(ContentContext context,
String name)
Get the named repository config. |
Map<String,RepositoryConfig> |
getRepositoryConfigMap(ContentContext context)
Return repository configurations for repositories that the context has VirtualRepositoryCapability#MANAGE capability on |
Map<String,String> |
getRepositoryDescription(ContentContext context,
String repositoryName)
Retrieve a map of repository description data. |
List<String> |
getRepositoryNames(ContentContext context)
Return a list of names for all repositories defined in the system. |
RepositoryCredential |
getUserCredential(ContentContext context,
String repositoryName)
For the current user and the specified repository, retrieve the personal repository credential, if it exists. |
boolean |
hasCapability(ContentContext context,
String repositoryName,
VirtualRepositoryCapability capability)
Check to see if the caller has the specified security capability on a virtual repository |
boolean |
isLibraryServiceEnabled(ContentContext context,
String repositoryName)
Checks whether or not the specified repository has library services enabled. |
boolean |
isRemovable(ContentContext context,
String name)
Determine if the given repository can be removed. |
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 |
removeUserCredential(ContentContext context,
String repositoryName)
For the current user and the specified repository, remove a personal repository credential, if one exists for the specified repository. |
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 |
---|
List<String> getRepositoryNames(ContentContext context) throws RepositoryException
context
- The content context.
RepositoryException
- If an error occurs while retrieving the repository names.int pingRepository(String repositoryName) throws NoSuchRepositoryConfigException, RepositoryException
repositoryName
- The name of the repository
NoSuchRepositoryConfigException
- If the repository config does not exist
RepositoryException
- If an error happens during pingMap<String,RepositoryConfig> getRepositoryConfigMap(ContentContext context) throws RepositoryException, AuthorizationException
context
- The content context.
RepositoryException
- If an error occurs while retrieving the repository configurations.
AuthorizationException
- If the caller does not have the VirtualRepositoryCapability.MANAGE
capability.void createRepositoryConfig(ContentContext context, RepositoryConfig config) throws AuthorizationException, RepositoryConfigExistsException, RepositoryException
RepositoryConfig
for available constructors.
context
- The content context.config
- The configuraton to create.
AuthorizationException
- If the caller does not have the VirtualRepositoryCapability.MANAGE
capability.
RepositoryConfigExistsException
- If the supplied configuration already exists for this application.
RepositoryException
- If this operation fails.RepositoryConfig getRepositoryConfig(ContentContext context, String name) throws AuthorizationException, RepositoryException, NoSuchRepositoryConfigException
context
- The content context.name
- The repository name.
AuthorizationException
- If the caller does not have the VirtualRepositoryCapability.MANAGE
capability.
RepositoryException
- If this operation fails.
NoSuchRepositoryConfigException
- If this repository is not configured for this application.RepositoryConfig getPublicRepositoryConfig(ContentContext context, String name) throws RepositoryException, NoSuchRepositoryConfigException
RepositoryConfig
object will be defined on the resulting RepositoryConfig object. This allows public
access to repository configuration data without requiring the VirtualRepositoryCapability.MANAGE
capability.
context
- The content context.name
- The repository name.
RepositoryException
- If this operation fails.
NoSuchRepositoryConfigException
- If this repository is not configured for this application.void updateRepositoryConfig(ContentContext context, RepositoryConfig config) throws AuthorizationException, RepositoryException, NoSuchRepositoryConfigException
context
- The content context.config
- The repository configuration.
AuthorizationException
- If the caller does not have the VirtualRepositoryCapability.MANAGE
capability.
RepositoryException
- If this operation fails.
NoSuchRepositoryConfigException
- If the supplied repository configuration is not present for this
application.void removeRepositoryConfig(ContentContext context, String name) throws AuthorizationException, RepositoryException, NoSuchRepositoryConfigException
context
- The content context.name
- The repository name.
AuthorizationException
- If the caller does not have the VirtualRepositoryCapability.MANAGE
capability.
RepositoryException
- If this operation fails.
NoSuchRepositoryConfigException
- If the supplied repository name is not configured for this application.boolean isLibraryServiceEnabled(ContentContext context, String repositoryName) throws RepositoryException
context
- The ContentContext objectrepositoryName
- The name of the repository
RepositoryException
- If this operation fails.boolean hasCapability(ContentContext context, String repositoryName, VirtualRepositoryCapability capability) throws AuthorizationException
context
- The ContentContext objectrepositoryName
- The name of the repositorycapability
- The capability to check for.
AuthorizationException
- If an error occurs while performaing the capability check.boolean isRemovable(ContentContext context, String name) throws RepositoryException
context
- The ContentContext objectname
- THe name of the repository
RepositoryException
- If this operation fails.void setUserCredential(ContentContext context, String repositoryName, RepositoryCredential credential) throws AuthorizationException, NoSuchRepositoryConfigException, RepositoryException
setActiveCredentialScope(ContentContext,String,RepositoryCredentialScope)
to activate the credential.
context
- The ContentContext objectrepositoryName
- the repository these credential applies to.credential
- the repository credential
AuthorizationException
- If the caller is not authorized
NoSuchRepositoryConfigException
- If the repository config does not exist
RepositoryException
- if this operation failsRepositoryCredential getUserCredential(ContentContext context, String repositoryName) throws AuthorizationException, NoSuchRepositoryConfigException, RepositoryException
setActiveCredentialScope(ContentContext,String,RepositoryCredentialScope)
to activate the credential.
context
- The ContentContext objectrepositoryName
- the repository to retrieve personal repository credential for.
AuthorizationException
- If the caller is not authorized
NoSuchRepositoryConfigException
- If the repository config does not exist
RepositoryException
- if this operation failsvoid removeUserCredential(ContentContext context, String repositoryName) throws AuthorizationException, NoSuchRepositoryConfigException, RepositoryException
setActiveCredentialScope(ContentContext,String,RepositoryCredentialScope)
to activate the credential.
context
- The ContentContext objectrepositoryName
- the repository to remove the personal repository credential for.
AuthorizationException
- If the caller is not authorized
NoSuchRepositoryConfigException
- If the repository config does not exist
RepositoryException
- if this operation failsRepositoryCredential getActiveCredential(ContentContext context, String repositoryName) throws AuthorizationException, NoSuchRepositoryConfigException, RepositoryException
context
- The ContentContext objectrepositoryName
- the repository to retrieve the repository credential for.
AuthorizationException
- If the caller is not authorized
NoSuchRepositoryConfigException
- If the repository config does not exist
RepositoryException
- if this operation failsvoid setActiveCredentialScope(ContentContext context, String repositoryName, RepositoryCredentialScope scope) throws AuthorizationException, NoSuchRepositoryConfigException, RepositoryException
context
- The ContentContext objectrepositoryName
- the repository to set the scope forscope
- the scope to set
AuthorizationException
- If the caller is not authorized
NoSuchRepositoryConfigException
- If the repository config does not exist
RepositoryException
- if this operation failsRepositoryCredentialScope getActiveCredentialScope(ContentContext context, String repositoryName) throws AuthorizationException, NoSuchRepositoryConfigException, RepositoryException
context
- The ContentContext objectrepositoryName
- the repository to retrieve the scope for
AuthorizationException
- If the caller is not authorized
NoSuchRepositoryConfigException
- If the repository config does not exist
RepositoryException
- if this operation failsMap<String,String> getRepositoryDescription(ContentContext context, String repositoryName) throws AuthenticationException
SPIDescriptionKeys
class and keys provided by the repository author.
context
- The ContentContext objectrepositoryName
- The name of the repository
AuthenticationException
- If the repository is not connected.
|
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 |