org.tango.server.dynamic
Class DynamicManager

java.lang.Object
  extended by org.tango.server.dynamic.DynamicManager

public final class DynamicManager
extends java.lang.Object

Manage dynamic commands and attributes. The creation of commands and attributes should done in Init. Don't forget to delete them in Delete This class is injected by DynamicManagement

Author:
ABEILLE

Constructor Summary
DynamicManager(DeviceImpl deviceImpl)
          Ctr
 
Method Summary
 void addAttribute(IAttributeBehavior behavior)
          Add attribute.
 void addCommand(ICommandBehavior behavior)
          Add command.
 void clearAll()
          Remove all dynamic attributes and commands
 void clearAll(boolean clearAttributeProperties)
          Remove all dynamic attributes and commands
 void clearAttributes()
          Remove all dynamic attributes
 void clearAttributes(boolean clearAttributeProperties)
          Remove all dynamic attributes
 void clearAttributesWithExclude(java.lang.String... exclude)
          Remove all dynamic attributes with exceptions
 void clearCommands()
          Remove all dynamic commands
 void clearCommandsWithExclude(java.lang.String... exclude)
          Remove all dynamic command with exceptions
 IAttributeBehavior getAttribute(java.lang.String attributeName)
          Get a dynamic attribute
 ICommandBehavior getCommand(java.lang.String commandName)
          Get a dynamic command
 java.util.List<IAttributeBehavior> getDynamicAttributes()
          Retrieve all dynamic attributes
 java.util.List<ICommandBehavior> getDynamicCommands()
          Retrieve all dynamic commands
 void removeAttribute(java.lang.String attributeName)
          remove a dynamic attribute
 void removeAttribute(java.lang.String attributeName, boolean clearAttributeProperties)
          remove a dynamic attribute
 void removeCommand(java.lang.String commandName)
          Remove a command
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicManager

public DynamicManager(DeviceImpl deviceImpl)
Ctr

Parameters:
deviceImpl - the associated device
Method Detail

addAttribute

public void addAttribute(IAttributeBehavior behavior)
                  throws fr.esrf.Tango.DevFailed
Add attribute. Only if not already exists on device.

Parameters:
behavior -
Throws:
fr.esrf.Tango.DevFailed

removeAttribute

public void removeAttribute(java.lang.String attributeName)
                     throws fr.esrf.Tango.DevFailed
remove a dynamic attribute

Parameters:
attributeName - attribute name
Throws:
fr.esrf.Tango.DevFailed

removeAttribute

public void removeAttribute(java.lang.String attributeName,
                            boolean clearAttributeProperties)
                     throws fr.esrf.Tango.DevFailed
remove a dynamic attribute

Parameters:
attributeName - attribute name
Throws:
fr.esrf.Tango.DevFailed

clearAttributesWithExclude

public void clearAttributesWithExclude(java.lang.String... exclude)
                                throws fr.esrf.Tango.DevFailed
Remove all dynamic attributes with exceptions

Parameters:
exclude - The attribute that will not be removed
Throws:
fr.esrf.Tango.DevFailed

clearAttributes

public void clearAttributes()
                     throws fr.esrf.Tango.DevFailed
Remove all dynamic attributes

Throws:
fr.esrf.Tango.DevFailed

clearAttributes

public void clearAttributes(boolean clearAttributeProperties)
                     throws fr.esrf.Tango.DevFailed
Remove all dynamic attributes

Parameters:
clearAttributeProperties - true to remove all attributes properties from tango db
Throws:
fr.esrf.Tango.DevFailed

getDynamicAttributes

public java.util.List<IAttributeBehavior> getDynamicAttributes()
Retrieve all dynamic attributes

Returns:
Dynamic attributes

getAttribute

public IAttributeBehavior getAttribute(java.lang.String attributeName)
Get a dynamic attribute

Parameters:
attributeName - the attribute name
Returns:
The dynamic attribute

addCommand

public void addCommand(ICommandBehavior behavior)
                throws fr.esrf.Tango.DevFailed
Add command. Only if not already exists on device

Parameters:
behavior -
Throws:
fr.esrf.Tango.DevFailed

removeCommand

public void removeCommand(java.lang.String commandName)
                   throws fr.esrf.Tango.DevFailed
Remove a command

Parameters:
commandName - command name
Throws:
fr.esrf.Tango.DevFailed

getCommand

public ICommandBehavior getCommand(java.lang.String commandName)
Get a dynamic command

Parameters:
commandName - command name
Returns:
The dynamic command

clearCommands

public void clearCommands()
                   throws fr.esrf.Tango.DevFailed
Remove all dynamic commands

Throws:
fr.esrf.Tango.DevFailed

clearCommandsWithExclude

public void clearCommandsWithExclude(java.lang.String... exclude)
                              throws fr.esrf.Tango.DevFailed
Remove all dynamic command with exceptions

Parameters:
exclude - The commands that will not be removed
Throws:
fr.esrf.Tango.DevFailed

getDynamicCommands

public java.util.List<ICommandBehavior> getDynamicCommands()
Retrieve all dynamic commands

Returns:
Dynamic commands

clearAll

public void clearAll()
              throws fr.esrf.Tango.DevFailed
Remove all dynamic attributes and commands

Throws:
fr.esrf.Tango.DevFailed

clearAll

public void clearAll(boolean clearAttributeProperties)
              throws fr.esrf.Tango.DevFailed
Remove all dynamic attributes and commands

Parameters:
clearAttributeProperties - to remove attributes properties from tango db
Throws:
fr.esrf.Tango.DevFailed


Copyright © 2012-2015. All Rights Reserved.