Sonic Management API

com.sonicsw.ma.mgmtapi.config.impl
Class MgmtBeanBase

java.lang.Object
  extended by com.sonicsw.ma.mgmtapi.config.impl.MgmtBeanBase
All Implemented Interfaces:
IMgmtBase, IMgmtBeanBase, com.sonicsw.mx.config.IAnnotationExtension, java.lang.Cloneable

public abstract class MgmtBeanBase
extends java.lang.Object
implements IMgmtBeanBase, java.lang.Cloneable


Field Summary
 
Fields inherited from interface com.sonicsw.ma.mgmtapi.config.IMgmtBeanBase
C_VERSION_PROPERTY, CLASS_PROPERTY, P_VERSION_PROPERTY, TEMPLATE_PROPERTY, TYPE_PROPERTY
 
Fields inherited from interface com.sonicsw.mx.config.IAnnotationExtension
END_CDATA, START_CDATA, TOOL_ANNOTATION
 
Constructor Summary
MgmtBeanBase(MgmtBeanFactory factory)
           
 
Method Summary
 IMgmtBeanBase clone(java.lang.String viewName)
           
 void createBean(java.lang.String viewPath, java.lang.String type, java.lang.String cVersion, java.lang.String pVersion)
           
 void createBean(java.lang.String viewPath, java.lang.String type, java.lang.String cVersion, java.lang.String pVersion, boolean setAttributes)
           
 java.lang.String createUniqueName()
          Return a name that is unique across all beans.
 java.lang.String getAnnotation()
           
 java.lang.Object getAttribute(java.lang.String name)
           
 com.sonicsw.mx.config.IAttributeList getAttributeList()
           
 com.sonicsw.mx.config.IAttributeMap getAttributeMap()
           
 IMgmtAttributeMetaData getAttributeMetaData(java.lang.String name)
           
 java.math.BigDecimal getBigDecimalAttribute(java.lang.String name)
           
 boolean getBooleanAttribute(java.lang.String name)
           
 byte[] getByteArrayAttribute(java.lang.String name)
           
 com.sonicsw.mx.config.IConfigBean getConfigBean()
           
 java.lang.String getConfigBeanName()
           
 java.lang.String getConfigBeanNamePrefix()
           
 java.lang.String getConfigBeanNameTail()
           
 com.sonicsw.mx.config.IConfigPath getConfigPath()
           
 com.sonicsw.mx.config.IConfigPath getConfigPath(java.lang.String name)
           
 int getIntegerAttribute(java.lang.String name)
           
 long getLongAttribute(java.lang.String name)
           
 MgmtBeanFactory getMgmtBeanFactory()
           
 IMgmtBase getParent()
           
 java.lang.Object getProperty(java.lang.Object propertyId)
           
 IMgmtBeanBase getReferenceAttribute(java.lang.String name)
           
 java.lang.String getStringAttribute(java.lang.String name)
           
 boolean isNewBean()
           
 void loadBean(java.lang.String viewPath, java.lang.String type)
          Loads a bean and validates that it is of the expected type.
 void removeAttribute(java.lang.String name)
           
 void setAnnotation(java.lang.String value)
           
 void setAttribute(java.lang.String name, IMgmtBase val)
           
 void setAttribute(java.lang.String name, java.lang.Object val)
           
 void setBigDecimalAttribute(java.lang.String name, java.math.BigDecimal val)
           
 void setBooleanAttribute(java.lang.String name, boolean val)
           
 void setByteArrayAttribute(java.lang.String name, byte[] val)
           
 void setIntegerAttribute(java.lang.String name, int val)
           
 void setLongAttribute(java.lang.String name, long val)
           
 void setReferenceAttribute(java.lang.String name, IMgmtBeanBase val)
           
 void setStringAttribute(java.lang.String name, java.lang.String val)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MgmtBeanBase

public MgmtBeanBase(MgmtBeanFactory factory)
Method Detail

clone

public IMgmtBeanBase clone(java.lang.String viewName)
                    throws MgmtException
Specified by:
clone in interface IMgmtBeanBase
Throws:
MgmtException

createBean

public void createBean(java.lang.String viewPath,
                       java.lang.String type,
                       java.lang.String cVersion,
                       java.lang.String pVersion)
                throws MgmtException
Throws:
MgmtException

createBean

public void createBean(java.lang.String viewPath,
                       java.lang.String type,
                       java.lang.String cVersion,
                       java.lang.String pVersion,
                       boolean setAttributes)
                throws MgmtException
Throws:
MgmtException

createUniqueName

public java.lang.String createUniqueName()
Return a name that is unique across all beans.

Specified by:
createUniqueName in interface IMgmtBeanBase
Returns:

getAnnotation

public java.lang.String getAnnotation()
Specified by:
getAnnotation in interface com.sonicsw.mx.config.IAnnotationExtension

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
                              throws MgmtException
Throws:
MgmtException

getAttributeList

public com.sonicsw.mx.config.IAttributeList getAttributeList()
Specified by:
getAttributeList in interface IMgmtBase

getAttributeMap

public com.sonicsw.mx.config.IAttributeMap getAttributeMap()
Specified by:
getAttributeMap in interface IMgmtBase

getAttributeMetaData

public IMgmtAttributeMetaData getAttributeMetaData(java.lang.String name)
                                            throws MgmtException
Specified by:
getAttributeMetaData in interface IMgmtBase
Throws:
MgmtException

getBigDecimalAttribute

