public interface Repository
Modifier and Type | Interface and Description |
---|---|
static interface |
Repository.Id
A repository identifier.
|
static class |
Repository.KeywordCriteria
Library and workspace searches using keywords will use one of these criteria.
|
static class |
Repository.OperationType
The nature of the operation being conducted
and to be vetted by the security system
|
static class |
Repository.State
The repository state.
|
static class |
Repository.Type
The repository type.
|
static interface |
Repository.UnitOfWork
Represents one or more operations grouped together forming a
repository transaction. |
static interface |
Repository.UnitOfWorkListener
A listener notified when a unit of work completes.
|
Modifier and Type | Field and Description |
---|---|
static String |
SYSTEM_USER
System user for transactions to be executed internally
|
Modifier and Type | Method and Description |
---|---|
KomodoObject |
add(Repository.UnitOfWork transaction,
String parentPath,
String name,
String primaryType) |
void |
addClient(KClient client)
Add an
KClient to send/receive notifications to/from |
void |
addObserver(RepositoryObserver observer) |
Repository.UnitOfWork |
createTransaction(String userName,
String name,
boolean rollbackOnly,
Repository.UnitOfWorkListener callback,
String repoUser) |
KomodoObject |
getFromWorkspace(Repository.UnitOfWork transaction,
String path)
Get an object from the workspace part of the repository.
|
Repository.Id |
getId() |
MetadataInstance |
getMetadataInstance()
Get Metadata Instance
|
KObjectFactory |
getObjectFactory() |
KPropertyFactory |
getPropertyFactory() |
Repository.State |
getState() |
Repository.Type |
getType() |
KomodoObject |
getUsingId(Repository.UnitOfWork transaction,
String jcrUuid)
Gets the
KomodoObject with the specified identifier. |
ValidationManager |
getValidationManager() |
KomodoObject |
komodoEnvironment(Repository.UnitOfWork transaction)
The root of the Komodo environment area in the repository (i.e., /tko:komodo/tko:environment).
|
KomodoObject |
komodoLibrary(Repository.UnitOfWork transaction)
The komodo library in the repository, ie.
|
KomodoObject |
komodoProfile(Repository.UnitOfWork uow)
The komodo user's profile in the repository, ie.
|
KomodoObject |
komodoProfiles(Repository.UnitOfWork transaction) |
KomodoObject |
komodoSearches(Repository.UnitOfWork transaction)
The komodo workspace searches group in the repository, ie.
|
KomodoObject |
komodoValidationRoot(Repository.UnitOfWork transaction) |
KomodoObject |
komodoWorkspace(Repository.UnitOfWork transaction)
The komodo user's workspace in the repository, ie.
|
void |
notify(RepositoryClientEvent event)
Notify the repository of the given
RepositoryClientEvent |
boolean |
ping() |
void |
provision(Repository.UnitOfWork transaction,
KomodoObject object,
Repository.OperationType requestType)
Prepares the given object to be acted upon by the transaction, including testing if
such operation violates any security constraints and ensuring that a user-space is
available in the workspace.
|
void |
publish(Repository.UnitOfWork transaction,
boolean overwrite,
ArtifactDescriptor descriptor,
KomodoObject komodoObject) |
List<KomodoObject> |
query(Repository.UnitOfWork transaction,
String query) |
void |
remove(Repository.UnitOfWork transaction,
String... paths) |
void |
removeClient(KClient client)
Remove an
KClient that we no longer wish to receive notifications from |
void |
removeObserver(RepositoryObserver observer) |
Artifact[] |
retrieve(Repository.UnitOfWork transaction,
String... artifactPaths) |
List<KomodoObject> |
searchByKeyword(Repository.UnitOfWork transaction,
String type,
String property,
Repository.KeywordCriteria keywordCriteria,
String... keywords) |
List<KomodoObject> |
searchByPath(Repository.UnitOfWork transaction,
String path) |
List<KomodoObject> |
searchByType(Repository.UnitOfWork transaction,
String... types) |
void |
unpublish(Repository.UnitOfWork transaction,
String... artifactPaths) |
static final String SYSTEM_USER
void provision(Repository.UnitOfWork transaction, KomodoObject object, Repository.OperationType requestType) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)object
- the object to be acted uponrequestType
- the nature of the request being submitted, eg. read-only or writeable.KException
- if security failure occursKObjectFactory getObjectFactory()
KPropertyFactory getPropertyFactory()
KomodoObject add(Repository.UnitOfWork transaction, String parentPath, String name, String primaryType) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)parentPath
- the parent path where the workspace object is created (can be empty if adding at the root of the workspace)name
- the name of the object (cannot be empty)primaryType
- the primary type of the child or null
if type is nt:unstructured
null
)KException
- if the parent path does not exist or an error occursvoid addClient(KClient client)
KClient
to send/receive notifications to/fromclient
- void addObserver(RepositoryObserver observer)
observer
- the observer to be addedRepository.UnitOfWork createTransaction(String userName, String name, boolean rollbackOnly, Repository.UnitOfWorkListener callback, String repoUser) throws KException
userName
- the user name of the transaction initiatorname
- a name for the transaction (cannot be empty)rollbackOnly
- true
if the transaction should only be rolled backcallback
- a listener that is notified when the transaction is finished (can be null
null
)KException
- if an error occursList<KomodoObject> query(Repository.UnitOfWork transaction, String query) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)query
- the SQL queryKomodoObject
s resulting from the searchKException
- if error occursList<KomodoObject> searchByKeyword(Repository.UnitOfWork transaction, String type, String property, Repository.KeywordCriteria keywordCriteria, String... keywords) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)type
- the type of node to base the search onproperty
- the property which will contain the keywordskeywordCriteria
- the search criteria (can be null
if the default criteria should be used)keywords
- words that should be matched to words found in the description (can be empty)KomodoObject
s resulting from the searchKException
- if parent path does not exist or an error occursList<KomodoObject> searchByType(Repository.UnitOfWork transaction, String... types) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)types
- the primary or mixin types to search forKomodoObject
s resulting from the searchKException
- if parent path does not exist or an error occursList<KomodoObject> searchByPath(Repository.UnitOfWork transaction, String path) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)path
- the path to search forKomodoObject
s resulting from the searchKException
- if parent path does not exist or an error occursKomodoObject getFromWorkspace(Repository.UnitOfWork transaction, String path) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)path
- the path to the workspace object being requested (can be empty if the workspace root)null
if it does not exist)KException
- if an error occursKomodoObject getUsingId(Repository.UnitOfWork transaction, String jcrUuid) throws KException
KomodoObject
with the specified identifier.transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)jcrUuid
- the value of the jcr:uuid
property (cannot be empty)null
if not foundKException
- if an error occursRepository.Id getId()
null
)Repository.State getState()
null
)Repository.Type getType()
null
)ValidationManager getValidationManager() throws KException
null
)KException
- if an error occursvoid notify(RepositoryClientEvent event)
RepositoryClientEvent
event
- boolean ping()
true
if the repository can be communicated withvoid publish(Repository.UnitOfWork transaction, boolean overwrite, ArtifactDescriptor descriptor, KomodoObject komodoObject) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)overwrite
- true
if existing artifacts should be updateddescriptor
- the artifact descriptor (cannot be null
)komodoObject
- the Komodo object being added to the library (cannot be null
)KException
- if artifact already exists and not in overwrite mode or an error occursvoid remove(Repository.UnitOfWork transaction, String... paths) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)paths
- the paths of the workspace objects being removed (cannot be null
or empty)KException
- if a workspace path does not exist or an error occursvoid removeClient(KClient client)
KClient
that we no longer wish to receive notifications fromclient
- void removeObserver(RepositoryObserver observer)
observer
- the observer to be removedArtifact[] retrieve(Repository.UnitOfWork transaction, String... artifactPaths) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)artifactPaths
- the paths of the artifacts being requested (cannot be null
or empty)null
)KException
- if an artifact does not exist or an error occursvoid unpublish(Repository.UnitOfWork transaction, String... artifactPaths) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)artifactPaths
- the paths of the the artifacts being removed (cannot be null
or empty)KException
- if an artifact does not exist in the library or an error occursKomodoObject komodoSearches(Repository.UnitOfWork transaction) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)KException
- if an error occursKomodoObject komodoEnvironment(Repository.UnitOfWork transaction) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)null
)KException
- if an error occursKomodoObject komodoLibrary(Repository.UnitOfWork transaction) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)KException
- if an error occursKomodoObject komodoWorkspace(Repository.UnitOfWork transaction) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)KException
- if an error occursKomodoObject komodoProfile(Repository.UnitOfWork uow) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)KException
- if an error occursKomodoObject komodoValidationRoot(Repository.UnitOfWork transaction) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)KException
- if an error occursKomodoObject komodoProfiles(Repository.UnitOfWork transaction) throws KException
transaction
- the transaction (cannot be null
or have a state that is not
Repository.UnitOfWork.State.NOT_STARTED
)KException
- if an error occursMetadataInstance getMetadataInstance() throws KException
KException
Copyright © 2013–2019. All rights reserved.