|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.buildforge.services.client.dbo.Environment
public final class Environment
Represents a set of name/value pairs used to form the final environment
settings for a Build
. Environments may be assigned to
Projects
, Servers
, and Steps
.
Each name/value pair is represented by a child EnvironmentEntry
.
Field Summary | |
---|---|
static java.lang.Class<Environment> |
CLASS
|
Constructor Summary | |
---|---|
Environment(APIClientConnection conn)
|
Method Summary | |
---|---|
void |
addEntry(EnvironmentEntry newEntry)
Add a new Entry to this Environment (at the end of the list) |
void |
addEntry(EnvironmentEntry newEntry,
int index)
Add a new Entry to this Environment, at the specified, 0-based index |
Environment |
clone()
Clones this Environment, complete with related EnvironmentEntries (also cloned), but clears the environment group id of the cloned object making it ready for a .create() call. |
EnvironmentEntry |
copyEntry(int fromIndex)
Copies the specified property from a specified. |
Environment |
copyEntry(int fromIndex,
int toIndex)
Copies the specified property into a new position in the property list |
Environment |
create()
Creates a new Environment in the database, including any related Environment Entries related to this Environment. |
void |
delete()
Removes this Environment, and all related Environment Entries from the database |
static java.util.List<Environment> |
findAll(APIClientConnection conn)
Returns the list of all Environments in the system. |
static Environment |
findById(APIClientConnection conn,
int envGroupId)
Retrieves the specified environment by envionment group id |
static Environment |
findByName(APIClientConnection conn,
java.lang.String environmentName)
Retrieves the specified environment by envionment group name |
java.util.List<EnvironmentEntry> |
getEntries()
Returns the List of Entries currently associated with this Environment |
EnvironmentEntry |
getEntry(int index)
Retrieves an Entry by 0-based index |
EnvironmentEntry |
getEntry(java.lang.String parameterName)
Retrieves an Entry by parameter name, or null if no Entry matches |
int |
getEnvGroupId()
Returns the Environment Group Identifier |
int |
getLevel()
Returns the security level associated with this Envionment |
java.lang.String |
getName()
Returns the pretty name of this Environment |
Environment |
moveEntry(int fromIndex,
int toIndex)
Moves an entry from one 0-based index to another. |
EnvironmentEntry |
removeEntry(int index)
Removes an Entry by 0-based index |
EnvironmentEntry |
removeEntry(java.lang.String parameterName)
Removes an Entry by parameter name |
void |
setLevel(int level)
Sets the security level the will be associated with this Environment |
void |
setName(java.lang.String name)
Sets the pretty name of this Environment |
java.lang.String |
toString()
|
Environment |
update()
Commits changes to this Environment only, not any related Environment Entries, to the database |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Class<Environment> CLASS
Constructor Detail |
---|
public Environment(APIClientConnection conn)
Method Detail |
---|
public static java.util.List<Environment> findAll(APIClientConnection conn) throws java.io.IOException, ServiceException
findById(APIClientConnection conn, int envId)
conn
-
java.io.IOException
ServiceException
public static Environment findById(APIClientConnection conn, int envGroupId) throws java.io.IOException, ServiceException
conn
- envGroupId
-
java.io.IOException
ServiceException
public static Environment findByName(APIClientConnection conn, java.lang.String environmentName) throws java.io.IOException, ServiceException
conn
- environmentName
-
java.io.IOException
ServiceException
public Environment create() throws java.io.IOException, ServiceException
java.io.IOException
ServiceException
- If the Environment already exists in the databasepublic Environment update() throws java.io.IOException, ServiceException
java.io.IOException
ServiceException
- If this Environment does not already exist in the databasepublic void delete() throws java.io.IOException, ServiceException
java.io.IOException
ServiceException
- If this Environment does not already exist in the databasepublic void addEntry(EnvironmentEntry newEntry) throws java.io.IOException, ServiceException
newEntry
-
java.io.IOException
ServiceException
public void addEntry(EnvironmentEntry newEntry, int index) throws java.io.IOException, ServiceException
newEntry
- index
-
java.io.IOException
ServiceException
public EnvironmentEntry removeEntry(java.lang.String parameterName) throws java.io.IOException, ServiceException
parameterName
-
java.io.IOException
ServiceException
public EnvironmentEntry removeEntry(int index) throws java.io.IOException, ServiceException
index
-
java.io.IOException
ServiceException
public Environment moveEntry(int fromIndex, int toIndex) throws java.io.IOException, ServiceException
fromIndex
- the index to move fromtoIndex
- the index before which to move the Entry to, 0 for head of the list
java.io.IOException
ServiceException
public EnvironmentEntry copyEntry(int fromIndex) throws ServiceException
fromIndex
-
ServiceException
public Environment copyEntry(int fromIndex, int toIndex) throws java.io.IOException, ServiceException
fromIndex
- the 0-based index to copy fromtoIndex
- the 0-based index to copy to, the new object will inserted at this index, moving existing objects down the list
java.io.IOException
ServiceException
public Environment clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int getEnvGroupId()
public int getLevel()
public java.lang.String getName()
public java.util.List<EnvironmentEntry> getEntries()
public EnvironmentEntry getEntry(int index) throws APIException
parameterName
-
APIException
public EnvironmentEntry getEntry(java.lang.String parameterName)
parameterName
-
public void setLevel(int level)
level
- public void setName(java.lang.String name)
name
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |