org.rhq.core.domain.operation
Class OperationDefinition

java.lang.Object
  extended by org.rhq.core.domain.operation.OperationDefinition
All Implemented Interfaces:
Serializable

public class OperationDefinition
extends Object
implements Serializable

The definition of an RHQ operation. An operation definition is associated with a particular physical resource type (e.g. JBossAS server) and an optional resource version range.

See Also:
Serialized Form

Field Summary
static String QUERY_FIND_BY_GROUP_AND_NAME
           
static String QUERY_FIND_BY_RESOURCE_AND_NAME
           
static String QUERY_FIND_BY_TYPE_AND_NAME
           
static String QUERY_FIND_LIGHT_WEIGHT_BY_GROUP_AND_NAME
           
static String QUERY_FIND_LIGHT_WEIGHT_BY_RESOURCE_AND_NAME
           
static String QUERY_FIND_LIGHT_WEIGHT_BY_TYPE_AND_NAME
           
static String TIMEOUT_PARAM_NAME
          This defines the name of the simple parameter property that is used to define a specific timeout for a specific operation invocation.
 
Constructor Summary
protected OperationDefinition()
           
  OperationDefinition(int id, String name, String resourceVersionRange, String description, Integer timeout, String displayName)
           
  OperationDefinition(ResourceType resourceType, String name)
           
  OperationDefinition(String name, String resourceVersionRange, String description)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getDescription()
           
 String getDisplayName()
           
 int getId()
           
 String getName()
           
 ConfigurationDefinition getParametersConfigurationDefinition()
           
 ResourceType getResourceType()
           
 String getResourceVersionRange()
           
 ConfigurationDefinition getResultsConfigurationDefinition()
           
 Integer getTimeout()
          Specifies the default timeout for any invocation of this operation, specified in seconds.
 int hashCode()
           
 void setDescription(String description)
           
 void setDisplayName(String displayName)
           
 void setId(int id)
           
 void setName(String name)
           
 void setParametersConfigurationDefinition(ConfigurationDefinition parametersConfigurationDefinition)
           
 void setResourceType(ResourceType resourceType)
           
 void setResourceVersionRange(String resourceVersionRange)
           
 void setResultsConfigurationDefinition(ConfigurationDefinition resultsConfigurationDefinition)
           
 void setTimeout(Integer timeout)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_FIND_BY_TYPE_AND_NAME

public static final String QUERY_FIND_BY_TYPE_AND_NAME
See Also:
Constant Field Values

QUERY_FIND_LIGHT_WEIGHT_BY_TYPE_AND_NAME

public static final String QUERY_FIND_LIGHT_WEIGHT_BY_TYPE_AND_NAME
See Also:
Constant Field Values

QUERY_FIND_BY_RESOURCE_AND_NAME

public static final String QUERY_FIND_BY_RESOURCE_AND_NAME
See Also:
Constant Field Values

QUERY_FIND_LIGHT_WEIGHT_BY_RESOURCE_AND_NAME

public static final String QUERY_FIND_LIGHT_WEIGHT_BY_RESOURCE_AND_NAME
See Also:
Constant Field Values

QUERY_FIND_BY_GROUP_AND_NAME

public static final String QUERY_FIND_BY_GROUP_AND_NAME
See Also:
Constant Field Values

QUERY_FIND_LIGHT_WEIGHT_BY_GROUP_AND_NAME

public static final String QUERY_FIND_LIGHT_WEIGHT_BY_GROUP_AND_NAME
See Also:
Constant Field Values

TIMEOUT_PARAM_NAME

public static final String TIMEOUT_PARAM_NAME
This defines the name of the simple parameter property that is used to define a specific timeout for a specific operation invocation. If an operation invocation passes in a simple property with this name, its value must be an integer specified in seconds and it defines how long the operation is given before it is timed out and assumed to have failed. This parameter never shows up in the operation definition's metadata - it is a "special" parameter that is only used internally. It can be missing entirely or it can be specified for any operation invocation.

See Also:
Constant Field Values
Constructor Detail

OperationDefinition

protected OperationDefinition()

OperationDefinition

public OperationDefinition(int id,
                           String name,
                           String resourceVersionRange,
                           String description,
                           Integer timeout,
                           String displayName)

OperationDefinition

public OperationDefinition(@NotNull
                           String name,
                           String resourceVersionRange,
                           String description)

OperationDefinition

public OperationDefinition(ResourceType resourceType,
                           @NotNull
                           String name)
Method Detail

getId

public int getId()

setId

public void setId(int id)

getResourceType

public ResourceType getResourceType()

setResourceType

public void setResourceType(ResourceType resourceType)

getName

@NotNull
public String getName()

setName

public void setName(@NotNull
                    String name)

getDisplayName

@NotNull
public String getDisplayName()

setDisplayName

public void setDisplayName(String displayName)

getResourceVersionRange

public String getResourceVersionRange()

setResourceVersionRange

public void setResourceVersionRange(String resourceVersionRange)

getParametersConfigurationDefinition

public ConfigurationDefinition getParametersConfigurationDefinition()

setParametersConfigurationDefinition

public void setParametersConfigurationDefinition(ConfigurationDefinition parametersConfigurationDefinition)

getResultsConfigurationDefinition

public ConfigurationDefinition getResultsConfigurationDefinition()

setResultsConfigurationDefinition

public void setResultsConfigurationDefinition(ConfigurationDefinition resultsConfigurationDefinition)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getTimeout

public Integer getTimeout()
Specifies the default timeout for any invocation of this operation, specified in seconds. Any specific invocation can override this timeout if it passes in a simple property parameter named TIMEOUT_PARAM_NAME.

Returns:
default timeout, or null if not defined

setTimeout

public void setTimeout(Integer timeout)

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.