org.bibalex.daf.entities
Class WorkStation

java.lang.Object
  extended by org.bibalex.daf.entities.AdminModuleBase
      extended by org.bibalex.daf.entities.WorkStation

public class WorkStation
extends AdminModuleBase


Field Summary
private  DBConnection conn
           
private  int id
           
private  int OS_ID
           
private  boolean wrkstAnyPhase
           
private  java.lang.String wrkstComment
           
private  boolean wrkstIsActive
           
private  java.lang.String wrkstLocation
           
private  java.lang.String wrkstName
           
private  java.lang.String wrkstWorkingDirectory
           
 
Constructor Summary
WorkStation()
          Class Constructor
WorkStation(DataTable table)
           
WorkStation(int WSID)
           
 
Method Summary
 OperationInfo add()
          Add new WS
 OperationInfo delete()
          delete WS
 OperationInfo deleteCascade()
          delete WS in cascade
 java.lang.String getActualWorkingDir(java.lang.String username)
          Gets WorkStation Working Directory after replacing '$username$' by the given username.
 OperationInfo getAssignedPhases()
          Get Assigned Phases to this workstation
 OperationInfo getAssignedPhasesSpecial()
           
static OperationInfo getByID(int recID)
          select WS
static OperationInfo getByName(java.lang.String workstationName)
          select WS by name
 OperationInfo getDevices()
          load the devices assigned to workstation
 int getID()
          Gets the ID of the workstation.
 OperationInfo getMediaTypes()
          load the devices assigned to workstation
 boolean getWSAnyPhase()
          get WorkStation AnyPhase value
 java.lang.String getWSComment()
          get WorkStation Comment
 boolean getWSIsActive()
          get WorkStation IsActive value
 java.lang.String getWSLocation()
          get WorkStation Location
 java.lang.String getWSName()
          get WorkStation Name
 int getWSOS()
          get WorkStation OS
 java.lang.String getWSWorkingDir()
          get WorkStation Working Directory
static OperationInfo loadAll()
          Load all WS
static OperationInfo loadAllDevices()
           
static OperationInfo loadAllGUI()
          Load all WS for GUI
 void setFieldsFromDataTable(DataTable table)
           
 void setID(int workstationID)
          Sets the work station ID.
 void setWSAnyPhase(boolean Value)
          set WorkStation AnyPhase value
 void setWSComment(java.lang.String Value)
          set WorkStation Comment
 void setWSIsActive(boolean Value)
          set WorkStation IsActive value
 void setWSLocation(java.lang.String Value)
          set WorkStation Location
 void setWSName(java.lang.String Value)
          set WorkStation Name
 void setWSOS(int Value)
          set WorkStation OS
 void setWSWorkingDir(java.lang.String Value)
          set WorkStation Working Directory
 OperationInfo update()
          update WS
 OperationInfo updateDevices(java.lang.Object[] devicesIDs)
           
 OperationInfo updateMediaTypes(java.lang.Object[] MTIDs)
          Update Media Types assigned to workstation
 OperationInfo updatePhases(java.lang.Object[] phasesIDs)
          Updates the assigned phases for the current Workstation.
 OperationInfo validateMediaType(int MediaTypeID)
          Validate if media type can be used on selected WS or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conn

private DBConnection conn

id

private int id

wrkstName

private java.lang.String wrkstName

wrkstWorkingDirectory

private java.lang.String wrkstWorkingDirectory

wrkstComment

private java.lang.String wrkstComment

wrkstAnyPhase

private boolean wrkstAnyPhase

wrkstIsActive

private boolean wrkstIsActive

OS_ID

private int OS_ID

wrkstLocation

private java.lang.String wrkstLocation
Constructor Detail

WorkStation

public WorkStation()
Class Constructor


WorkStation

public WorkStation(int WSID)
            throws java.lang.Exception
Throws:
java.lang.Exception

WorkStation

public WorkStation(DataTable table)
            throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

setFieldsFromDataTable

public void setFieldsFromDataTable(DataTable table)

loadAll

public static OperationInfo loadAll()
Load all WS

Returns:
OperationInfo (bool, DataTable)

loadAllGUI

public static OperationInfo loadAllGUI()
Load all WS for GUI

Returns:
OperationInfo (bool, DataTable)

getByName

public static OperationInfo getByName(java.lang.String workstationName)
select WS by name

Parameters:
workstationName - is the WS name
Returns:
OperationInfo (bool, DataTable) for the selected record

loadAllDevices

