|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.webdav.jcr.WorkspaceResourceImpl
public class WorkspaceResourceImpl
WorkspaceResourceImpl...
| Field Summary | |
|---|---|
protected boolean |
initedProps
|
protected DavPropertySet |
properties
|
protected SupportedLock |
supportedLock
|
protected SupportedReportSetProperty |
supportedReports
|
| Fields inherited from interface org.apache.jackrabbit.webdav.version.WorkspaceResource |
|---|
BASELINE_CONTROLLED_COLLECTION_SET, CUURENT_ACTIVITY_SET, WORKSPACE_CHECKOUT_SET |
| Fields inherited from interface org.apache.jackrabbit.webdav.version.VersionControlledResource |
|---|
ACTIVITY_SET, AUTO_MERGE_SET, AUTO_VERSION, BASELINE_CONTROLLED_COLLECTION, ECLIPSED_SET, CHECKED_IN, CHECKED_OUT, CHECKIN_FORK, CHECKOUT_FORK, MERGE_SET, methods_checkedIn, methods_checkedOut, PREDECESSOR_SET, SUBBASELINE_SET, UNRESERVED, VERSION_HISTORY |
| Fields inherited from interface org.apache.jackrabbit.webdav.version.VersionableResource |
|---|
METHODS |
| Fields inherited from interface org.apache.jackrabbit.webdav.version.DeltaVResource |
|---|
METHODS_INCL_MKWORKSPACE |
| Fields inherited from interface org.apache.jackrabbit.webdav.transaction.TransactionResource |
|---|
METHODS |
| Fields inherited from interface org.apache.jackrabbit.webdav.search.SearchResource |
|---|
METHODS |
| Method Summary | |
|---|---|
void |
addLockManager(LockManager lockMgr)
|
void |
addMember(DavResource resource,
InputContext inputContext)
Throws 403 exception (Forbidden) |
void |
addVersionControl()
|
void |
addWorkspace(DavResource workspace)
The JCR api does not provide methods to create new workspaces. |
MultiStatusResponse |
alterProperties(DavPropertySet setProperties,
DavPropertyNameSet removePropertyNames)
Builds a single List from the properties to set and the properties to remove and delegates the list to AbstractResource.alterProperties(List); |
MultiStatusResponse |
alterProperties(List changeList)
Handles an attempt to set ItemResourceConstants.JCR_NAMESPACES
and forwards any other set or remove requests to the super class. |
void |
copy(DavResource destination,
boolean shallow)
Throws HttpServletResponse.SC_METHOD_NOT_ALLOWED |
protected DavResource |
createResourceFromLocator(DavResourceLocator loc)
Create a new DavResource from the given locator. |
boolean |
exists()
|
DavResource |
getCollection()
Retrieve the collection that has all workspace collections as internal members. |
String |
getComplianceClass()
Returns a string listing the compliance classes for this resource as it is required for the DAV response header. |
String |
getDisplayName()
Returns the name of the workspace. |
DavResourceFactory |
getFactory()
|
String |
getHref()
|
DavResourceLocator |
getLocator()
|
protected DavResourceLocator |
getLocatorFromItem(javax.jcr.Item repositoryItem)
Build a new DavResourceLocator from the given repository item. |
protected DavResourceLocator |
getLocatorFromItemPath(String itemPath)
Build a DavResourceLocator from the given itemPath path. |
ActiveLock |
getLock(Type type,
Scope scope)
|
ActiveLock[] |
getLocks()
|
DavResourceIterator |
getMembers()
Returns the resource representing the JCR root node. |
long |
getModificationTime()
Always returns 'now' |
OptionsResponse |
getOptionResponse(OptionsInfo optionsInfo)
|
DavPropertySet |
getProperties()
|
DavProperty |
getProperty(DavPropertyName name)
|
DavPropertyName[] |
getPropertyNames()
|
QueryGrammerSet |
getQueryGrammerSet()
|
DavResource[] |
getReferenceResources(DavPropertyName hrefPropertyName)
Return an array of DavResource objects that are referenced
by the property with the specified name. |
Report |
getReport(ReportInfo reportInfo)
|
protected javax.jcr.Session |
getRepositorySession()
Shortcut for getSession().getRepositorySession() |
String |
getResourcePath()
Returns the path of the underlying repository item or the item to be created (PUT/MKCOL). |
DavSession |
getSession()
|
String |
getSupportedMethods()
|
String |
getTransactionId()
|
VersionHistoryResource |
getVersionHistory()
|
protected String |
getWorkspaceHref()
Retrieve the href of the workspace the current session belongs to. |
boolean |
hasLock(Type type,
Scope scope)
Returns true if this resource has a lock applied with the given type and scope. |
String |
checkin()
|
void |
checkout()
|
void |
init(TxLockManager txMgr,
String transactionId)
|
protected void |
initLockSupport()
Define the set of locks supported by this resource. |
protected void |
initProperties()
Fill the set of default properties |
protected void |
initSupportedReports()
Define the set of reports supported by this resource. |
boolean |
isCollection()
|
boolean |
isLockable(Type type,
Scope scope)
Returns true, if the SupportedLock property contains an entry
with the given type and scope. |
void |
label(LabelInfo labelInfo)
|
ActiveLock |
lock(LockInfo reqLockInfo)
|
MultiStatus |
merge(MergeInfo mergeInfo)
|
void |
move(DavResource destination)
Throws HttpServletResponse.SC_METHOD_NOT_ALLOWED |
ActiveLock |
refreshLock(LockInfo info,
String lockToken)
Only transaction lock may be available on this resource. |
void |
removeMember(DavResource member)
Throws 403 exception (Forbidden) |
void |
removeProperty(DavPropertyName propertyName)
Throws HttpServletResponse.SC_METHOD_NOT_ALLOWED |
MultiStatus |
search(SearchInfo sInfo)
|
void |
setProperty(DavProperty property)
Allows to alter the registered namespaces ( ItemResourceConstants.JCR_NAMESPACES) and
forwards any other property to the super class. |
void |
spool(OutputContext outputContext)
Sets content lengths to '0' and retrieves the modification time. |
void |
uncheckout()
|
void |
unlock(String lockToken)
Throws HttpServletResponse.SC_METHOD_NOT_ALLOWED since only transaction
locks may be present on this resource, that need to be released by calling
TransactionResource.unlock(String, org.apache.jackrabbit.webdav.transaction.TransactionInfo). |
void |
unlock(String lockToken,
TransactionInfo tInfo)
|
MultiStatus |
update(UpdateInfo updateInfo)
While RFC 3253 does not define any version-related operations for the workspace resource, this implementation uses VersionControlledResource.update(UpdateInfo)
to map Workspace.restore(javax.jcr.version.Version[], boolean) to
a WebDAV call. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.jackrabbit.webdav.version.DeltaVResource |
|---|
addWorkspace, getOptionResponse, getReferenceResources, getReport |
| Methods inherited from interface org.apache.jackrabbit.webdav.DavResource |
|---|
addLockManager, alterProperties, copy, getComplianceClass, getFactory, getHref, getLocator, getLock, getLocks, getProperties, getProperty, getPropertyNames, getResourcePath, getSession, hasLock, isLockable, lock, move, refreshLock, removeProperty, unlock |
| Field Detail |
|---|
protected boolean initedProps
protected DavPropertySet properties
protected SupportedLock supportedLock
protected SupportedReportSetProperty supportedReports
| Method Detail |
|---|
public String getSupportedMethods()
getSupportedMethods in interface DavResourcepublic boolean exists()
exists in interface DavResourcepublic boolean isCollection()
isCollection in interface DavResourcepublic String getDisplayName()
getDisplayName in interface DavResourceDavResource.getDisplayName(),
Workspace.getName()public long getModificationTime()
getModificationTime in interface DavResource
public void spool(OutputContext outputContext)
throws IOException
spool in interface DavResourceoutputContext -
IOExceptionpublic DavResource getCollection()
getCollection in interface DavResourceDavResource.getCollection()
public void addMember(DavResource resource,
InputContext inputContext)
throws DavException
addMember in interface DavResourceresource - inputContext -
DavExceptionpublic DavResourceIterator getMembers()
getMembers in interface DavResource
public void removeMember(DavResource member)
throws DavException
removeMember in interface DavResourcemember -
DavException
public void setProperty(DavProperty property)
throws DavException
ItemResourceConstants.JCR_NAMESPACES) and
forwards any other property to the super class.
Note that again no property status is set. Any failure while setting
a property results in an exception (violating RFC 2518).
setProperty in interface DavResourceproperty -
DavExceptionDavResource.setProperty(org.apache.jackrabbit.webdav.property.DavProperty)
public MultiStatusResponse alterProperties(List changeList)
throws DavException
ItemResourceConstants.JCR_NAMESPACES
and forwards any other set or remove requests to the super class.
alterProperties in interface DavResourceDavExceptionsetProperty(DavProperty),
AbstractResource.alterProperties(org.apache.jackrabbit.webdav.property.DavPropertySet, org.apache.jackrabbit.webdav.property.DavPropertyNameSet)
public void addVersionControl()
throws DavException
addVersionControl in interface VersionableResourceDavException - (403) since workspace is not versionable. implementing
VersionControlledResource only for 'update'.
public String checkin()
throws DavException
checkin in interface VersionControlledResourceDavException - (403) since workspace is not versionable. implementing
VersionControlledResource only for 'update'.
public void checkout()
throws DavException
checkout in interface VersionControlledResourceDavException - (403) since workspace is not versionable. implementing
VersionControlledResource only for 'update'.
public void uncheckout()
throws DavException
uncheckout in interface VersionControlledResourceDavException - (403) since workspace is not versionable. implementing
VersionControlledResource only for 'update'.
public MultiStatus update(UpdateInfo updateInfo)
throws DavException
VersionControlledResource.update(UpdateInfo)
to map Workspace.restore(javax.jcr.version.Version[], boolean) to
a WebDAV call.
Limitation: note that the MultiStatus returned by this method
will not list any nodes that have been removed due to an Uuid conflict.
update in interface VersionControlledResourceupdateInfo -
DavExceptionVersionControlledResource.update(org.apache.jackrabbit.webdav.version.UpdateInfo)
public MultiStatus merge(MergeInfo mergeInfo)
throws DavException
merge in interface VersionControlledResourceDavException - (403) since workspace is not versionable. implementing
VersionControlledResource only for 'update'.
public void label(LabelInfo labelInfo)
throws DavException
label in interface VersionControlledResourceDavException - (403) since workspace is not versionable. implementing
VersionControlledResource only for 'update'.
public VersionHistoryResource getVersionHistory()
throws DavException
getVersionHistory in interface VersionControlledResourceDavException - (403) since workspace is not versionable. implementing
VersionControlledResource only for 'update'.protected void initLockSupport()
SupportedLockprotected void initSupportedReports()
SupportedReportSetProperty,
AbstractResource.initSupportedReports()protected String getWorkspaceHref()
protected void initProperties()
public String getComplianceClass()
getComplianceClass in interface DavResourceDavResource.getComplianceClass()public DavResourceLocator getLocator()
getLocator in interface DavResourceDavResource.getLocator()public String getResourcePath()
null is returned.
getResourcePath in interface DavResourceDavResource.getResourcePath(),
DavResourceLocator.getResourcePath()public String getHref()
getHref in interface DavResourceDavResource.getHref(),
DavResourceLocator.getHref(boolean)public DavPropertyName[] getPropertyNames()
getPropertyNames in interface DavResourceDavResource.getPropertyNames()public DavProperty getProperty(DavPropertyName name)
getProperty in interface DavResourceDavResource.getProperty(org.apache.jackrabbit.webdav.property.DavPropertyName)public DavPropertySet getProperties()
getProperties in interface DavResourceDavResource.getProperties()
public void removeProperty(DavPropertyName propertyName)
throws DavException
HttpServletResponse.SC_METHOD_NOT_ALLOWED
removeProperty in interface DavResourcepropertyName -
DavException - Always throws HttpServletResponse.SC_METHOD_NOT_ALLOWEDDavResource.removeProperty(org.apache.jackrabbit.webdav.property.DavPropertyName)
public MultiStatusResponse alterProperties(DavPropertySet setProperties,
DavPropertyNameSet removePropertyNames)
throws DavException
AbstractResource.alterProperties(List);
alterProperties in interface DavResourceDavExceptionDavResource.alterProperties(org.apache.jackrabbit.webdav.property.DavPropertySet, org.apache.jackrabbit.webdav.property.DavPropertyNameSet)
public void move(DavResource destination)
throws DavException
HttpServletResponse.SC_METHOD_NOT_ALLOWED
move in interface DavResourcedestination -
DavException - Always throws HttpServletResponse.SC_METHOD_NOT_ALLOWEDDavResource.move(org.apache.jackrabbit.webdav.DavResource)
public void copy(DavResource destination,
boolean shallow)
throws DavException
HttpServletResponse.SC_METHOD_NOT_ALLOWED
copy in interface DavResourcedestination - shallow -
DavException - Always throws HttpServletResponse.SC_METHOD_NOT_ALLOWEDDavResource.copy(org.apache.jackrabbit.webdav.DavResource, boolean)
public boolean isLockable(Type type,
Scope scope)
SupportedLock property contains an entry
with the given type and scope. By default resources allow for transaction lock only.
isLockable in interface DavResourcetype - scope -
DavResource.isLockable(org.apache.jackrabbit.webdav.lock.Type, org.apache.jackrabbit.webdav.lock.Scope)
public boolean hasLock(Type type,
Scope scope)
hasLock in interface DavResourcetype - scope -
DavResource.hasLock(Type, Scope)
public ActiveLock getLock(Type type,
Scope scope)
getLock in interface DavResourceDavResource.getLock(Type, Scope)public ActiveLock[] getLocks()
getLocks in interface DavResourcetodo improve....
public ActiveLock lock(LockInfo reqLockInfo)
throws DavException
lock in interface DavResourceDavExceptionDavResource.lock(org.apache.jackrabbit.webdav.lock.LockInfo)
public ActiveLock refreshLock(LockInfo info,
String lockToken)
throws DavException
refreshLock in interface DavResourceinfo - lockToken -
DavExceptionDavResource.refreshLock(org.apache.jackrabbit.webdav.lock.LockInfo, String)
public void unlock(String lockToken)
throws DavException
HttpServletResponse.SC_METHOD_NOT_ALLOWED since only transaction
locks may be present on this resource, that need to be released by calling
TransactionResource.unlock(String, org.apache.jackrabbit.webdav.transaction.TransactionInfo).
unlock in interface DavResourcelockToken -
DavException - Always throws HttpServletResponse.SC_METHOD_NOT_ALLOWEDpublic void addLockManager(LockManager lockMgr)
addLockManager in interface DavResourceDavResource.addLockManager(org.apache.jackrabbit.webdav.lock.LockManager)public DavResourceFactory getFactory()
getFactory in interface DavResourceDavResource.getFactory()public DavSession getSession()
getSession in interface DavResourceDavResource.getSession(),
DavResource.getSession()
public void init(TxLockManager txMgr,
String transactionId)
init in interface TransactionResourceTransactionResource.init(TxLockManager, String)
public void unlock(String lockToken,
TransactionInfo tInfo)
throws DavException
unlock in interface TransactionResourceDavExceptionTransactionResource.unlock(String, org.apache.jackrabbit.webdav.transaction.TransactionInfo)public String getTransactionId()
getTransactionId in interface TransactionResourceTransactionResource.getTransactionId()public OptionsResponse getOptionResponse(OptionsInfo optionsInfo)
getOptionResponse in interface DeltaVResourceoptionsInfo -
nullDeltaVResource.getOptionResponse(org.apache.jackrabbit.webdav.version.OptionsInfo)
public Report getReport(ReportInfo reportInfo)
throws DavException
getReport in interface DeltaVResourcereportInfo -
DavExceptionDeltaVResource.getReport(org.apache.jackrabbit.webdav.version.report.ReportInfo)
public void addWorkspace(DavResource workspace)
throws DavException
addWorkspace on this resource will always fail.
addWorkspace in interface DeltaVResourceworkspace -
DavException - Always throws.DeltaVResource.addWorkspace(org.apache.jackrabbit.webdav.DavResource)
public DavResource[] getReferenceResources(DavPropertyName hrefPropertyName)
throws DavException
DavResource objects that are referenced
by the property with the specified name.
getReferenceResources in interface DeltaVResourcehrefPropertyName -
DavResources
DavExceptionDeltaVResource.getReferenceResources(org.apache.jackrabbit.webdav.property.DavPropertyName)public QueryGrammerSet getQueryGrammerSet()
getQueryGrammerSet in interface SearchResourceSearchResource.getQueryGrammerSet()
public MultiStatus search(SearchInfo sInfo)
throws DavException
search in interface SearchResourcesInfo -
DavExceptionSearchResource.search(org.apache.jackrabbit.webdav.search.SearchInfo)
protected DavResource createResourceFromLocator(DavResourceLocator loc)
throws DavException
DavResource from the given locator.
loc -
DavResource
DavExceptionprotected DavResourceLocator getLocatorFromItemPath(String itemPath)
DavResourceLocator from the given itemPath path.
itemPath -
DavResourceLocatorDavLocatorFactory.createResourceLocator(String, String, String)protected DavResourceLocator getLocatorFromItem(javax.jcr.Item repositoryItem)
DavResourceLocator from the given repository item.
repositoryItem -
getLocatorFromItemPath(String)protected javax.jcr.Session getRepositorySession()
getSession().getRepositorySession()
AbstractResource.session.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||