SilverStream
Application Server 3.5

com.sssw.rts.adminapi
Interface AgiAdmPropertyBag

All Known Subinterfaces:
AgiAdmCluster, AgiAdmClusterServer, AgiAdmContainer, AgiAdmDatabase, AgiAdmDesignElement, AgiAdmDirectory, AgiAdmEjbJar, AgiAdmElement, AgiAdmGroup, AgiAdmLBClusterEnv, AgiAdmLBContainer, AgiAdmLBElement, AgiAdmServer, AgiAdmUser, AgiAdmUserReference, AgiDatabase, AgiServer

public interface AgiAdmPropertyBag

This interface provides methods to set and get properties for various objects including users and groups, servers, database objects, and load balancing elements and containers.

For a list and description of properties (fields), see the following:


Method Summary
 Hashtable getProperties()
          Get element's properties.
 Object getProperty(String name)
          Obtain the value of the property with the specified name.
 void setProperties(Hashtable props)
          Set the element's properties.
 void setProperty(String name, Object value)
          Set the value of the property with the specified name
 

Method Detail

getProperty

public Object getProperty(String name)
                   throws AgoUnrecoverableSystemException,
                          AgoSecurityException
Obtain the value of the property with the specified name.
Parameters:
name - the name of the property whose value is to be retrieved
Returns:
java.lang.Object the value of the property
Usage:

For a description of values returnable by this method, see the list of properties above.

Example:
// Get the value of the description property of a particular SilverUser.
 AgiAdmUser user = (AgiAdmUser)server.getElement(
 	"user1", AgiAdmUser.SILVERUSER, null);
 String description = (String)user.getProperty(AgiAdmElement.PROP_DESCRIPTION);
 

setProperty

public void setProperty(String name,
                        Object value)
                 throws AgoUnrecoverableSystemException,
                        AgoSecurityException
Set the value of the property with the specified name
Parameters:
name - the name of the property whose value is to be set
value - the value of the property
Returns:
none
Usage:

In order for the change to take effect, the saveChanges method must be called on the element.

For a description of values to use with this method, see the list of properties above.

Example:
// Set the description for a SilverUser.
 AgiAdmUser user = (AgiAdmUser)server.getElement(
 	"user1", AgiAdmUser.SILVERUSER, null);
 user.setProperty(AgiAdmElement.PROP_DESCRIPTION, "Test user");
 user.saveChanges();
 

setProperties

public void setProperties(Hashtable props)
                   throws AgoUnrecoverableSystemException,
                          AgoSecurityException
Set the element's properties.
Parameters:
props - a map of property names to the values that are to be set
Usage:

In order for the change to take effect, the saveChanges method must be called on the element.

For a description of values to use with this method, see the list of properties above.

Example:
// Set password, description, and a full name for a SilverUser.
 AgiAdmUser user = (AgiAdmUser)server.getElement(
 	"user1", AgiAdmUser.SILVERUSER, null);
 Hashtable props = new Hashtable();
 props.put(AgiAdmElement.PROP_PASSWORD, "newpassword");
 props.put(AgiAdmElement.PROP_DESCRIPTION, "Test user");
 props.put(AgiAdmElement.PROP_FULL_NAME, "John Brown");
 user.setProperties(props);
 user.saveChanges();
 

getProperties

public Hashtable getProperties()
                        throws AgoUnrecoverableSystemException,
                               AgoSecurityException
Get element's properties. Returns a hashtable of property names mapped to the property values.
Usage:

For a description of values returnable by this method, see the list of properties above.

Example:
// Get all the properties of a particular SilverUser.
 AgiAdmUser user = (AgiAdmUser)server.getElement(
 	"user1", AgiAdmUser.SILVERUSER, null);
 Hashtable props = user.getProperties();
 

SilverStream
Application Server 3.5