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 voidcreateRelationship(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.RelationshipCardinalitygetCardinality()Indicates the cardinality of the relationship.StringgetIncomingRelationshipDisplayName()The display name that should be used to show the relationship between the target object(s) and the selected object(s).AbstractActiongetModuleAction()The underlying action wrapped by this visual object.StringgetName()StringgetOutgoingRelationshipDisplayName()The display name that should be used to show the relationship between the selected object(s) and the target object(s).StringgetRelationshipName()Gets the actual name of the relationship in the database.intgetRequiredSelectedObjects()How many objects have to be selected so this action is enabled.StringgetTargetObjectClass()Returns the type of inventory objects that can be related through the given relationship to the selected objects.ConfirmDialoggetVisualComponent(ModuleActionParameterSet parameters)The visual component (a XXLayout, for example), to be embedded in a Dialog upon triggering the action.voidreleaseRelationship(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:AbstractRelationshipManagementActionReturns the type of inventory objects that can be related through the given relationship to the selected objects.- Specified by:
 getTargetObjectClassin classAbstractRelationshipManagementAction- Returns:
 - The type (it can be an abstract class)
 
 
- 
getRelationshipName
public String getRelationshipName()
Description copied from class:AbstractRelationshipManagementActionGets the actual name of the relationship in the database.- Specified by:
 getRelationshipNamein classAbstractRelationshipManagementAction- Returns:
 - Said relationship name.
 
 
- 
getIncomingRelationshipDisplayName
public String getIncomingRelationshipDisplayName()
Description copied from class:AbstractRelationshipManagementActionThe display name that should be used to show the relationship between the target object(s) and the selected object(s).- Specified by:
 getIncomingRelationshipDisplayNamein classAbstractRelationshipManagementAction- Returns:
 - Said display name.
 
 
- 
getOutgoingRelationshipDisplayName
public String getOutgoingRelationshipDisplayName()
Description copied from class:AbstractRelationshipManagementActionThe display name that should be used to show the relationship between the selected object(s) and the target object(s).- Specified by:
 getOutgoingRelationshipDisplayNamein classAbstractRelationshipManagementAction- Returns:
 - Said display name.
 
 
- 
getCardinality
public AbstractRelationshipManagementAction.RelationshipCardinality getCardinality()
Description copied from class:AbstractRelationshipManagementActionIndicates the cardinality of the relationship. SeeAbstractRelationshipManagementAction.RelationshipCardinalityfor possible values.- Specified by:
 getCardinalityin classAbstractRelationshipManagementAction- Returns:
 - Said cardinality.
 
 
- 
getName
public String getName()
- Overrides:
 getNamein classAbstractVisualInventoryAction
 
- 
getRequiredSelectedObjects
public int getRequiredSelectedObjects()
Description copied from class:AbstractVisualInventoryActionHow 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:
 getRequiredSelectedObjectsin 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:AbstractRelationshipManagementActionCreates the actual relationships between the the source object and the target objects, depending on the cardinality defined inAbstractRelationshipManagementAction.getCardinality().- Specified by:
 createRelationshipin 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:AbstractVisualActionThe underlying action wrapped by this visual object.- Specified by:
 getModuleActionin classAbstractVisualAction- Returns:
 - The action.
 
 
- 
getVisualComponent
public ConfirmDialog getVisualComponent(ModuleActionParameterSet parameters)
Description copied from class:AbstractVisualActionThe visual component (a XXLayout, for example), to be embedded in a Dialog upon triggering the action.- Specified by:
 getVisualComponentin 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:AbstractRelationshipManagementActionReleases the actual relationships between the the source object and the target objects. What "releases" means can be- Specified by:
 releaseRelationshipin 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.
 
 - 
 
 -