wt.iba.definition.service
Class StandardIBADefinitionService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.iba.definition.service.StandardIBADefinitionService
All Implemented Interfaces:
IBADefinitionService, Manager, NetFactor, Serializable

public class StandardIBADefinitionService
extends StandardManager
implements IBADefinitionService, Serializable

Use the newStandardIBADefinitionService static factory method(s), not the StandardIBADefinitionService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
private static IBADefinitionDBService theIBADefinitionDBService
           
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardIBADefinitionService()
           
 
Method Summary
 AttributeDefNodeView copyAttributeDefinition(AttributeDefNodeView sourceNode, AttributeDefNodeView targetParentNode)
          Copies the current AttributeDefNodeView along with its children and attached them to the AttributeDefNodeView parent node.
 AttributeDefNodeView copyAttributeDefinition(AttributeDefNodeView sourceNode, AttributeOrgNodeView targetParentNode)
          Copies the current AttributeDefNodeView and its children and attached them to the new AttributeOrgNodeView parent node.
 AttributeOrgNodeView copyAttributeOrganizer(AttributeOrgNodeView sourceNode, AttributeOrgNodeView targetParentNode)
          Copies the current AttributeOrgNodeView along with its children and attaches them to the new parent node.
 AttributeDefDefaultView createAttributeDefinition(AttributeDefDefaultView attributeDef)
          Creates the given attribute definition.
 AttributeOrgDefaultView createAttributeOrganizer(AttributeOrgDefaultView attributeOrg)
          Creates the given Attribute Organizer.
 void deleteAttributeDefinition(AttributeDefDefaultView attributeDef)
          Deletes the given attribute definition and all its children..
 void deleteAttributeDefinition(AttributeDefNodeView node)
          Permantly delete the Attribute Definition node and its children from the DB.
 void deleteAttributeOrganizer(AttributeOrgDefaultView attributeOrg)
          Deletes the given attribute organizer and all its children.
 void deleteAttributeOrganizer(AttributeOrgNodeView node)
          Deletes the given attribute organizer and all its children.
protected  void dispatchVetoableEvent(String eventType, Persistable definition)
          Dispatches a IBADefinitionServiceEvent that includes the event type and target (i.e., AbstractAttributeDefinition).
 AbstractAttributeDefinizerNodeView[] getAttributeChildren(AbstractAttributeDefinizerNodeView node)
          Returns all the direct children of the given attribute node.
 AttributeDefDefaultView getAttributeDefDefaultView(AttributeDefNodeView attributeDef)
          Gets the attribute definition given the attribute node.
 AttributeDefDefaultView getAttributeDefDefaultViewByPath(String path)
          Get an attribute definition by specifing the path.
 AttributeOrgNodeView[] getAttributeOrganizerRoots()
          Returns the root (first) level of all the Attribute Organizer.
 AttributeOrgDefaultView getAttributeOrgDefaultView(AttributeOrgNodeView attributeOrg)
          Returns the lite attribute organizer (AttributeOrgDefaultView) given the node.
 String getConceptualClassname()
          Deprecated.  
 IBADefinitionDBService getIBADefinitionDBService()
           
static StandardIBADefinitionService newStandardIBADefinitionService()
          Default factory for the class.
 AttributeDefDefaultView refreshAttributeDefDefaultView(AttributeDefDefaultView attributeDef)
          Refreshes the given AttributeDefDefaultView by reloading the state of the same object from the DB.
 AttributeDefNodeView refreshAttributeDefNodeView(AttributeDefNodeView node)
          Refreshes the current AttributeDefNodeView by reloading its state from the DB.
 AttributeOrgDefaultView refreshAttributeOrgDefaultView(AttributeOrgDefaultView attributeOrg)
          Refreshes the given AttributeOrgDefaultView by reloading the state of the object from the DB.
 AttributeOrgNodeView refreshAttributeOrgNodeView(AttributeOrgNodeView node)
          Refreshes the current AttributeOrgNodeView by reloading its state from the DB.
 void registerEvents(ManagerService manager)
          Overrides the registration of all applicable locking service events with the service manager.
private  AbstractAttributeDefinizerView removeInvalidCharactersFromName(AbstractAttributeDefinizerView aadv)
           
private  String removeInvalidCharactersFromString(String s)
           
 AttributeDefDefaultView updateAttributeDefinition(AttributeDefDefaultView node)
          Updates the current Attribute Definition by saving its state to the DB.
 AttributeDefNodeView updateAttributeDefinition(AttributeDefNodeView node)
          Updates the current Attribute Definition node by saving its state to the DB.
 AttributeOrgDefaultView updateAttributeOrganizer(AttributeOrgDefaultView node)
          Updates the current Attribute Organizer by saving its state to the DB.
 AttributeOrgNodeView updateAttributeOrganizer(AttributeOrgNodeView node)
          Updates the current Attribute Organizer node by saving its state to the DB.
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, performStartupProcess, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

