public abstract class Sandbox
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Sandbox() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(SandboxListener listener)
Adds a sandbox listener.
|
void |
fireRepositoryChanged(RepositoryEvent e)
Sends out a
RepositoryEvent to all listeners and logs
the event. |
java.lang.String |
getBranchId(java.lang.String reposId)
Deprecated.
Please use
getRepositoryBranchId |
abstract SandboxConstraints |
getConstraints()
Returns the constraints associated with this sandbox if any.
|
java.lang.String |
getConstraintsSummary()
Returns the summary of constraints associated with this sandbox if any.
|
abstract java.lang.String |
getCreatedBy()
Returns the user who creates this sandbox.
|
abstract java.util.Date |
getCreationDate()
Gets the date when this sandbox was created.
|
abstract java.lang.String |
getDescription()
Gets the description of this sandbox.
|
abstract java.lang.String |
getId()
Gets the ID of this sandbox.
|
java.util.List<SandboxListener> |
getListeners()
Returns the list of listeners listening to this sandbox.
|
abstract java.lang.String |
getName()
Gets the name of this sandbox.
|
abstract SandboxLog |
getOperationLog()
Returns the log from the last sandbox operation.
|
abstract java.util.Date |
getPublishDate()
Returns the date when the changes in this sandbox were permanently merged
into the repositories.
|
abstract java.lang.String |
getPublishedBy()
Gets the name of the user that published this sandbox.
|
abstract java.util.Date |
getRefreshDate()
Returns the last date when the changes made in mainline were merged into
this sandbox.
|
abstract java.lang.String |
getRefreshedBy()
Returns the user who merged the changes made in mainline into this sandbox
by refreshing the sandbox
|
abstract MetadataRepositoryBaseline |
getRepositoryBaseline(java.lang.String reposId)
Gets the repository baseline of a repository branch in this sandbox.
|
abstract java.util.Date |
getRepositoryBranchDate(java.lang.String reposId)
Returns the time when a repository was branched for this sandbox.
|
abstract java.lang.String |
getRepositoryBranchId(java.lang.String reposId)
Returns the ID of the repository branch for this sandbox.
|
abstract java.util.Date |
getRepositoryRefreshDate(java.lang.String reposId)
Returns the time when a sandboxed repository was last refreshed.
|
abstract SandboxState |
getRepositoryState(java.lang.String reposId)
Gets the state of a repository in this sandbox.
|
abstract SandboxState |
getState()
Gets the state of this sandbox.
|
abstract java.util.Date |
getUpdateDate()
Gets the date when this sandbox was last updated.
|
abstract java.lang.String |
getUpdatedBy()
Returns the user who last updated this sandbox.
|
static Sandbox |
getUserSandbox()
Gets the sandbox associated with the current user.
|
abstract boolean |
hasConflict()
Returns
true if the last refresh/publish of this sandbox
reported conflict. |
boolean |
isAdministrator(java.lang.String userName)
Returns
true if a user is an administrator of this sandbox. |
abstract boolean |
isArchive()
Returns
true if the contents of this sandbox are from an
archive. |
abstract boolean |
isFeatureEnabled(java.lang.String featureClassName)
Returns
true if a given feature is enabled in this sandbox. |
abstract boolean |
isPrivate()
Returns
true if this sandbox is private. |
abstract boolean |
isPublishable()
Returns
true if this sandbox is publishable. |
abstract boolean |
isRefreshNeeded()
Returns
true if any participating repository needs to be
refreshed. |
abstract boolean |
isRefreshRequired()
Returns
true if this sandbox requires refresh. |
abstract boolean |
isRepositoryBranched(java.lang.String reposId)
Returns
true if the specified repository is branched for
this sandbox. |
boolean |
isVisualBuilderEnabled()
Returns
true if Visual Builder feature is enabled in this
sandbox and at least one associated repository used by the
feature reports changes. |
void |
removeListener(SandboxListener listener)
Removes a sandbox listener.
|
public static Sandbox getUserSandbox()
null
if there is no user session or no sandbox is associated with the
current userpublic void addListener(SandboxListener listener)
listener
- the sandbox listenerjava.lang.IllegalArgumentException
- if the given listener is nullpublic void removeListener(SandboxListener listener)
listener
- the sandbox listener to be removedpublic java.util.List<SandboxListener> getListeners()
public void fireRepositoryChanged(RepositoryEvent e)
RepositoryEvent
to all listeners and logs
the event.e
- the repository eventpublic abstract boolean isArchive()
true
if the contents of this sandbox are from an
archive.true
if the contents of this sandbox are from an
archivepublic abstract boolean hasConflict()
true
if the last refresh/publish of this sandbox
reported conflict.true
if the contents of this sandbox are conflicting
with mainline.public abstract boolean isPrivate()
true
if this sandbox is private. A private sandbox
can only be accessed by its owner.true
if this sandbox is privatepublic abstract boolean isPublishable()
true
if this sandbox is publishable. If a sandbox is
not publishable, it cannot be published.true
if this sandbox is publishablepublic abstract boolean isRefreshRequired()
true
if this sandbox requires refresh. If a sandbox
requires refresh, it should not be used. Usually a refresh is required when
mainline is patched and sandbox should be refreshed before it is be used.true
if this sandbox requies refreshpublic abstract boolean isFeatureEnabled(java.lang.String featureClassName)
true
if a given feature is enabled in this sandbox.featureClassName
- the fully qualified name of the feature classtrue
if the feature is enabled in this sandboxpublic abstract boolean isRefreshNeeded()
true
if any participating repository needs to be
refreshed.true
if any participating repository needs to be
refreshed@Deprecated public java.lang.String getBranchId(java.lang.String reposId)
getRepositoryBranchId
reposId
- the ID of the repositorypublic abstract boolean isRepositoryBranched(java.lang.String reposId)
true
if the specified repository is branched for
this sandbox.reposId
- the ID of the repositorytrue
if the specified repository is branched for
this sandboxpublic abstract java.util.Date getRepositoryBranchDate(java.lang.String reposId)
reposId
- the repository IDpublic abstract java.lang.String getRepositoryBranchId(java.lang.String reposId)
reposId
- the ID of the repositorypublic abstract java.util.Date getRepositoryRefreshDate(java.lang.String reposId)
reposId
- the repository IDpublic abstract MetadataRepositoryBaseline getRepositoryBaseline(java.lang.String reposId)
reposId
- the ID of the repositorynull
if such information is unavailablepublic abstract SandboxState getRepositoryState(java.lang.String reposId)
reposId
- the repository IDpublic abstract java.lang.String getId()
public abstract java.lang.String getName()
public abstract java.lang.String getDescription()
public abstract SandboxState getState()
public abstract java.util.Date getCreationDate()
public abstract java.lang.String getCreatedBy()
public abstract java.util.Date getUpdateDate()
public abstract java.lang.String getUpdatedBy()
public abstract java.util.Date getRefreshDate()
null
if this sandbox has never been
updated since creationpublic abstract java.lang.String getRefreshedBy()
null
if this sandbox has never been
refreshed since creationpublic abstract SandboxLog getOperationLog()
null
if not
availablepublic abstract java.util.Date getPublishDate()
null
if this sandbox is still activepublic abstract java.lang.String getPublishedBy()
public abstract SandboxConstraints getConstraints()
null
if
this sandbox does not have any constraintspublic java.lang.String getConstraintsSummary()
null
if this sandbox does not have any constraints
or the constraints have not been summarizedpublic boolean isAdministrator(java.lang.String userName)
true
if a user is an administrator of this sandbox.userName
- the user to be checkedtrue
if the user is an administrator of this sandboxjava.lang.IllegalArgumentException
- if the user name is nullpublic boolean isVisualBuilderEnabled()
true
if Visual Builder feature is enabled in this
sandbox and at least one associated repository used by the
feature reports changes.true
if Visual Builder feature is enabled in this
sandbox and at least one associated repository used by the
eature reports changesjava.lang.UnsupportedOperationException
- if this method is not supportedAssociatedRepository
,
RepositoryAssociation