public class RepositoryConfigUtil extends Object
Constructor and Description |
---|
RepositoryConfigUtil() |
Modifier and Type | Method and Description |
---|---|
static Resource |
getContext(RepositoryConnection con,
String repositoryID) |
static RepositoryConfig |
getRepositoryConfig(Repository repository,
String repositoryID) |
static Set<String> |
getRepositoryIDs(Repository repository) |
static boolean |
hasRepositoryConfig(Repository repository,
String repositoryID)
Is configuration information for the specified repository ID present in
the (system) repository?
|
static boolean |
removeRepositoryConfigs(Repository repository,
String... repositoryIDs)
Removes one or more Repository configurations from a Repository.
|
static void |
updateRepositoryConfigs(RepositoryConnection con,
RepositoryConfig... configs)
Update the specified RepositoryConnection with the specified set of
RepositoryConfigs.
|
static void |
updateRepositoryConfigs(Repository repository,
RepositoryConfig... configs)
Update the specified Repository with the specified set of
RepositoryConfigs.
|
public static Set<String> getRepositoryIDs(Repository repository) throws RepositoryException
RepositoryException
public static boolean hasRepositoryConfig(Repository repository, String repositoryID) throws RepositoryException, RepositoryConfigException
repository
- the repository to look inrepositoryID
- the repositoryID to look forRepositoryException
- if an error occurred while trying to retrieve information from the
(system) repositoryRepositoryConfigException
public static RepositoryConfig getRepositoryConfig(Repository repository, String repositoryID) throws RepositoryConfigException, RepositoryException
public static void updateRepositoryConfigs(Repository repository, RepositoryConfig... configs) throws RepositoryException, RepositoryConfigException
repository
- The Repository whose contents will be modified.configs
- The RepositoryConfigs that should be added to or updated in the
Repository. The RepositoryConfig's ID may already occur in the
Repository, in which case all previous configuration data for that
Repository will be cleared before the RepositoryConfig is added.RepositoryException
- When access to the Repository's RepositoryConnection causes a
RepositoryException.RepositoryConfigException
public static void updateRepositoryConfigs(RepositoryConnection con, RepositoryConfig... configs) throws RepositoryException, RepositoryConfigException
con
- the repository connection to perform the update onconfigs
- The RepositoryConfigs that should be added to or updated in the
Repository. The RepositoryConfig's ID may already occur in the
Repository, in which case all previous configuration data for that
Repository will be cleared before the RepositoryConfig is added.RepositoryException
RepositoryConfigException
public static boolean removeRepositoryConfigs(Repository repository, String... repositoryIDs) throws RepositoryException, RepositoryConfigException
repository
- The Repository to remove the configurations from.repositoryIDs
- The IDs of the Repositories whose configurations need to be
removed.RepositoryException
- Whenever access to the Repository's RepositoryConnection causes a
RepositoryException.RepositoryConfigException
public static Resource getContext(RepositoryConnection con, String repositoryID) throws RepositoryException, RepositoryConfigException
Copyright © 2001-2016 Aduna. All Rights Reserved.