Class NetworkResourcesRelationshipManagementAction
- java.lang.Object
-
- org.neotropic.kuwaiba.core.apis.integration.modules.actions.AbstractVisualAction
-
- org.neotropic.kuwaiba.core.apis.integration.modules.actions.AbstractVisualInventoryAction
-
- org.neotropic.kuwaiba.core.apis.integration.modules.actions.AbstractRelationshipManagementAction
-
- org.neotropic.kuwaiba.modules.optional.serviceman.actions.NetworkResourcesRelationshipManagementAction
-
- All Implemented Interfaces:
Comparable
@Component public class NetworkResourcesRelationshipManagementAction extends AbstractRelationshipManagementAction
Handles the relationships between network resources and services. The relationship name is "uses".- Author:
- Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.neotropic.kuwaiba.core.apis.integration.modules.actions.AbstractRelationshipManagementAction
AbstractRelationshipManagementAction.RelationshipCardinality
-
Nested classes/interfaces inherited from class org.neotropic.kuwaiba.core.apis.integration.modules.actions.AbstractVisualAction
AbstractVisualAction.VisualActionType
-
-
Field Summary
-
Fields inherited from class org.neotropic.kuwaiba.core.apis.integration.modules.actions.AbstractVisualInventoryAction
SELECTION_ANY_OBJECTS, SELECTION_NO_OBJECTS
-
Fields inherited from class org.neotropic.kuwaiba.core.apis.integration.modules.actions.AbstractVisualAction
childrenActions, formatOptions, icon, listeners, moduleId, type
-
-
Constructor Summary
Constructors Constructor Description NetworkResourcesRelationshipManagementAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createRelationship(List<BusinessObjectLight> sourceObjects, List<BusinessObjectLight> targetObjects)
Creates the actual relationships between the the source object and the target objects, depending on the cardinality defined inAbstractRelationshipManagementAction.getCardinality()
.AbstractRelationshipManagementAction.RelationshipCardinality
getCardinality()
Indicates the cardinality of the relationship.String
getIncomingRelationshipDisplayName()
The display name that should be used to show the relationship between the target object(s) and the selected object(s).AbstractAction
getModuleAction()
The underlying action wrapped by this visual object.String
getName()
String
getOutgoingRelationshipDisplayName()
The display name that should be used to show the relationship between the selected object(s) and the target object(s).String
getRelationshipName()
Gets the actual name of the relationship in the database.int
getRequiredSelectedObjects()
How many objects have to be selected so this action is enabled.String
getTargetObjectClass()
Returns the type of inventory objects that can be related through the given relationship to the selected objects.ConfirmDialog
getVisualComponent(ModuleActionParameterSet parameters)
The visual component (a XXLayout, for example), to be embedded in a Dialog upon triggering the action.void
releaseRelationship(List<BusinessObjectLight> sourceObjects, List<BusinessObjectLight> targetObjects)
Releases the actual relationships between the the source object and the target objects.-
Methods inherited from class org.neotropic.kuwaiba.core.apis.integration.modules.actions.AbstractVisualInventoryAction
appliesTo, toString
-
Methods inherited from class org.neotropic.kuwaiba.core.apis.integration.modules.actions.AbstractVisualAction
clearListeners, compareTo, fireActionCompletedEvent, getChildrenActions, getFormatOptions, getIcon, getModuleId, registerActionCompletedLister, setChildrenActions, setFormatOptions, setIcon, setModuleId, unregisterListener
-
-
-
-
Method Detail
-
getTargetObjectClass
public String getTargetObjectClass()
Description copied from class:AbstractRelationshipManagementAction
Returns the type of inventory objects that can be related through the given relationship to the selected objects.- Specified by:
getTargetObjectClass
in classAbstractRelationshipManagementAction
- Returns:
- The type (it can be an abstract class)
-
getRelationshipName
public String getRelationshipName()
Description copied from class:AbstractRelationshipManagementAction
Gets the actual name of the relationship in the database.- Specified by:
getRelationshipName
in classAbstractRelationshipManagementAction
- Returns:
- Said relationship name.
-
getIncomingRelationshipDisplayName
public String getIncomingRelationshipDisplayName()
Description copied from class:AbstractRelationshipManagementAction
The display name that should be used to show the relationship between the target object(s) and the selected object(s).- Specified by:
getIncomingRelationshipDisplayName
in classAbstractRelationshipManagementAction
- Returns:
- Said display name.
-
getOutgoingRelationshipDisplayName
public String getOutgoingRelationshipDisplayName()
Description copied from class:AbstractRelationshipManagementAction
The display name that should be used to show the relationship between the selected object(s) and the target object(s).- Specified by:
getOutgoingRelationshipDisplayName
in classAbstractRelationshipManagementAction
- Returns:
- Said display name.
-
getCardinality
public AbstractRelationshipManagementAction.RelationshipCardinality getCardinality()
Description copied from class:AbstractRelationshipManagementAction
Indicates the cardinality of the relationship. SeeAbstractRelationshipManagementAction.RelationshipCardinality
for possible values.- Specified by:
getCardinality
in classAbstractRelationshipManagementAction
- Returns:
- Said cardinality.
-
getName
public String getName()
- Overrides:
getName
in classAbstractVisualInventoryAction
-
getRequiredSelectedObjects
public int getRequiredSelectedObjects()
Description copied from class:AbstractVisualInventoryAction
How many objects have to be selected so this action is enabled. Use -1 for any (-1), 0 if no objects have to be selected (0), or a number greater than 0 for a fixed number.- Specified by:
getRequiredSelectedObjects
in classAbstractVisualInventoryAction
- Returns:
- The number of objects that have to be selected so the action is enabled.
-
createRelationship
public void createRelationship(List<BusinessObjectLight> sourceObjects, List<BusinessObjectLight> targetObjects) throws IllegalArgumentException
Description copied from class:AbstractRelationshipManagementAction
Creates the actual relationships between the the source object and the target objects, depending on the cardinality defined inAbstractRelationshipManagementAction.getCardinality()
.- Specified by:
createRelationship
in classAbstractRelationshipManagementAction
- Parameters:
sourceObjects
- The list of source objects to be related.targetObjects
- The list of target objects to be related.- Throws:
IllegalArgumentException
- If the cardinality or the type of target objects does not match the one specified in theAbstractRelationshipManagementAction.getCardinality()
andAbstractRelationshipManagementAction.getTargetObjectClass()
methods.
-
getModuleAction
public AbstractAction getModuleAction()
Description copied from class:AbstractVisualAction
The underlying action wrapped by this visual object.- Specified by:
getModuleAction
in classAbstractVisualAction
- Returns:
- The action.
-
getVisualComponent
public ConfirmDialog getVisualComponent(ModuleActionParameterSet parameters)
Description copied from class:AbstractVisualAction
The visual component (a XXLayout, for example), to be embedded in a Dialog upon triggering the action.- Specified by:
getVisualComponent
in classAbstractVisualAction
- Parameters:
parameters
- The initial parameters necessary to build the visual component. Some or all these parameters might be later passed to the underlyingAbstractAction
.- Returns:
- The visual component.
-
releaseRelationship
public void releaseRelationship(List<BusinessObjectLight> sourceObjects, List<BusinessObjectLight> targetObjects) throws IllegalArgumentException
Description copied from class:AbstractRelationshipManagementAction
Releases the actual relationships between the the source object and the target objects. What "releases" means can be- Specified by:
releaseRelationship
in classAbstractRelationshipManagementAction
- Parameters:
sourceObjects
- The list of source objects to be related.targetObjects
- The list of target objects to be related.- Throws:
IllegalArgumentException
- If the cardinality or the type of target objects does not match the one specified in theAbstractRelationshipManagementAction.getCardinality()
andAbstractRelationshipManagementAction.getTargetObjectClass()
methods.
-
-