public java.math.BigDecimal getBigDecimalAttribute(java.lang.String name)
                                            throws MgmtException
Specified by:
getBigDecimalAttribute in interface IMgmtBeanBase
Throws:
MgmtException

getBooleanAttribute

public boolean getBooleanAttribute(java.lang.String name)
                            throws MgmtException
Specified by:
getBooleanAttribute in interface IMgmtBeanBase
Throws:
MgmtException

getByteArrayAttribute

public byte[] getByteArrayAttribute(java.lang.String name)
                             throws MgmtException
Specified by:
getByteArrayAttribute in interface IMgmtBeanBase
Throws:
MgmtException

getConfigBean

public com.sonicsw.mx.config.IConfigBean getConfigBean()
Specified by:
getConfigBean in interface IMgmtBase

getConfigBeanName

public java.lang.String getConfigBeanName()
Specified by:
getConfigBeanName in interface IMgmtBase

getConfigBeanNamePrefix

public java.lang.String getConfigBeanNamePrefix()

getConfigBeanNameTail

public java.lang.String getConfigBeanNameTail()
Specified by:
getConfigBeanNameTail in interface IMgmtBase

getConfigPath

public com.sonicsw.mx.config.IConfigPath getConfigPath()
Specified by:
getConfigPath in interface IMgmtBase

getConfigPath

public com.sonicsw.mx.config.IConfigPath getConfigPath(java.lang.String name)
Specified by:
getConfigPath in interface IMgmtBase

getIntegerAttribute

public int getIntegerAttribute(java.lang.String name)
                        throws MgmtException
Specified by:
getIntegerAttribute in interface IMgmtBeanBase
Throws:
MgmtException

getLongAttribute

public long getLongAttribute(java.lang.String name)
                      throws MgmtException
Specified by:
getLongAttribute in interface IMgmtBeanBase
Throws:
MgmtException

getMgmtBeanFactory

public MgmtBeanFactory getMgmtBeanFactory()
Specified by:
getMgmtBeanFactory in interface IMgmtBase

getParent

public IMgmtBase getParent()
Specified by:
getParent in interface IMgmtBase

getProperty

public java.lang.Object getProperty(java.lang.Object propertyId)
Specified by:
getProperty in interface IMgmtBeanBase

getReferenceAttribute

public IMgmtBeanBase getReferenceAttribute(java.lang.String name)
                                    throws MgmtException
Specified by:
getReferenceAttribute in interface IMgmtBeanBase
Throws:
MgmtException

getStringAttribute

public java.lang.String getStringAttribute(java.lang.String name)
                                    throws MgmtException
Specified by:
getStringAttribute in interface IMgmtBeanBase
Throws:
MgmtException

isNewBean

public boolean isNewBean()
Specified by:
isNewBean in interface IMgmtBeanBase

loadBean

public void loadBean(java.lang.String viewPath,
                     java.lang.String type)
              throws MgmtException
Loads a bean and validates that it is of the expected type.

Parameters:
viewPath - The logical path of the bean to be loaded.
type - The expected config type of the bean.
Throws:
MgmtException - Thrown if the bean could not be found or the bean is not the right type.

removeAttribute

public void removeAttribute(java.lang.String name)
                     throws MgmtException
Specified by:
removeAttribute in interface IMgmtBase
Throws:
MgmtException

setAnnotation

public void setAnnotation(java.lang.String value)
Specified by:
setAnnotation in interface com.sonicsw.mx.config.IAnnotationExtension

setAttribute

public void setAttribute(java.lang.String name,
                         IMgmtBase val)
                  throws MgmtException
Specified by:
setAttribute in interface IMgmtBase
Throws:
MgmtException

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object val)
                  throws MgmtException
Throws:
MgmtException

setBigDecimalAttribute

public void setBigDecimalAttribute(java.lang.String name,
                                   java.math.BigDecimal val)
                            throws MgmtException
Specified by:
setBigDecimalAttribute in interface IMgmtBeanBase
Throws:
MgmtException

setBooleanAttribute

public void setBooleanAttribute(java.lang.String name,
                                boolean val)
                         throws MgmtException
Specified by:
setBooleanAttribute in interface IMgmtBeanBase
Throws:
MgmtException

setByteArrayAttribute

public void setByteArrayAttribute(java.lang.String name,
                                  byte[] val)
                           throws MgmtException
Specified by:
setByteArrayAttribute in interface IMgmtBeanBase
Throws:
MgmtException

setIntegerAttribute

public void setIntegerAttribute(java.lang.String name,
                                int val)
                         throws MgmtException
Specified by:
setIntegerAttribute in interface IMgmtBeanBase
Throws:
MgmtException

setLongAttribute

public void setLongAttribute(java.lang.String name,
                             long val)
                      throws MgmtException
Specified by:
setLongAttribute in interface IMgmtBeanBase
Throws:
MgmtException

setReferenceAttribute

public void setReferenceAttribute(java.lang.String name,
                                  IMgmtBeanBase val)
                           throws MgmtException
Specified by:
setReferenceAttribute in interface IMgmtBeanBase
Throws:
MgmtException

setStringAttribute

public void setStringAttribute(java.lang.String name,
                               java.lang.String val)
                        throws MgmtException
Specified by:
setStringAttribute in interface IMgmtBeanBase
Throws:
MgmtException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Sonic Management API

Copyright © 2001-2011 Progress Software Corporation. All Rights Reserved.
HTML formatted on 12-Aug-2011.