com.bea.ales.management
Class ScopeManager

java.lang.Object
  |
  +--com.bea.ales.management.ScopeManager

public class ScopeManager
extends java.lang.Object


Method Summary
 Scope create(java.lang.String name, java.lang.String type)
          Create a scope as child of current Scope with specified type
 Application createApplication(java.lang.String name)
          Create application with the given name as child of current Scope
 Organization createOrganization(java.lang.String name)
          Create organization with the given name as child of current Scope
 Organization getRoot()
          Get the root organization
 Scope getScope(java.lang.String name)
          Get child scope instance with the given name of current Scope
 Scope getScopeWithFullQuaifiedName(java.lang.String qualified)
          Get child scope instance with the given name of current Scope
 void remove(Scope scope)
          Remove the given scope
 void remove(java.lang.String name)
          Remove a child scope of current Scope with the given name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createOrganization

public Organization createOrganization(java.lang.String name)
                                throws ManagementException
Create organization with the given name as child of current Scope

Parameters:
name - name of new organization
Returns:
the new organization
Throws:
ManagementException - if the operation fails

createApplication

public Application createApplication(java.lang.String name)
                              throws java.lang.IllegalArgumentException,
                                     ManagementException
Create application with the given name as child of current Scope

Parameters:
name - name of new application
Returns:
the new organization
Throws:
ManagementException - if the operation fails

create

public Scope create(java.lang.String name,
                    java.lang.String type)
             throws java.lang.IllegalArgumentException,
                    ManagementException
Create a scope as child of current Scope with specified type

Parameters:
name - name of new scope
type - scope type, valid values are Scope.ALES_ORGANIZATION and Scope.ALES_APPLICATION
Returns:
the new scope
Throws:
ManagementException - if the operation fails

remove

public void remove(java.lang.String name)
            throws ManagementException
Remove a child scope of current Scope with the given name

Parameters:
name - name to the scope
Throws:
ManagementException - if the operation fails

remove

public void remove(Scope scope)
            throws ManagementException
Remove the given scope

Parameters:
scope - the scope to be removed
Throws:
ManagementException - if the operation fails

getScope

public Scope getScope(java.lang.String name)
               throws java.lang.IllegalArgumentException,
                      ManagementException
Get child scope instance with the given name of current Scope

Parameters:
name - name of the scope
Returns:
the scope, null if no scope found
Throws:
ManagementException - if the operation fails

getScopeWithFullQuaifiedName

public Scope getScopeWithFullQuaifiedName(java.lang.String qualified)
                                   throws ManagementException
Get child scope instance with the given name of current Scope

Parameters:
name - name of the scope
Returns:
the scope, null if no scope found
Throws:
ManagementException - if the operation fails

getRoot

public Organization getRoot()
                     throws ManagementException
Get the root organization

Returns:
the root organization
Throws:
ManagementException - if the operation fails


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