com.bea.ales.management
Class Scope

java.lang.Object
  |
  +--com.bea.ales.management.Scope
Direct Known Subclasses:
Application, Organization

public abstract class Scope
extends java.lang.Object


Field Summary
static java.lang.String ALES_APPLICATION
           
static java.lang.String ALES_ORGANIZATION
           
static java.lang.String SCOPE_SEPARATOR
           
 
Method Summary
 void addAttribute(AttributeElement attr)
          Add the attribute to this scope
 AttributeElement getAttribute(java.lang.String attrName)
          Get the specific attribute of this scope by attribute name
 AttributeQueryResult getAttributes()
          Get the attributes of this scope.
 java.lang.String getDescription()
          Get the description of the scope
 java.lang.String getFullQualifiedName()
          Get full qualified name of the scope, e.g.
 java.lang.String getName()
          Get the scope name
 Organization getParentScope()
          Get parent scope
 java.lang.String getType()
          Get the scope type
 boolean isRoot()
          Checks if the Scope is root scope represented by RootOrg.
 void modifyAttribute(AttributeElement oldAttr, AttributeElement newAttr)
          Modify the scope attribute.
 void removeAttribute(AttributeElement attr)
          Remove the scope attribute.
 void removeAttribute(java.lang.String attrName)
          Remove scope attribute with the specified name.
abstract  void rename(java.lang.String newName)
          Rename the scope
 void setDescription(java.lang.String description)
          Set the description of this scope
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALES_ORGANIZATION

public static java.lang.String ALES_ORGANIZATION

ALES_APPLICATION

public static java.lang.String ALES_APPLICATION

SCOPE_SEPARATOR

public static final java.lang.String SCOPE_SEPARATOR
Method Detail

getParentScope

public Organization getParentScope()
                            throws ManagementException
Get parent scope

Returns:
the parent scope object, null if the scope node is root itself
Throws:
ManagementException - if the operation fails

getType

public java.lang.String getType()
Get the scope type

Returns:
ALES_ORGANIZATION for Organization type ALES_APPLICATION for Application type

rename

public abstract void rename(java.lang.String newName)
                     throws ManagementException
Rename the scope

Parameters:
newName - the new name
Throws:
ManagementException - if the operation fails

getName

public java.lang.String getName()
Get the scope name

Returns:
scope name

getDescription

public java.lang.String getDescription()
                                throws ManagementException
Get the description of the scope

Returns:
a string description for the scope
Throws:
ManagementException - if the operation fails

setDescription

public void setDescription(java.lang.String description)
                    throws ManagementException
Set the description of this scope

Parameters:
description - the description to set
Throws:
ManagementException - if the operation fails

getAttributes

public AttributeQueryResult getAttributes()
                                   throws ManagementException
Get the attributes of this scope.

Returns:
the AttributeQueryResult instance that contains all attributes found.
Throws:
ManagementException - if the operation fails.

getAttribute

public AttributeElement getAttribute(java.lang.String attrName)
                              throws ManagementException
Get the specific attribute of this scope by attribute name

Parameters:
attrName - the name of the attribute. It can not be null or zero length string.
Returns:
the AttributeElement instance which has the given name.
Throws:
ManagementException - if the operation fails.

addAttribute

public void addAttribute(AttributeElement attr)
                  throws ManagementException
Add the attribute to this scope

Parameters:
attr - the attributeElement to be added.
Throws:
ManagementException - if the operation fails.

modifyAttribute

public void modifyAttribute(AttributeElement oldAttr,
                            AttributeElement newAttr)
                     throws ManagementException
Modify the scope attribute.

Parameters:
oldAttr - the attribute to be modified
newAttr - the new attribute desired. It has the same name and type as the old one but with new vaule desired.
Throws:
ManagementException - if the operation fails.

removeAttribute

public void removeAttribute(java.lang.String attrName)
                     throws ManagementException
Remove scope attribute with the specified name.

Parameters:
attrName - name of the attribute to be removed. It can not be null or zero length string.
Throws:
ManagementException - if the operation fails.

removeAttribute

public void removeAttribute(AttributeElement attr)
                     throws ManagementException
Remove the scope attribute.

Parameters:
attr - the attribute to be removed. It can not be null.
Throws:
ManagementException - if the operation fails.

getFullQualifiedName

public java.lang.String getFullQualifiedName()
Get full qualified name of the scope, e.g. RootOrg!OrgA!OrgB!AppC

isRoot

public boolean isRoot()
Checks if the Scope is root scope represented by RootOrg.

Returns:
true if the scope is the root scope.


Copyright © 2004-2008, Oracle and/or its affiliates. All rights reserved.