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 20:53:31 UTC
svn commit: r111744 - /incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemHome.java
Author: scamp
Date: Mon Dec 13 11:53:30 2004
New Revision: 111744
URL: http://svn.apache.org/viewcvs?view=rev&rev=111744
Log:
Modified to use backend object
Modified:
incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemHome.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=111744&p1=incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemHome.java&r1=111743&p2=incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemHome.java&r2=111744
==============================================================================
--- incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemHome.java (original)
+++ incubator/apollo/trunk/examples/filesystem/src/example/filesystem/FileSystemHome.java Mon Dec 13 11:53:30 2004
@@ -51,7 +51,7 @@
extends AbstractResourceHome
implements ResourceFactory,
Serializable
-{
+{
private FileSystem m_fileSystem = new UnixFileSystem();
/**
@@ -111,27 +111,27 @@
private void initProperties(ResourcePropertySet propSet)
{
ResourceProperty resourceProperty = propSet.get(FileSystemPropertyQNames.BACKUP_FREQUENCY);
- BackupFrequencyDocument o = (BackupFrequencyDocument) resourceProperty.get(0);
+ BackupFrequencyDocument o = BackupFrequencyDocument.Factory.newInstance();
o.setBackupFrequency(m_fileSystem.getBackupFrequency());
resourceProperty = propSet.get(FileSystemPropertyQNames.COMMENT);
- CommentDocument comment = (CommentDocument) resourceProperty.get(0);
+ CommentDocument comment = CommentDocument.Factory.newInstance();
comment.setComment(m_fileSystem.getComment());
resourceProperty = propSet.get(FileSystemPropertyQNames.DEVICE_SPECIAL_FILE);
- DeviceSpecialFileDocument deviceDoc = (DeviceSpecialFileDocument) resourceProperty.get(0);
+ DeviceSpecialFileDocument deviceDoc = DeviceSpecialFileDocument.Factory.newInstance();
deviceDoc.setDeviceSpecialFile(m_fileSystem.getDeviceSpecialFile());
resourceProperty = propSet.get(FileSystemPropertyQNames.FSCK_PASS_NUMBER);
- FsckPassNumberDocument fsck = (FsckPassNumberDocument) resourceProperty.get(0);
+ FsckPassNumberDocument fsck = FsckPassNumberDocument.Factory.newInstance();
fsck.setFsckPassNumber(m_fileSystem.getFsckPassNumber());
resourceProperty = propSet.get(FileSystemPropertyQNames.MOUNT_POINT_DIR);
- MountPointDirectoryDocument mountPt = (MountPointDirectoryDocument) resourceProperty.get(0);
+ MountPointDirectoryDocument mountPt = MountPointDirectoryDocument.Factory.newInstance();
mountPt.setMountPointDirectory(m_fileSystem.getMountPoint());
resourceProperty = propSet.get(FileSystemPropertyQNames.OPTIONS);
- OptionsDocument optionsDoc = (OptionsDocument) resourceProperty.get(0);
+ OptionsDocument optionsDoc = OptionsDocument.Factory.newInstance();
org.apache.ws.resource.example.filesystem.OptionsDocument.Options options = optionsDoc.addNewOptions();
List backendOptions = m_fileSystem.getOptions();
for (int i = 0; i < backendOptions.size(); i++)
@@ -141,7 +141,7 @@
resourceProperty = propSet.get(FileSystemPropertyQNames.TYPE);
- TypeDocument type = (TypeDocument) resourceProperty.get(0);
+ TypeDocument type = TypeDocument.Factory.newInstance();
type.setType(m_fileSystem.getType());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: apollo-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: apollo-dev-help@ws.apache.org