public abstract class RepositoryImpl extends Object implements Repository, StringConstants
Repository
implementation.Modifier and Type | Class and Description |
---|---|
static class |
RepositoryImpl.UnitOfWorkImpl
A unit of work analogous to a transaction.
|
Repository.Id, Repository.KeywordCriteria, Repository.OperationType, Repository.State, Repository.Type, Repository.UnitOfWork, Repository.UnitOfWorkListener
Modifier and Type | Field and Description |
---|---|
static String |
ENV_ROOT
The root path of the Komodo repository environment area.
|
protected KEngine |
kEngine |
static String |
KOMODO_ROOT
The root path of the Komodo repository.
|
static String |
LIBRARY_ROOT
The root path of the Komodo repository library area.
|
protected static KLog |
LOGGER |
static String |
PROFILES_ROOT
The root path of the Komodo repository environment profiles area
|
static String |
REPO_ROOT
The root path of the repository.
|
static String |
SEARCHES_ROOT
The root path of the Komodo repository workspace searches area.
|
static String |
VALIDATION_ROOT
The root path of the Komodo repository environment validation rules area
|
SYSTEM_USER
AMPERSAND, AT, BR, CLASS, CLOSE_ANGLE_BRACKET, CLOSE_BRACE, CLOSE_BRACKET, CLOSE_PRE_CMT, CLOSE_PRE_TAG, CLOSE_SQUARE_BRACKET, COLON, COMMA, CONNECTION_SUFFIX, CURRENT_FOLDER_SYMBOL, DDL, DEFAULT_LOCAL_WORKSPACE_NAME, DIVIDE, DOLLAR_SIGN, DOT, DOT_CHAR, DOT_DOT, DOT_KOMODO, DOUBLE_BACK_SLASH, DRIVE_SEPARATOR, EMPTY_ARRAY, EMPTY_STRING, ENUM, EQUALS, FILE_EXTENSION_SEPARATOR, FILE_NAME_WILDCARD, FINAL, FORWARD_SLASH, HASH, HYPHEN, INTERFACE, JAR, JAVA, JAVA_IO_TMPDIR, JBOSS_SERVER_TMP_DIR, KOMODO, LINE_SEPARATOR, LINE_SEPARATOR_PROPERTY_NAME, LOG, MINUS, MULTIPLY, NBSP, NEW_LINE, OPEN_ANGLE_BRACKET, OPEN_BRACE, OPEN_BRACKET, OPEN_PRE_CMT, OPEN_PRE_TAG, OPEN_SQUARE_BRACKET, PARENT_FOLDER_SYMBOL, PERCENT, PIPE, PLUS, PREFIX_PATTERN, PRIVATE, PUBLIC, QUESTION_MARK, QUOTE_MARK, SEMI_COLON, SERVICE_VDB_SUFFIX, SERVICE_VDB_VIEW_MODEL, SERVICE_VDB_VIEW_SUFFIX, SOURCES, SPACE, SPEECH_MARK, SRC, STAR, STATIC, TAB, TARGET, UNDERSCORE, UNDERSCORE_CHAR, VDB_DEPLOYMENT_SUFFIX, VDB_PREFIX, XML, XML_SUFFIX, ZIP, ZIP_SUFFIX
Constructor and Description |
---|
RepositoryImpl(Repository.Type type,
Repository.Id id) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createTransaction, getState, ping
protected static final KLog LOGGER
public static final String REPO_ROOT
public static final String KOMODO_ROOT
public static final String ENV_ROOT
public static final String LIBRARY_ROOT
public static final String VALIDATION_ROOT
public static final String PROFILES_ROOT
public static final String SEARCHES_ROOT
protected KEngine kEngine
public RepositoryImpl(Repository.Type type, Repository.Id id)
type
- the repository type (cannot be null
)id
- the repository identifier (cannot be null
)public static boolean isSystemTx(Repository.UnitOfWork transaction)
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)public static String komodoWorkspacePath(Repository.UnitOfWork uow)
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)public static String komodoProfilePath(Repository.UnitOfWork uow)
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)public static boolean isReservedPath(String path)
path
- the path to testpublic static String[] getReservedPaths(Repository.UnitOfWork transaction)
transaction
- public abstract KObjectFactory getObjectFactory()
getObjectFactory
in interface Repository
public abstract KPropertyFactory getPropertyFactory()
getPropertyFactory
in interface Repository
protected abstract KQueryManager getQueryManager()
public void registerKEngine(KEngine engine)
public KEngine getKEngine()
public MetadataInstance getMetadataInstance() throws KException
getMetadataInstance
in interface Repository
KException
protected void provision(Repository.UnitOfWork transaction, String nodePath, Repository.OperationType operationType) throws KException
transaction
- the transaction (cannot be null
)nodePath
- the path to a repository nodeoperationType
- the type of the operation to be performedKException
- if an error occurspublic void provision(Repository.UnitOfWork transaction, KomodoObject object, Repository.OperationType operationType) throws KException
provision
in interface Repository
KException
public KomodoObject add(Repository.UnitOfWork transaction, String parentPath, String name, String primaryType) throws KException
add
in interface Repository
KException
Repository.add(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String,
java.lang.String, java.lang.String)
public void addClient(KClient client)
addClient
in interface Repository
Repository.addClient(org.komodo.spi.KClient)
public void addObserver(RepositoryObserver observer)
addObserver
in interface Repository
Repository.addObserver(org.komodo.spi.repository.RepositoryObserver)
public List<KomodoObject> query(Repository.UnitOfWork transaction, String queryStatement) throws KException
query
in interface Repository
KException
Repository.query(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public List<KomodoObject> searchByKeyword(Repository.UnitOfWork transaction, String type, String property, Repository.KeywordCriteria keywordCriteria, String... keywords) throws KException
public List<KomodoObject> searchByType(Repository.UnitOfWork transaction, String... types) throws KException
searchByType
in interface Repository
KException
Repository.searchByType(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String[])
public List<KomodoObject> searchByPath(Repository.UnitOfWork transaction, String path) throws KException
searchByPath
in interface Repository
KException
Repository.searchByPath(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public KomodoObject getFromWorkspace(Repository.UnitOfWork transaction, String path) throws KException
getFromWorkspace
in interface Repository
KException
Repository.getFromWorkspace(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public Repository.Id getId()
getId
in interface Repository
Repository.getId()
public Repository.Type getType()
getType
in interface Repository
Repository.getType()
public KomodoObject getUsingId(Repository.UnitOfWork transaction, String jcrUuid) throws KException
getUsingId
in interface Repository
KException
Repository.getUsingId(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public ValidationManager getValidationManager() throws KException
getValidationManager
in interface Repository
KException
Repository.getValidationManager()
public void notify(RepositoryClientEvent event)
notify
in interface Repository
Repository.notify(org.komodo.spi.repository.RepositoryClientEvent)
protected void notifyObservers(KEvent<?> event)
protected void errorObservers(Throwable e)
public void publish(Repository.UnitOfWork transaction, boolean overwrite, ArtifactDescriptor descriptor, KomodoObject komodoObject) throws KException
publish
in interface Repository
KException
Repository.publish(org.komodo.spi.repository.Repository.UnitOfWork, boolean,
org.komodo.spi.repository.ArtifactDescriptor, org.komodo.spi.repository.KomodoObject)
public void remove(Repository.UnitOfWork transaction, String... paths) throws KException
remove
in interface Repository
KException
Repository.remove(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String[])
public void removeClient(KClient client)
removeClient
in interface Repository
Repository.removeClient(org.komodo.spi.KClient)
public void removeObserver(RepositoryObserver observer)
removeObserver
in interface Repository
Repository.removeObserver(org.komodo.spi.repository.RepositoryObserver)
public Artifact[] retrieve(Repository.UnitOfWork transaction, String... artifactPaths) throws KException
retrieve
in interface Repository
KException
Repository.retrieve(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String[])
public void unpublish(Repository.UnitOfWork transaction, String... artifactPaths) throws KException
unpublish
in interface Repository
KException
Repository.unpublish(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String[])
protected KomodoObject komodoRoot(Repository.UnitOfWork uow) throws KException
uow
- the transaction (can be null
if operation should be automatically committed)KException
- if an error occurspublic KomodoObject komodoEnvironment(Repository.UnitOfWork transaction) throws KException
komodoEnvironment
in interface Repository
KException
Repository.komodoEnvironment(org.komodo.spi.repository.Repository.UnitOfWork)
public KomodoObject komodoLibrary(Repository.UnitOfWork uow) throws KException
komodoLibrary
in interface Repository
KException
public KomodoObject komodoWorkspace(Repository.UnitOfWork uow) throws KException
komodoWorkspace
in interface Repository
KException
public KomodoObject komodoProfile(Repository.UnitOfWork uow) throws KException
komodoProfile
in interface Repository
KException
public KomodoObject komodoSearches(Repository.UnitOfWork transaction) throws KException
komodoSearches
in interface Repository
KException
public KomodoObject komodoProfiles(Repository.UnitOfWork transaction) throws KException
komodoProfiles
in interface Repository
KException
public KomodoObject komodoValidationRoot(Repository.UnitOfWork transaction) throws KException
komodoValidationRoot
in interface Repository
KException
Copyright © 2013–2019. All rights reserved.