theIBADefinitionDBService

private static final IBADefinitionDBService theIBADefinitionDBService
Constructor Detail

StandardIBADefinitionService

public StandardIBADefinitionService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

registerEvents

public void registerEvents(ManagerService manager)
Overrides the registration of all applicable locking service events with the service manager.

Supported API: false

Specified by:
registerEvents in interface Manager
Overrides:
registerEvents in class StandardManager
Parameters:
manager -

dispatchVetoableEvent

protected void dispatchVetoableEvent(String eventType,
                                     Persistable definition)
                              throws WTException,
                                     WTPropertyVetoException
Dispatches a IBADefinitionServiceEvent that includes the event type and target (i.e., AbstractAttributeDefinition).

Supported API: false

Parameters:
eventType - The name of the PersistentManagerEvent type.
definition - The target of the persistable operation.
Throws:
WTException
WTPropertyVetoException

newStandardIBADefinitionService

public static StandardIBADefinitionService newStandardIBADefinitionService()
                                                                    throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardIBADefinitionService
Throws:
WTException

copyAttributeOrganizer

public AttributeOrgNodeView copyAttributeOrganizer(AttributeOrgNodeView sourceNode,
                                                   AttributeOrgNodeView targetParentNode)
                                            throws IBADefinitionException,
                                                   NotAuthorizedException,
                                                   WTException,
                                                   RemoteException
Copies the current AttributeOrgNodeView along with its children and attaches them to the new parent node. On the serverside, this operation actually involve creation of new instances of the nodes being copied. The client uses this method to perform Copy/Paste operation

Supported API: false

Specified by:
copyAttributeOrganizer in interface IBADefinitionService
Parameters:
sourceNode -
targetParentNode -
Returns:
AttributeOrgNodeView
Throws:
IBADefinitionException
NotAuthorizedException
WTException
RemoteException

copyAttributeDefinition

public AttributeDefNodeView copyAttributeDefinition(AttributeDefNodeView sourceNode,
                                                    AttributeOrgNodeView targetParentNode)
                                             throws IBADefinitionException,
                                                    NotAuthorizedException,
                                                    WTException,
                                                    RemoteException
Copies the current AttributeDefNodeView and its children and attached them to the new AttributeOrgNodeView parent node. On the serverside, this operation actually involve creation of new instances of the nodes being copied. The client uses this method to perform Copy/Paste operation

Supported API: false

Specified by:
copyAttributeDefinition in interface IBADefinitionService
Parameters:
sourceNode -
targetParentNode -
Returns:
AttributeDefNodeView
Throws:
IBADefinitionException
NotAuthorizedException
WTException
RemoteException

copyAttributeDefinition

public AttributeDefNodeView copyAttributeDefinition(AttributeDefNodeView sourceNode,
                                                    AttributeDefNodeView targetParentNode)
                                             throws IBADefinitionException,
                                                    NotAuthorizedException,
                                                    WTException,
                                                    RemoteException
Copies the current AttributeDefNodeView along with its children and attached them to the AttributeDefNodeView parent node. On the serverside, this operation actually involve creation of new instances of the nodes being copied. The client uses this method to perform Copy/Paste operation.

Supported API: false

Specified by:
copyAttributeDefinition in interface IBADefinitionService
Parameters:
sourceNode -
targetParentNode -
Returns:
AttributeDefNodeView
Throws:
IBADefinitionException
NotAuthorizedException
WTException
RemoteException

createAttributeDefinition

public AttributeDefDefaultView createAttributeDefinition(AttributeDefDefaultView attributeDef)
                                                  throws IBADefinitionException,
                                                         NotAuthorizedException,
                                                         WTException,
                                                         RemoteException
Creates the given attribute definition.

Supported API: false

Specified by:
createAttributeDefinition in interface IBADefinitionService
Parameters:
attributeDef -
Returns:
AttributeDefDefaultView
Throws:
IBADefinitionException
NotAuthorizedException
WTException
RemoteException

createAttributeOrganizer

public AttributeOrgDefaultView createAttributeOrganizer(AttributeOrgDefaultView attributeOrg)
                                                 throws IBADefinitionException,
                                                        NotAuthorizedException,
                                                        WTException,
                                                        RemoteException
Creates the given Attribute Organizer.

Supported API: false

Specified by:
createAttributeOrganizer in interface IBADefinitionService
Parameters:
attributeOrg -
Returns:
AttributeOrgDefaultView
Throws:
IBADefinitionException
NotAuthorizedException
WTException
RemoteException

