com.ibm.datapower.wamt.dataAPI.local.filesystem
Class StoredManagedSetImpl

java.lang.Object
  extended by com.ibm.datapower.wamt.dataAPI.local.filesystem.StoredManagedSetImpl
All Implemented Interfaces:
Persistable, StoredManagedSet

public class StoredManagedSetImpl
extends java.lang.Object
implements StoredManagedSet

The StoredMangedSet writes and reads all information that must be maintained for ManagedSet including its managed device members. Below is a sample ManagedSet element with a single member.

 
 <managedSets xmi:id="DPManagedSet_1" name="set1" deviceMembers="DPDevice_0"/>
 
 

Note: The Local File System implementation adds an element for each ManagedSet that is created. All it device members are stored as attributes on the Managedset element. It does not contain other elements.


Field Summary
 
Fields inherited from interface com.ibm.datapower.wamt.dataAPI.StoredManagedSet
COPYRIGHT_2009_2010, SCM_REVISION
 
Method Summary
 void add(StoredDevice device)
          Adds the specified device to the specified managed set.
 void delete()
           Note: The Local File System implementation deletes the ManagedSet element from the WAMT.repository.xml file but any device elements that are not contained inside it are retained and can be accessed by calling Manager.getAllDevices() and Manager.getDmiLogger()
 StoredDevice[] getDeviceMembers()
          Gets the array of devices which are members of this managed set.
 java.lang.String getName()
           Note: The Local File System implementation uses the name as the unique identifier of this object in the repository.
 java.lang.String getPrimaryKey()
           Note: The Local File System implementation uses the name of the ManagesSet as the unique identifier for this object.
 void remove(StoredDevice device)
          Removes the specified device from this managed set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()

Note: The Local File System implementation uses the name as the unique identifier of this object in the repository.

Specified by:
getName in interface StoredManagedSet
Returns:
name of this StoredManagedSet.

add

public void add(StoredDevice device)
Description copied from interface: StoredManagedSet
Adds the specified device to the specified managed set. A device cannot be a member of more than one managed set at a time. This is invoked by ManagedSet.addDevice(com.ibm.datapower.wamt.clientAPI.Device)

Specified by:
add in interface StoredManagedSet
Parameters:
device - the device to add
See Also:
StoredManagedSet.remove(StoredDevice)

getDeviceMembers

public StoredDevice[] getDeviceMembers()
Description copied from interface: StoredManagedSet
Gets the array of devices which are members of this managed set.

Specified by:
getDeviceMembers in interface StoredManagedSet
Returns:
an array of devices which are members of this managed set.
See Also:
This is invoked by {@link com.ibm.datapower.wamt.clientAPI.ManagedSet#getDeviceMembers()}, StoredManagedSet.remove(StoredDevice)

remove

public void remove(StoredDevice device)
Description copied from interface: StoredManagedSet
Removes the specified device from this managed set. This is invoked by ManagedSet.removeDevice(com.ibm.datapower.wamt.clientAPI.Device) The removed device is still persisted in the repository though it is no longer managed by this managed set. You can reverse this by adding the device back to the managed set.

Specified by:
remove in interface StoredManagedSet
Parameters:
device - the device to remove
See Also:
StoredManagedSet.add(StoredDevice), StoredManagedSet.getDeviceMembers()

delete

public void delete()
            throws DatastoreException,
                   NotEmptyInRepositoryException

Note: The Local File System implementation deletes the ManagedSet element from the WAMT.repository.xml file but any device elements that are not contained inside it are retained and can be accessed by calling Manager.getAllDevices() and Manager.getDmiLogger()

Specified by:
delete in interface StoredManagedSet

getPrimaryKey

public java.lang.String getPrimaryKey()

Note: The Local File System implementation uses the name of the ManagesSet as the unique identifier for this object. The name is immutable, so there is no setName(String) method.

Specified by:
getPrimaryKey in interface Persistable
Specified by:
getPrimaryKey in interface StoredManagedSet
Returns:
the unique identifier for this object
See Also:
StoredManagedSet.getName()


© Copyright IBM Corp. 2006, 2010 All Rights Reserved.