You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-dev@ws.apache.org by sc...@apache.org on 2004/12/13 19:07:45 UTC

svn commit: r111734 - /incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemHome.java /incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemPropertyQNames.java

Author: scamp
Date: Mon Dec 13 10:07:44 2004
New Revision: 111734

URL: http://svn.apache.org/viewcvs?view=rev&rev=111734
Log:
Updated to enhance the FileSystem example using callbacks.
Modified:
   incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemHome.java
   incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemPropertyQNames.java

Modified: incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemHome.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemHome.java?view=diff&rev=111734&p1=incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemHome.java&r1=111733&p2=incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemHome.java&r2=111734
==============================================================================
--- incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemHome.java	(original)
+++ incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemHome.java	Mon Dec 13 10:07:44 2004
@@ -15,6 +15,8 @@
  *=============================================================================*/
 package example.filesystem;
 
+import example.filesystem.backend.FileSystem;
+import example.filesystem.backend.UnixFileSystem;
 import org.apache.ws.resource.Resource;
 import org.apache.ws.resource.ResourceContext;
 import org.apache.ws.resource.ResourceContextException;
@@ -24,27 +26,20 @@
 import org.apache.ws.resource.example.filesystem.BackupFrequencyDocument;
 import org.apache.ws.resource.example.filesystem.CommentDocument;
 import org.apache.ws.resource.example.filesystem.DeviceSpecialFileDocument;
+import org.apache.ws.resource.example.filesystem.FileSystemPropertiesDocument;
 import org.apache.ws.resource.example.filesystem.FsckPassNumberDocument;
 import org.apache.ws.resource.example.filesystem.MountPointDirectoryDocument;
-import org.apache.ws.resource.example.filesystem.TypeDocument;
 import org.apache.ws.resource.example.filesystem.OptionsDocument;
-import org.apache.ws.resource.impl.ResourceFactory;
+import org.apache.ws.resource.example.filesystem.TypeDocument;
 import org.apache.ws.resource.impl.AbstractResourceHome;
-import org.apache.ws.resource.properties.ResourcePropertySet;
+import org.apache.ws.resource.impl.ResourceFactory;
 import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.ResourcePropertySet;
 import org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet;
-import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlOptions;
 
-import javax.xml.namespace.QName;
-import java.io.InputStream;
 import java.io.Serializable;
-import java.util.Iterator;
 import java.util.List;
 
-import example.filesystem.backend.FileSystem;
-import example.filesystem.backend.UnixFileSystem;
-
 /**
  * Home for FileSystem WS-Resources.
  *
@@ -56,9 +51,7 @@
    extends AbstractResourceHome
    implements ResourceFactory,
               Serializable
-{
-
-   protected static final  String RESOURCE_PROPS_RESOURCE_PATH = "example/filesystem/FileSystemProperties.xml";
+{   
    private FileSystem m_fileSystem = new UnixFileSystem();
 
    /**
@@ -90,11 +83,8 @@
          {
             try
             {
-               InputStream in = getClass().getClassLoader().getResourceAsStream( RESOURCE_PROPS_RESOURCE_PATH );
-               XmlObject propsDocXBean = XmlObject.Factory.parse( in, new XmlOptions().setLoadStripWhitespace() );
-
-               in.close();
-               ResourcePropertySet propSet = new XmlBeansResourcePropertySet( propsDocXBean );
+                FileSystemPropertiesDocument propDoc = FileSystemPropertiesDocument.Factory.newInstance();
+                ResourcePropertySet propSet = new XmlBeansResourcePropertySet( propDoc );
                 initProperties(propSet);
                 resource = createInstance( key, propSet );
             }

Modified: incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemPropertyQNames.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemPropertyQNames.java?view=diff&rev=111734&p1=incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemPropertyQNames.java&r1=111733&p2=incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemPropertyQNames.java&r2=111734
==============================================================================
--- incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemPropertyQNames.java	(original)
+++ incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemPropertyQNames.java	Mon Dec 13 10:07:44 2004
@@ -19,7 +19,7 @@
 
 /**
  * QNames of the resource properties defined by FileSystem WSDL.
- *
+ * <p/>
  * NOTE: This class is generated and is NOT meant to be modified.
  *
  * @author Ian P. Springer (Hewlett-Packard Company)
@@ -27,26 +27,25 @@
 public interface FileSystemPropertyQNames
 {
 
-   QName FILESYSTEM_PROPERTIES =
-         new QName( FileSystemService.TARGET_NSURI, "FileSystemProperties", FileSystemService.TARGET_NSPREFIX );
+    QName FILESYSTEM_PROPERTIES =
+            new QName(FileSystemService.TARGET_NSURI, "FileSystemProperties", FileSystemService.TARGET_NSPREFIX);
 
-   QName DEVICE_SPECIAL_FILE =
-         new QName( FileSystemService.TARGET_NSURI, "DeviceSpecialFile", FileSystemService.TARGET_NSPREFIX );
+    QName DEVICE_SPECIAL_FILE =
+            new QName(FileSystemService.TARGET_NSURI, "DeviceSpecialFile", FileSystemService.TARGET_NSPREFIX);
 
     QName MOUNT_POINT_DIR =
-             new QName( FileSystemService.TARGET_NSURI, "MountPointDirectory", FileSystemService.TARGET_NSPREFIX );
+            new QName(FileSystemService.TARGET_NSURI, "MountPointDirectory", FileSystemService.TARGET_NSPREFIX);
 
     QName TYPE =
-                 new QName( FileSystemService.TARGET_NSURI, "Type", FileSystemService.TARGET_NSPREFIX );
+            new QName(FileSystemService.TARGET_NSURI, "Type", FileSystemService.TARGET_NSPREFIX);
     QName OPTIONS =
-                 new QName( FileSystemService.TARGET_NSURI, "Options", FileSystemService.TARGET_NSPREFIX );
+            new QName(FileSystemService.TARGET_NSURI, "Options", FileSystemService.TARGET_NSPREFIX);
     QName BACKUP_FREQUENCY =
-                 new QName( FileSystemService.TARGET_NSURI, "BackupFrequency", FileSystemService.TARGET_NSPREFIX );
+            new QName(FileSystemService.TARGET_NSURI, "BackupFrequency", FileSystemService.TARGET_NSPREFIX);
     QName FSCK_PASS_NUMBER =
-                 new QName( FileSystemService.TARGET_NSURI, "FsckPassNumber", FileSystemService.TARGET_NSPREFIX );
+            new QName(FileSystemService.TARGET_NSURI, "FsckPassNumber", FileSystemService.TARGET_NSPREFIX);
     QName COMMENT =
-                 new QName( FileSystemService.TARGET_NSURI, "Comment", FileSystemService.TARGET_NSPREFIX );
-
+            new QName(FileSystemService.TARGET_NSURI, "Comment", FileSystemService.TARGET_NSPREFIX);
 
 
 }

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