deleteAttributeDefinition

public void deleteAttributeDefinition(AttributeDefDefaultView attributeDef)
                               throws IBADefinitionException,
                                      NotAuthorizedException,
                                      WTException,
                                      RemoteException
Deletes the given attribute definition and all its children..

Supported API: false

Specified by:
deleteAttributeDefinition in interface IBADefinitionService
Parameters:
attributeDef -
Throws:
IBADefinitionException
NotAuthorizedException
WTException
RemoteException

deleteAttributeOrganizer

public void deleteAttributeOrganizer(AttributeOrgDefaultView attributeOrg)
                              throws IBADefinitionException,
                                     NotAuthorizedException,
                                     WTException,
                                     RemoteException
Deletes the given attribute organizer and all its children.

Supported API: false

Specified by:
deleteAttributeOrganizer in interface IBADefinitionService
Parameters:
attributeOrg -
Throws:
IBADefinitionException
NotAuthorizedException
WTException
RemoteException

deleteAttributeOrganizer

public void deleteAttributeOrganizer(AttributeOrgNodeView node)
                              throws IBADefinitionException,
                                     NotAuthorizedException,
                                     WTException,
                                     RemoteException
Deletes the given attribute organizer and all its children.

Supported API: false

Specified by:
deleteAttributeOrganizer in interface IBADefinitionService
Parameters:
node -
Throws:
IBADefinitionException
NotAuthorizedException
WTException
RemoteException

deleteAttributeDefinition

public void deleteAttributeDefinition(AttributeDefNodeView node)
                               throws IBADefinitionException,
                                      NotAuthorizedException,
                                      WTException,
                                      RemoteException
Permantly delete the Attribute Definition node and its children from the DB.

Supported API: false

Specified by:
deleteAttributeDefinition in interface IBADefinitionService
Parameters:
node -
Throws:
IBADefinitionException
NotAuthorizedException
WTException
RemoteException

getAttributeOrganizerRoots

public AttributeOrgNodeView[] getAttributeOrganizerRoots()
                                                  throws WTException,
                                                         RemoteException
Returns the root (first) level of all the Attribute Organizer.

Supported API: false

Specified by:
getAttributeOrganizerRoots in interface IBADefinitionService
Returns:
AttributeOrgNodeView[]
Throws:
WTException
RemoteException

getAttributeChildren

public AbstractAttributeDefinizerNodeView[] getAttributeChildren(AbstractAttributeDefinizerNodeView node)
                                                          throws WTException,
                                                                 RemoteException
Returns all the direct children of the given attribute node. The returned nodes can either be AttributeOrgNodeView or AttributeDefNodeView, depending on whether the node represents a definition or an organizer.

Supported API: false

Specified by:
getAttributeChildren in interface IBADefinitionService
Parameters:
node -
Returns:
AbstractAttributeDefinizerNodeView[]
Throws:
WTException
RemoteException

getAttributeDefDefaultView

public AttributeDefDefaultView getAttributeDefDefaultView(AttributeDefNodeView attributeDef)
                                                   throws WTException,
                                                          RemoteException
Gets the attribute definition given the attribute node.

Supported API: false

Specified by:
getAttributeDefDefaultView in interface IBADefinitionService
Parameters:
attributeDef -
Returns:
AttributeDefDefaultView
Throws:
WTException
RemoteException

getAttributeDefDefaultViewByPath

public AttributeDefDefaultView getAttributeDefDefaultViewByPath(String path)
                                                         throws IBADefinitionException,
                                                                NotAuthorizedException,
                                                                WTException,
                                                                RemoteException
Get an attribute definition by specifing the path.

Supported API: false

Specified by:
getAttributeDefDefaultViewByPath in interface IBADefinitionService
Parameters:
path -
Returns:
AttributeDefDefaultView
Throws:
IBADefinitionException
NotAuthorizedException
WTException
RemoteException

getAttributeOrgDefaultView

public AttributeOrgDefaultView getAttributeOrgDefaultView(AttributeOrgNodeView attributeOrg)
                                                   throws WTException,
                                                          RemoteException
Returns the lite attribute organizer (AttributeOrgDefaultView) given the node.

Supported API: false

Specified by:
getAttributeOrgDefaultView in interface IBADefinitionService
Parameters:
attributeOrg -
Returns:
AttributeOrgDefaultView
Throws:
WTException
RemoteException

refreshAttributeDefDefaultView

public AttributeDefDefaultView refreshAttributeDefDefaultView(AttributeDefDefaultView attributeDef)
                                                       throws WTException,
                                                              RemoteException
