com.versionone.om
Class Environment

java.lang.Object
  extended by com.versionone.om.Entity
      extended by com.versionone.om.Environment

public class Environment
extends Entity

The Environment asset.


Field Summary
protected static int STATE_ACTIVE
           
protected static int STATE_CLOSED
           
 
Fields inherited from class com.versionone.om.Entity
ASSET_STATE_VALUE, ASSET_VALUE, CHANGE_DATE_UTC, CONTENT_TYPE_VALUE, CONTENT_VALUE, CREATE_DATE_UTC, DELETE_OPERATION, DESCRIPTION_VALUE, FILENAME_VALUE, NAME_VALUE
 
Constructor Summary
protected Environment(AssetID id, V1Instance instance)
          Constructor used to represent an Environment entity that DOES exist in the VersionOne System.
protected Environment(V1Instance instance)
          Constructor used to represent an Environment entity that does NOT yet exist in the VersionOne System.
 
Method Summary
 boolean canClose()
           
 boolean canReactivate()
           
 void close()
          Closes or Inactivates the item.
 java.lang.String getDisplayID()
           
 java.lang.String getName()
           
 Project getProject()
           
 java.util.Collection<TestSet> getTestSets(TestSetFilter filter)
          TestSets associated with this Environment.
 boolean isActive()
           
 boolean isClosed()
           
 void reactivate()
          Reactivates the item.
 void setName(java.lang.String name)
           
 void setProject(Project project)
           
 
Methods inherited from class com.versionone.om.Entity
equals, get, getChangeComment, getChangeDate, getChangedBy, getCreateComment, getCreateDate, getCreatedBy, getID, getInstance, hashCode, save, save, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

STATE_CLOSED

protected static final int STATE_CLOSED
See Also:
Constant Field Values

STATE_ACTIVE

protected static final int STATE_ACTIVE
See Also:
Constant Field Values
Constructor Detail

Environment

protected Environment(AssetID id,
                      V1Instance instance)
Constructor used to represent an Environment entity that DOES exist in the VersionOne System.

Parameters:
id - Unique ID of this entity.
instance - this entity belongs to.

Environment

protected Environment(V1Instance instance)
Constructor used to represent an Environment entity that does NOT yet exist in the VersionOne System.

Parameters:
instance - this entity belongs to.
Method Detail

getName

public java.lang.String getName()
Returns:
Name of the Environment.

setName

public void setName(java.lang.String name)
Parameters:
name - Name of the Environment.

getProject

public Project getProject()
Returns:
The Project this Environment belongs in. This must be present.

setProject

public void setProject(Project project)
Parameters:
project - The Project this Environment belongs in.

getDisplayID

public java.lang.String getDisplayID()
Returns:
ID (or Number) of this entity as displayed in the VersionOne system.

getTestSets

public java.util.Collection<TestSet> getTestSets(TestSetFilter filter)
TestSets associated with this Environment.

Parameters:
filter - Criteria to filter TestSets on.
Returns:
Related Test Sets.

isActive

public boolean isActive()
Returns:
Indicates if the entity is open or active.

isClosed

public boolean isClosed()
Returns:
Indicates if the entity is closed or inactive.

canClose

public boolean canClose()
Returns:
True if the item can be closed.

close

public void close()
           throws java.lang.UnsupportedOperationException
Closes or Inactivates the item.

Throws:
java.lang.UnsupportedOperationException - if the item is an invalid state for the Operation, e.g. it is already closed or inactive.

canReactivate

public boolean canReactivate()
Returns:
True if item can be Reactivated.

reactivate

public void reactivate()
                throws java.lang.UnsupportedOperationException
Reactivates the item.

Throws:
java.lang.UnsupportedOperationException - if the item is an invalid state for the Operation, e.g. it is already open or active.