You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by da...@apache.org on 2007/01/15 15:50:59 UTC

svn commit: r496348 - in /webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/metadata: MetadataDescriptor.java OpenMetadataDescriptor.java

Author: danj
Date: Mon Jan 15 06:50:59 2007
New Revision: 496348

URL: http://svn.apache.org/viewvc?view=rev&rev=496348
Log:
Added two methods to MetadataDescriptor so that users can read the actual string values of modifiability 
and mutability attributes on wsrmd:Property. This is further work for MUSE-179.

Modified:
    webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/metadata/MetadataDescriptor.java
    webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/metadata/OpenMetadataDescriptor.java

Modified: webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/metadata/MetadataDescriptor.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/metadata/MetadataDescriptor.java?view=diff&rev=496348&r1=496347&r2=496348
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/metadata/MetadataDescriptor.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/metadata/MetadataDescriptor.java Mon Jan 15 06:50:59 2007
@@ -160,6 +160,40 @@
     
     /**
      * 
+     * Most users will probably want to use the canDelete(), canInsert(), and 
+     * canUpdate() methods to test the permissions of a property; these methods 
+     * handle the Boolean logic between modifiability and mutability values so 
+     * you don't have to litter your code with messy if/else blocks. This method 
+     * returns the actual string value of the attribute that is used in the RMD doc.
+     * 
+     * @return WsrmdConstants.READ_ONLY or WsrmdConstants.READ_WRITE
+     * 
+     * @see #canDelete(QName)
+     * @see #canInsert(QName)
+     * @see #canUpdate(QName)
+     * 
+     */
+    String getModifiability(QName property);
+    
+    /**
+     * 
+     * Most users will probably want to use the canDelete(), canInsert(), and 
+     * canUpdate() methods to test the permissions of a property; these methods 
+     * handle the Boolean logic between modifiability and mutability values so 
+     * you don't have to litter your code with messy if/else blocks. This method 
+     * returns the actual string value of the attribute that is used in the RMD doc.
+     * 
+     * @return WsrmdConstants.CONSTANT, WsrmdConstants.APPENDABLE, or WsrmdConstants.MUTABLE
+     * 
+     * @see #canDelete(QName)
+     * @see #canInsert(QName)
+     * @see #canUpdate(QName)
+     * 
+     */    
+    String getMutability(QName property);
+    
+    /**
+     * 
      * @return The name of the metadata descriptor (defined in XML by its 
      *         "name" attribute).
      *

Modified: webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/metadata/OpenMetadataDescriptor.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/metadata/OpenMetadataDescriptor.java?view=diff&rev=496348&r1=496347&r2=496348
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/metadata/OpenMetadataDescriptor.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/metadata/OpenMetadataDescriptor.java Mon Jan 15 06:50:59 2007
@@ -147,6 +147,26 @@
      * @return null
      * 
      */
+    public String getModifiability(QName property)
+    {
+        return null;
+    }
+
+    /**
+     *
+     * @return null
+     * 
+     */
+    public String getMutability(QName property)
+    {
+        return null;
+    }
+    
+    /**
+     *
+     * @return null
+     * 
+     */
     public String getName()
     {
         return null;



---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org