org.rhq.core.domain.drift.dto
Class DriftChangeSetDTO

java.lang.Object
  extended by org.rhq.core.domain.drift.dto.DriftChangeSetDTO
All Implemented Interfaces:
Serializable, DriftChangeSet<DriftDTO>

public class DriftChangeSetDTO
extends Object
implements DriftChangeSet<DriftDTO>, Serializable

See Also:
Serialized Form

Constructor Summary
DriftChangeSetDTO()
           
 
Method Summary
 DriftChangeSetCategory getCategory()
          Retturns the category that identifies the change set type.
 Long getCtime()
           
 int getDriftDefinitionId()
          Returns the id of the owning drift definition.
 DriftConfigurationDefinition.DriftHandlingMode getDriftHandlingMode()
          Returns the drift handling mode of the owning drift definition at the time of change set creation.
 Set<DriftDTO> getDrifts()
           
 String getId()
          Returns a string that uniquely identifies the change set.
 int getResourceId()
          Returns the id of the resource to which the drift definition is assigned.
 int getVersion()
          Every change set must be assigned a version that is unique within the context of the owning DriftDefinition.
 void setCategory(DriftChangeSetCategory category)
          Sets the change set category.
 void setCtime(Long ctime)
           
 void setDriftDefinitionId(int id)
          Sets the id of the owning drift definition.
 void setDriftHandlingMode(DriftConfigurationDefinition.DriftHandlingMode mode)
          Sets the drift handling mode for the change set.
 void setDrifts(Set<DriftDTO> drifts)
           
 void setId(String id)
          Sets the change set id which should be unique.
 void setResourceId(int id)
          Sets the id of the resource to which the drift definition is assigned.
 void setVersion(int version)
          Sets the change set version number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DriftChangeSetDTO

public DriftChangeSetDTO()
Method Detail

getId

public String getId()
Description copied from interface: DriftChangeSet
Returns a string that uniquely identifies the change set. The format of the string is implementation dependent and as such there is no requirement that the id be stored as a string, only that it has a string representation.

Specified by:
getId in interface DriftChangeSet<DriftDTO>
Returns:
A unique id as a string

setId

public void setId(String id)
Description copied from interface: DriftChangeSet
Sets the change set id which should be unique. Implementations are free to store the id in any format.

Specified by:
setId in interface DriftChangeSet<DriftDTO>
Parameters:
id - The change set identifier that should be unique

getCtime

public Long getCtime()
Specified by:
getCtime in interface DriftChangeSet<DriftDTO>
Returns:
The time that the change set was created

setCtime

public void setCtime(Long ctime)

getVersion

public int getVersion()
Description copied from interface: DriftChangeSet
Every change set must be assigned a version that is unique within the context of the owning DriftDefinition. This is analgous to a revision number in a version control system like SVN.

Specified by:
getVersion in interface DriftChangeSet<DriftDTO>
Returns:
The change set version number that is unique within the context of its owning DriftDefinition.

setVersion

public void setVersion(int version)
Description copied from interface: DriftChangeSet
Sets the change set version number. Note that change set version numbers must be unique within the context of the owning DriftDefinition. Change sets should be assigned version numbers in increasing order. The first change set saved should have a version of N, the second should have a value of N + 1, etc.

Specified by:
setVersion in interface DriftChangeSet<DriftDTO>
Parameters:
version - The version number.

getCategory

public DriftChangeSetCategory getCategory()
Description copied from interface: DriftChangeSet
Retturns the category that identifies the change set type.

Specified by:
getCategory in interface DriftChangeSet<DriftDTO>
Returns:
The change set category
See Also:
DriftChangeSetCategory

setCategory

public void setCategory(DriftChangeSetCategory category)
Description copied from interface: DriftChangeSet
Sets the change set category.

Specified by:
setCategory in interface DriftChangeSet<DriftDTO>
Parameters:
category - The category that identifies the change set type
See Also:
DriftChangeSetCategory

getDriftDefinitionId

public int getDriftDefinitionId()
Description copied from interface: DriftChangeSet
Returns the id of the owning drift definition. Note that while server plugins are responsible for managing the persistence of change sets, the RHQ server manages the persistence of the owning drift definition.

Specified by:
getDriftDefinitionId in interface DriftChangeSet<DriftDTO>
Returns:
The DriftDefinition id

setDriftDefinitionId

public void setDriftDefinitionId(int id)
Description copied from interface: DriftChangeSet
Sets the id of the owning drift definition. Note that while server plugins are responsible for managing the persistence of change sets, the RHQ server manages the persistence of the drift definition.

Specified by:
setDriftDefinitionId in interface DriftChangeSet<DriftDTO>
Parameters:
id - The DriftDefinition id

getResourceId

public int getResourceId()
Description copied from interface: DriftChangeSet
Returns the id of the resource to which the drift definition is assigned. Note that the RHQ server and not drift server plugins manage the persistence of the resource.

Specified by:
getResourceId in interface DriftChangeSet<DriftDTO>
Returns:
The id of the resource to which the drift definition belongs

setResourceId

public void setResourceId(int id)
Description copied from interface: DriftChangeSet
Sets the id of the resource to which the drift definition is assigned. Note that the RHQ server and not the drift server plugins manage the persistence of the resource

Specified by:
setResourceId in interface DriftChangeSet<DriftDTO>
Parameters:
id - The Resource id

getDrifts

public Set<DriftDTO> getDrifts()
Specified by:
getDrifts in interface DriftChangeSet<DriftDTO>
Returns:
The entries that comprise this change set

setDrifts

public void setDrifts(Set<DriftDTO> drifts)
Specified by:
setDrifts in interface DriftChangeSet<DriftDTO>
Parameters:
drifts - The entries that make up this change set

getDriftHandlingMode

public DriftConfigurationDefinition.DriftHandlingMode getDriftHandlingMode()
Description copied from interface: DriftChangeSet
Returns the drift handling mode of the owning drift definition at the time of change set creation. Because the value set on the owning drift definition can change, the value must be stored with the change set such that it can be applied consistently when handling the associated drift.

Specified by:
getDriftHandlingMode in interface DriftChangeSet<DriftDTO>
Returns:
The DriftDefinition.DriftHandlingMode mode

setDriftHandlingMode

public void setDriftHandlingMode(DriftConfigurationDefinition.DriftHandlingMode mode)
Description copied from interface: DriftChangeSet
Sets the drift handling mode for the change set. It should be set to the owning drift definition's drift handling mode at the time of change set creation. Because the value set on the owning drift definition can change, the value must be stored with the change set such that it can be applied consistently when handling the associated drift.

Specified by:
setDriftHandlingMode in interface DriftChangeSet<DriftDTO>
Parameters:
mode - The DriftDefinition.DriftHandlingMode mode


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