Refreshes the given AttributeDefDefaultView by reloading the state of the same object from the DB.

Supported API: false

Specified by:
refreshAttributeDefDefaultView in interface IBADefinitionService
Parameters:
attributeDef -
Returns:
AttributeDefDefaultView
Throws:
WTException
RemoteException

refreshAttributeOrgDefaultView

public AttributeOrgDefaultView refreshAttributeOrgDefaultView(AttributeOrgDefaultView attributeOrg)
                                                       throws WTException,
                                                              RemoteException
Refreshes the given AttributeOrgDefaultView by reloading the state of the object from the DB. Because the "parent" and "children" attributes of the AbstractAttributeDefinizerNodeView are transient, after calling this method, these attributes should be set back to the returned objects, by calling setParent and setChildren.

Supported API: false

Specified by:
refreshAttributeOrgDefaultView in interface IBADefinitionService
Parameters:
attributeOrg -
Returns:
AttributeOrgDefaultView
Throws:
WTException
RemoteException

refreshAttributeDefNodeView

public AttributeDefNodeView refreshAttributeDefNodeView(AttributeDefNodeView node)
                                                 throws WTException,
                                                        RemoteException
Refreshes the current AttributeDefNodeView by reloading its state from the DB.

Supported API: false

Specified by:
refreshAttributeDefNodeView in interface IBADefinitionService
Parameters:
node -
Returns:
AttributeDefNodeView
Throws:
WTException
RemoteException

refreshAttributeOrgNodeView

public AttributeOrgNodeView refreshAttributeOrgNodeView(AttributeOrgNodeView node)
                                                 throws WTException,
                                                        RemoteException
Refreshes the current AttributeOrgNodeView by reloading its state from the DB.

Supported API: false

Specified by:
refreshAttributeOrgNodeView in interface IBADefinitionService
Parameters:
node -
Returns:
AttributeOrgNodeView
Throws:
WTException
RemoteException

updateAttributeDefinition

public AttributeDefDefaultView updateAttributeDefinition(AttributeDefDefaultView node)
                                                  throws IBADefinitionException,
                                                         NotAuthorizedException,
                                                         WTException,
                                                         RemoteException
Updates the current Attribute Definition by saving its state to the DB.

Supported API: false

Specified by:
updateAttributeDefinition in interface IBADefinitionService
Parameters:
node -
Returns:
AttributeDefDefaultView
Throws:
IBADefinitionException
NotAuthorizedException
WTException
RemoteException

updateAttributeOrganizer

public AttributeOrgDefaultView updateAttributeOrganizer(AttributeOrgDefaultView node)
                                                 throws IBADefinitionException,
                                                        NotAuthorizedException,
                                                        WTException,
                                                        RemoteException
Updates the current Attribute Organizer by saving its state to the DB. Because the "parent" and "children" attributes of the AbstractAttributeDefinizerNodeView are transient, after calling this method, these attributes must be set back to the returned objects, by calling setParent and setChildren.

Supported API: false

Specified by:
updateAttributeOrganizer in interface IBADefinitionService
Parameters:
node -
Returns:
AttributeOrgDefaultView
Throws:
IBADefinitionException
NotAuthorizedException
WTException
RemoteException

updateAttributeDefinition

public AttributeDefNodeView updateAttributeDefinition(AttributeDefNodeView node)
                                               throws IBADefinitionException,
                                                      NotAuthorizedException,
                                                      WTException,
                                                      RemoteException
Updates the current Attribute Definition node by saving its state to the DB.

Supported API: false

Specified by:
updateAttributeDefinition in interface IBADefinitionService
Parameters:
node -
Returns:
AttributeDefNodeView
Throws:
IBADefinitionException
NotAuthorizedException
WTException
RemoteException

updateAttributeOrganizer

public AttributeOrgNodeView updateAttributeOrganizer(AttributeOrgNodeView node)
                                              throws IBADefinitionException,
                                                     NotAuthorizedException,
                                                     WTException,
                                                     RemoteException
Updates the current Attribute Organizer node by saving its state to the DB.

Supported API: false

Specified by:
updateAttributeOrganizer in interface IBADefinitionService
Parameters:
node -
Returns:
AttributeOrgNodeView
Throws:
IBADefinitionException
NotAuthorizedException
WTException
RemoteException

removeInvalidCharactersFromName

private AbstractAttributeDefinizerView removeInvalidCharactersFromName(AbstractAttributeDefinizerView aadv)
                                                                throws WTException
Throws:
WTException

removeInvalidCharactersFromString

private String removeInvalidCharactersFromString(String s)

getIBADefinitionDBService

public IBADefinitionDBService getIBADefinitionDBService()