jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r711567 - in /jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr: AbstractResource.java ItemResourceConstants.java
Date Wed, 05 Nov 2008 13:49:28 GMT
Author: angela
Date: Wed Nov  5 05:49:28 2008
New Revision: 711567

URL: http://svn.apache.org/viewvc?rev=711567&view=rev
Log:
JCR-1842: RepositoryService.obtain should allow to pass null workspaceName [...]
fix indention

Modified:
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/ItemResourceConstants.java

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java?rev=711567&r1=711566&r2=711567&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java
Wed Nov  5 05:49:28 2008
@@ -85,23 +85,23 @@
  * resources.
  */
 abstract class AbstractResource implements DavResource, TransactionResource,
-    DeltaVResource, SearchResource {
+        DeltaVResource, SearchResource {
 
     private static Logger log = LoggerFactory.getLogger(AbstractResource.class);
 
     private static final String COMPLIANCE_CLASSES =
-        DavCompliance.concatComplianceClasses(new String[] {
-        DavCompliance._1_,
-        DavCompliance._2_,
-        DavCompliance._3_,
-        DavCompliance.VERSION_CONTROL,
-        DavCompliance.VERSION_HISTORY,
-        DavCompliance.CHECKOUT_IN_PLACE,
-        DavCompliance.LABEL,
-        DavCompliance.MERGE,
-        DavCompliance.UPDATE,
-        DavCompliance.WORKSPACE
-    });
+            DavCompliance.concatComplianceClasses(new String[] {
+                    DavCompliance._1_,
+                    DavCompliance._2_,
+                    DavCompliance._3_,
+                    DavCompliance.VERSION_CONTROL,
+                    DavCompliance.VERSION_HISTORY,
+                    DavCompliance.CHECKOUT_IN_PLACE,
+                    DavCompliance.LABEL,
+                    DavCompliance.MERGE,
+                    DavCompliance.UPDATE,
+                    DavCompliance.WORKSPACE
+            });
 
     private final DavResourceLocator locator;
     private final JcrDavSession session;
@@ -229,8 +229,8 @@
      * @see DavResource#alterProperties(org.apache.jackrabbit.webdav.property.DavPropertySet,
org.apache.jackrabbit.webdav.property.DavPropertyNameSet)
      */
     public MultiStatusResponse alterProperties(DavPropertySet setProperties,
-                                DavPropertyNameSet removePropertyNames)
-        throws DavException {
+                                               DavPropertyNameSet removePropertyNames)
+            throws DavException {
         List changeList = new ArrayList();
         if (removePropertyNames != null) {
             DavPropertyNameIterator it = removePropertyNames.iterator();
@@ -442,7 +442,7 @@
             // DAV:workspace-collection-set is supported.
             if (optionsInfo.containsElement(DeltaVConstants.XML_VH_COLLECTION_SET, DeltaVConstants.NAMESPACE))
{
                 String[] hrefs = new String[] {
-                    getLocatorFromItemPath(ItemResourceConstants.VERSIONSTORAGE_PATH).getHref(true)
+                        getLocatorFromItemPath(ItemResourceConstants.VERSIONSTORAGE_PATH).getHref(true)
                 };
                 oR.addEntry(DeltaVConstants.XML_VH_COLLECTION_SET, DeltaVConstants.NAMESPACE,
hrefs);
             }
@@ -595,18 +595,22 @@
 
         properties.add(new SupportedMethodSetProperty(getSupportedMethods().split(",\\s")));
 
-	// DeltaV properties
-	properties.add(supportedReports);
-	// creator-displayname, comment: not value available from jcr
-	properties.add(new DefaultDavProperty(DeltaVConstants.CREATOR_DISPLAYNAME, null, true));
-	properties.add(new DefaultDavProperty(DeltaVConstants.COMMENT, null, true));
-
-	// 'workspace' property as defined by RFC 3253
-	String workspaceHref = getWorkspaceHref();
-	if (workspaceHref != null) {
-	    properties.add(new HrefProperty(DeltaVConstants.WORKSPACE, workspaceHref, true));
-	}
-	// TODO: required supported-live-property-set
+        // DeltaV properties
+        properties.add(supportedReports);
+        // creator-displayname, comment: not value available from jcr
+        properties.add(new DefaultDavProperty(DeltaVConstants.CREATOR_DISPLAYNAME, null,
true));
+        properties.add(new DefaultDavProperty(DeltaVConstants.COMMENT, null, true));
+
+        // 'workspace' property as defined by RFC 3253
+        String workspaceHref = getWorkspaceHref();
+        if (workspaceHref != null) {
+            properties.add(new HrefProperty(DeltaVConstants.WORKSPACE, workspaceHref, true));
+        }
+        // name of the jcr workspace
+        properties.add(new DefaultDavProperty(ItemResourceConstants.JCR_WORKSPACE_NAME,
+                getRepositorySession().getWorkspace().getName()));
+
+        // TODO: required supported-live-property-set
     }
 
     /**
@@ -685,11 +689,11 @@
     protected void initSupportedReports() {
         if (exists()) {
             supportedReports = new SupportedReportSetProperty(new ReportType[] {
-                ReportType.EXPAND_PROPERTY,
-                NodeTypesReport.NODETYPES_REPORT,
-                LocateByUuidReport.LOCATE_BY_UUID_REPORT,
-                RegisteredNamespacesReport.REGISTERED_NAMESPACES_REPORT,
-                RepositoryDescriptorsReport.REPOSITORY_DESCRIPTORS_REPORT
+                    ReportType.EXPAND_PROPERTY,
+                    NodeTypesReport.NODETYPES_REPORT,
+                    LocateByUuidReport.LOCATE_BY_UUID_REPORT,
+                    RegisteredNamespacesReport.REGISTERED_NAMESPACES_REPORT,
+                    RepositoryDescriptorsReport.REPOSITORY_DESCRIPTORS_REPORT
             });
         }
     }

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/ItemResourceConstants.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/ItemResourceConstants.java?rev=711567&r1=711566&r2=711567&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/ItemResourceConstants.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/ItemResourceConstants.java
Wed Nov  5 05:49:28 2008
@@ -111,6 +111,9 @@
      */
     public static final String XML_RELPATH = "relpath";
 
+    // name of the workspace for which the repository session has been created.
+    public static final DavPropertyName JCR_WORKSPACE_NAME = DavPropertyName.create("workspaceName",
NAMESPACE);
+
     // general property names
     public static final DavPropertyName JCR_NAME = DavPropertyName.create("name", NAMESPACE);
     public static final DavPropertyName JCR_PATH = DavPropertyName.create("path", NAMESPACE);
@@ -120,7 +123,6 @@
     public static final DavPropertyName JCR_ISMODIFIED = DavPropertyName.create("ismodified",
NAMESPACE);
     public static final DavPropertyName JCR_DEFINITION = DavPropertyName.create("definition",
NAMESPACE);
 
-
     // property names used for resources representing jcr-nodes
     public static final DavPropertyName JCR_PRIMARYNODETYPE = DavPropertyName.create(XML_PRIMARYNODETYPE,
NAMESPACE);
     public static final DavPropertyName JCR_MIXINNODETYPES = DavPropertyName.create("mixinnodetypes",
NAMESPACE);



Mime
View raw message