|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softwareag.mdm.instance.Repository
Represents a particular webMethods MDM repository.
In webMethods MDM, Master Data life-cycle is organized and managed through branches and versions. Branches and versions are also called homes, their main properties are the following:
A home is represented by an instance of class AdaptationHome
.
Any update on the repository may only happen in the context of one branch. Hence a branch is a set of contents that may be modified: existing content may be modified or deleted, new content may be created.
The main feature that a branch provides is isolation: any scoped content in the branch will not be impacted by updates outside this branch, and reversely any updates inside the branch will not modify scoped contents in other branches.
The repository has always at least a branch called Reference
.
Except Reference branch, any branch is created from another branch, it is called its parent branch.
It has also always an initial version which is automatically created from the parent branch
(this version is needed for computing the change set of the branch).
A version is a snapshot of a repository. Its content has the guarantee to remain unchanged : that is, no update can occur inside it and it is fully isolated from modifications done in other branches.
A branch is always created from a branch, it is called its parent branch.
When the thread is running inside an webMethods MDM container, or with a
ServiceContext
, then its
context is on a particular home
.
If it needs to access to the repository,
it must call AdaptationHome.getRepository()
.
Otherwise, in an external program that does not have access to a current webMethods MDM context
(for example a ProgrammaticService
),
the thread must call getDefault()
to get the default repository instance.
In webMethods MDM, three execution modes guarantee a fully committed view on data, an isolation level that is equivalent to SERIALIZABLE (the highest isolation level in ANSI/ISO SQL):
Procedure
container;lock(AdaptationHome, boolean, Session)
);Outside these execution modes, isolation level corresponds to "READ UNCOMMITTED". This low isolation level implies that the client code can perform "dirty reads"; for example an occurrence can be modified (or created or deleted) by a concurrent thread and this modification (respectively creation, deletion) is possibly viewed by the client code.
In webMethods MDM, committed data are not required by nature to be consistent regarding their validation
state (see method Adaptation.getValidationReport()
). The main reasons are:
For all use cases that require a stable and consistent view, it is mandatory:
validation report
ha no errors;
AdaptationHome
Field Summary | |
static BranchKey |
REFERENCE
Identifies the Reference Branch. |
Method Summary | |
abstract void |
closeHome(AdaptationHome aHome,
Session aSession)
Closes the home specified. |
abstract AdaptationHome |
createHome(AdaptationHome parentBranch,
HomeKey aKey,
Profile owner,
Session aSession,
UserMessage aLabel,
UserMessage aDescription)
Creates the home specified. |
abstract Session |
createSessionFromArray(Object[] args)
Instantiates a session from an open array. |
abstract Session |
createSessionFromHttpRequest(HttpServletRequest httpServletRequest)
Instantiates a session from an HTTP request. |
abstract Session |
createSessionFromLoginPassword(String login,
String password)
Instantiates a session from the login and password specified. |
abstract RepositoryDeclaration |
getDeclaration()
Returns general management information on this repository. |
static Repository |
getDefault()
Returns the default instance of this class. |
abstract AdaptationHome |
getReferenceBranch()
Returns the Reference Branch. |
abstract void |
lock(AdaptationHome aBranch,
boolean lockParentBranch,
Session aSession)
Locks the branch specified. |
abstract void |
lock(AdaptationHome aBranch,
boolean lockParentBranch,
String aComment,
Session aSession)
Locks the branch specified. |
abstract AdaptationHome |
lookupHome(HomeKey aKey)
Returns the home specified. |
abstract List |
refreshSchemas(boolean isFullRefresh)
Refreshes schemas and their associated contents loaded in the cache. |
abstract void |
setDocumentationDescription(AdaptationHome aHome,
String aDescription,
Locale aLocale,
Session aSession)
Sets the documentation label for the home specified. |
abstract void |
setDocumentationLabel(AdaptationHome aHome,
String aLabel,
Locale aLocale,
Session aSession)
Sets the documentation label for the home specified. |
abstract String |
toStringInfo()
|
abstract void |
unlock(AdaptationHome aBranch,
boolean unlockParentBranch,
Session aSession)
Unlocks the branch specified. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final BranchKey REFERENCE
getReferenceBranch()
Method Detail |
public static Repository getDefault()
public abstract AdaptationHome getReferenceBranch()
The Reference Branch is always defined and it has no parent.
A call to this method is the same as lookupHome(Repository.REFERENCE)
.
public abstract AdaptationHome lookupHome(HomeKey aKey)
null
if the home specified does not exist.
public abstract AdaptationHome createHome(AdaptationHome parentBranch, HomeKey aKey, Profile owner, Session aSession, UserMessage aLabel, UserMessage aDescription) throws OperationException
Note: this method cannot be called inside a procedure execution (because of transaction management restrictions).
parentBranch
- branch from which the new home will be created.aKey
- specifies the identifier of the new home.owner
- specifies the owner of the new home.aSession
- session that performs the creation.aLabel
- specifies the label of the new home, null
is accepted.aDescription
- specifies the description of the new home, null
is accepted.
IllegalArgumentException
- if aKey does not conform to HomeKey.MAX_KEY_LENGTH
and HomeKey.KEY_PATTERN
.
OperationException
- thrown if creation cannot complete (for example, parentBranch
is a version,
home identifier already exists, session has not the permission to create the home, this method
is called inside a procedure execution, etc.).public abstract void lock(AdaptationHome aBranch, boolean lockParentBranch, Session aSession) throws OperationException
Note: this method cannot be called inside a procedure execution (because of transaction management restrictions).
aBranch
- branch to lock.lockParentBranch
- if true
, locks also the parent branch.aSession
- session that performs the locking.
IllegalArgumentException
- if aBranch
is null
, is not a branch, etc.
OperationException
- thrown if operation cannot complete.public abstract void lock(AdaptationHome aBranch, boolean lockParentBranch, String aComment, Session aSession) throws OperationException
Note: this method cannot be called inside a procedure execution (because of transaction management restrictions).
aBranch
- branch to lock.lockParentBranch
- if true
, locks also the parent branch.aComment
- comment.aSession
- session that performs the locking.
IllegalArgumentException
- if aBranch
is null
, is not a branch, etc.
OperationException
- thrown if operation cannot complete.lock(AdaptationHome, boolean, String, Session)
public abstract void unlock(AdaptationHome aBranch, boolean unlockParentBranch, Session aSession) throws OperationException
Note: this method cannot be called inside a procedure execution (because of transaction management restrictions).
aBranch
- branch to unlock.unlockParentBranch
- if true
, unlocks also the parent branch.aSession
- session that performs the unlocking.
IllegalArgumentException
- if aBranch
is null
, is not a branch, etc.
OperationException
- thrown if operation cannot complete.public abstract void setDocumentationLabel(AdaptationHome aHome, String aLabel, Locale aLocale, Session aSession) throws OperationException
Note: this method cannot be called inside a procedure execution (because of transaction management restrictions).
aHome
- home on which the label must be changed.aLabel
- new label for the home.aLocale
- locale of the label.
Note : only Locale("fr","FR") and Locale("en,"US") are supported for a display via the ManageraSession
- session that performs the documentation change.
IllegalArgumentException
- if aHome
or locale
are null
.
OperationException
- thrown if operation cannot complete.public abstract void setDocumentationDescription(AdaptationHome aHome, String aDescription, Locale aLocale, Session aSession) throws OperationException
Note: this method cannot be called inside a procedure execution (because of transaction management restrictions).
aHome
- home on which the label must be changed.aDescription
- new description for the home.aLocale
- locale of the label.
Note : only Locale("fr","FR") and Locale("en,"US") are supported for a display via the manageraSession
- session that performs the documentation change.
IllegalArgumentException
- if aHome
or locale
are null
.
OperationException
- thrown if operation cannot complete.public abstract void closeHome(AdaptationHome aHome, Session aSession) throws OperationException
Once a home has been closed, it cannot be viewed by normal users. However its content is not removed from repository.
Note: this method cannot be called inside a procedure execution (because of transaction management restrictions).
aHome
- home to close.aSession
- session that performs the close, associated user must be allowed to perform the operation.
IllegalArgumentException
- if aHome
is null
.
OperationException
- thrown if operation cannot complete.public abstract Session createSessionFromLoginPassword(String login, String password)
This method calls method
Directory.authenticateUserFromLoginPassword(String, String)
.
null
if login does not exist or password is incorrect.public abstract Session createSessionFromHttpRequest(HttpServletRequest httpServletRequest) throws AuthenticationException
This method calls method
Directory.authenticateUserFromHttpRequest(HttpServletRequest httpServletRequest)
.
null
if authentication features are not provided in the request.
AuthenticationException
- if authentication cannot complete.public abstract Session createSessionFromArray(Object[] args)
This method calls method
Directory.authenticateUserFromArray(Object[])
.
null
if no user can be authenticated.public abstract RepositoryDeclaration getDeclaration()
public abstract List refreshSchemas(boolean isFullRefresh)
isFullRefresh
- if true
, all known schemas are invalidated, if false
only schemas which have been updated since their last loading are invalidated.
SchemaLocation
, the schemas that
have been actually refreshed.public abstract String toStringInfo()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.