FileDocCategorySizeDatePackage
Resource.javaAPI DocGlassfish v2 API4315Fri May 04 22:33:56 BST 2007com.sun.enterprise.admin.server.core.mbean.config

Resource

public class Resource extends Object
Class which represents the Resource.

Fields Summary
public static final int
BEGIN_INDEX
public static final int
JMS_RESOURCE
public static final int
MAIL_RESOURCE
public static final int
PERSISTENCE_RESOURCE
public static final int
JDBC_RESOURCE
public static final int
JDBC_CONN_POOL
public static final int
CUSTOM_RESOURCE
public static final int
EXT_JNDI_RESOURCE
private int
resType
private Properties
attributes
private Vector
vProperty
private String
sDescription
Constructors Summary
public Resource()


     
    
    
public Resource(int type)

       resType = type;
    
Methods Summary
public java.util.PropertiesgetAttributes()

        return attributes;
    
public java.lang.StringgetDescription()

       return sDescription;
    
public com.sun.enterprise.config.serverbeans.ElementProperty[]getElementProperty()

        Object[] arrayObj = vProperty.toArray();
        //convert vector to array
        ElementProperty [] epArray = new ElementProperty[arrayObj.length];
        for (int ii=0; ii<arrayObj.length; ii++) {
           epArray[ii] = (ElementProperty)arrayObj[ii];
        }
        return epArray;
    
public intgetType()

        return resType;
    
public voidsetAttribute(java.lang.String name, java.lang.String value)

        attributes.setProperty(name, value);
    
public voidsetDescription(java.lang.String sDescription)

        this.sDescription = sDescription;
    
public voidsetElementProperty(java.lang.String name, java.lang.String value, java.lang.String sDesc)

        ElementProperty ep = new ElementProperty();
        ep.setName(name);
        ep.setValue(value);
        ep.setDescription(sDesc);
        vProperty.add(ep);
    
public voidsetElementProperty(java.lang.String name, java.lang.String value)

        ElementProperty ep = new ElementProperty();
        ep.setName(name);
        ep.setValue(value);
        vProperty.add(ep);
    
public voidsetType(int type)

        resType = type;