public static OperationInfo loadAllDevices()

getByID

public static OperationInfo getByID(int recID)
select WS

Parameters:
recID - is the record to be selected
Returns:
OperationInfo (bool, DataTable) for the selected record

add

public OperationInfo add()
Add new WS

Specified by:
add in class AdminModuleBase
Returns:
OperationInfo (bool, DataTable) for the added record

delete

public OperationInfo delete()
delete WS

Specified by:
delete in class AdminModuleBase
Returns:
OperationInfo (bool, DataTable)

deleteCascade

public OperationInfo deleteCascade()
delete WS in cascade

Returns:
OperationInfo (bool, DataTable)

getDevices

public OperationInfo getDevices()
load the devices assigned to workstation

Returns:
operation info (bool, DataTable)

getMediaTypes

public OperationInfo getMediaTypes()
load the devices assigned to workstation

Returns:
operation info (bool, DataTable)

update

public OperationInfo update()
update WS

Specified by:
update in class AdminModuleBase
Returns:
OperationInfo (bool, DataTable) for the updated record

updatePhases

public OperationInfo updatePhases(java.lang.Object[] phasesIDs)
Updates the assigned phases for the current Workstation.

Parameters:
phasesIDs - The assigned Phases IDs for this workstation.
Returns:
An OperationInfo Object to indiate if the updates was successfull or not.

updateDevices

public OperationInfo updateDevices(java.lang.Object[] devicesIDs)

updateMediaTypes

public OperationInfo updateMediaTypes(java.lang.Object[] MTIDs)
Update Media Types assigned to workstation

Parameters:
MTIDs -
Returns:
operationInfo (boolean, DataTable)

getAssignedPhases

public OperationInfo getAssignedPhases()
Get Assigned Phases to this workstation

Returns:
OperationInfo (bool, DataTable) for the Assigned Phases

getAssignedPhasesSpecial

public OperationInfo getAssignedPhasesSpecial()

validateMediaType

public OperationInfo validateMediaType(int MediaTypeID)
Validate if media type can be used on selected WS or not

Parameters:
MediaTypeID - the ID of the Media Type
Returns:
OperationInfo (bool, DataTable) for the Assigned Phases

setID

public void setID(int workstationID)
Sets the work station ID.


setWSName

public void setWSName(java.lang.String Value)
set WorkStation Name

Parameters:
Value - is the WorkStation Name

setWSWorkingDir

public void setWSWorkingDir(java.lang.String Value)
set WorkStation Working Directory

Parameters:
Value - is the WorkStation Working Directory

setWSComment

public void setWSComment(java.lang.String Value)
set WorkStation Comment

Parameters:
Value - is the WorkStation Comment

setWSAnyPhase

public void setWSAnyPhase(boolean Value)
set WorkStation AnyPhase value

Parameters:
Value - is the WorkStation AnyPhase (1 means any phase can work on this WS, 0 otherwise)

setWSIsActive

public void setWSIsActive(boolean Value)
set WorkStation IsActive value

Parameters:
Value - is the WorkStation IsActive (1 means any active workstation, 0 otherwise)

setWSOS

public void setWSOS(int Value)
set WorkStation OS

Parameters:
Value - is the WorkStation OS

setWSLocation

public void setWSLocation(java.lang.String Value)
set WorkStation Location

Parameters:
Value - is the WorkStation Location

getID

public int getID()
Gets the ID of the workstation.


getWSName

public java.lang.String getWSName()
get WorkStation Name

Returns:
WorkStation Name

getWSWorkingDir

public java.lang.String getWSWorkingDir()
get WorkStation Working Directory

Returns:
WorkStation Working Directory

getActualWorkingDir

public java.lang.String getActualWorkingDir(java.lang.String username)
Gets WorkStation Working Directory after replacing '$username$' by the given username.

Parameters:
username - The name of the user to replace '$username$' placeholder
Returns:
WorkStation Working Directory

getWSComment

public java.lang.String getWSComment()
get WorkStation Comment

Returns:
WorkStation Comment

getWSAnyPhase

public boolean getWSAnyPhase()
get WorkStation AnyPhase value

Returns:
WorkStation AnyPhase

getWSIsActive

public boolean getWSIsActive()
get WorkStation IsActive value

Returns:
WorkStation IsActive value

getWSOS

public int getWSOS()
get WorkStation OS

Returns:
WorkStation OS

getWSLocation

public java.lang.String getWSLocation()
get WorkStation Location

Returns:
WorkStation Location