|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.BaseOpenmrsObject org.openmrs.BaseOpenmrsMetadata org.openmrs.ProgramWorkflow
public class ProgramWorkflow
ProgramWorkflow
Constructor Summary | |
---|---|
ProgramWorkflow()
Default Constructor |
|
ProgramWorkflow(java.lang.Integer programWorkflowId)
Constructor with id |
Method Summary | |
---|---|
void |
addState(ProgramWorkflowState state)
Adds a new ProgramWorkflowState to this ProgramWorkflow |
boolean |
equals(java.lang.Object obj)
|
Concept |
getConcept()
|
java.lang.Integer |
getId()
|
java.util.List<ProgramWorkflowState> |
getPossibleNextStates(PatientProgram patientProgram)
Returns a List< ProgramWorkflowState > including all possible next
ProgramWorkflowStates, for the passed PatientProgram ordered by ConceptName |
Program |
getProgram()
|
java.lang.Integer |
getProgramWorkflowId()
|
java.util.Set<ProgramWorkflowState> |
getSortedStates()
Returns a Set< ProgramWorkflowState > including all ProgramWorkflowStates, sorted by
ConceptName |
ProgramWorkflowState |
getState(Concept concept)
Returns a ProgramWorkflowState whose Concept matches the passed concept |
ProgramWorkflowState |
getState(java.lang.Integer programWorkflowStateId)
Returns a ProgramWorkflowState whose primary key id matches the input parameter |
ProgramWorkflowState |
getState(java.lang.String name)
Returns a ProgramWorkflowState whose Concept name matches the passed name in any
Locale |
ProgramWorkflowState |
getStateByName(java.lang.String name)
Returns a ProgramWorkflowState whose Concept has any ConceptName that
matches the given name |
java.util.Set<ProgramWorkflowState> |
getStates()
|
java.util.Set<ProgramWorkflowState> |
getStates(boolean includeRetired)
Returns a Set< ProgramWorkflowState > including all non-retired ProgramWorkflowStates
and all retired ProgramWorkflowStates in this ProgramWorkflow if includeRetired
is true |
boolean |
isLegalTransition(ProgramWorkflowState fromState,
ProgramWorkflowState toState)
Check whether it is allowable to transition from fromState to
toState . |
void |
removeState(ProgramWorkflowState state)
Removes a ProgramWorkflowState from this ProgramWorkflow |
void |
retireState(ProgramWorkflowState state)
Retires a ProgramWorkflowState |
void |
setConcept(Concept concept)
|
void |
setId(java.lang.Integer id)
|
void |
setProgram(Program program)
|
void |
setProgramWorkflowId(java.lang.Integer programWorkflowId)
|
void |
setStates(java.util.Set<ProgramWorkflowState> states)
|
java.lang.String |
toString()
|
Methods inherited from class org.openmrs.BaseOpenmrsMetadata |
---|
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateRetired, getDescription, getName, getRetired, getRetiredBy, getRetireReason, isRetired, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateRetired, setDescription, setName, setRetired, setRetiredBy, setRetireReason |
Methods inherited from class org.openmrs.BaseOpenmrsObject |
---|
getUuid, setUuid |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.openmrs.OpenmrsObject |
---|
getUuid, setUuid |
Constructor Detail |
---|
public ProgramWorkflow()
public ProgramWorkflow(java.lang.Integer programWorkflowId)
Method Detail |
---|
public void addState(ProgramWorkflowState state)
ProgramWorkflowState
to this ProgramWorkflow
state
- - the ProgramWorkflowState
to addpublic void removeState(ProgramWorkflowState state)
ProgramWorkflowState
from this ProgramWorkflow
state
- - the ProgramWorkflowState
to removepublic void retireState(ProgramWorkflowState state)
ProgramWorkflowState
state
- - the ProgramWorkflowState
to retirepublic ProgramWorkflowState getState(java.lang.Integer programWorkflowStateId)
ProgramWorkflowState
whose primary key id matches the input parameter
programWorkflowStateId
- the primary key Integer
id to match
ProgramWorkflowState
whose identifier matches the passed
programWorkflowStateId
public ProgramWorkflowState getState(Concept concept)
ProgramWorkflowState
whose Concept matches the passed concept
concept
- the Concept to match
ProgramWorkflowState
whose Concept
matches the passed
concept
public ProgramWorkflowState getState(java.lang.String name)
ProgramWorkflowState
whose Concept name matches the passed name in any
Locale
name
- the Concept name to match in any Locale
ProgramWorkflowState
whose Concept
name matches the passed
name
public ProgramWorkflowState getStateByName(java.lang.String name)
ProgramWorkflowState
whose Concept
has any ConceptName
that
matches the given name
- Parameters:
name
- the ProgramWorkflowState
name, in any Locale
- Returns:
- a
ProgramWorkflowState
which has the passed name
in any
Locale
public java.util.Set<ProgramWorkflowState> getStates(boolean includeRetired)
ProgramWorkflowState
> including all non-retired ProgramWorkflowStates
and all retired ProgramWorkflowStates in this ProgramWorkflow if includeRetired
is true
includeRetired
- - if false, returns only non-retired ProgramWorkflowState
objects in this ProgramWorkflow
public java.util.Set<ProgramWorkflowState> getSortedStates()
ProgramWorkflowState
> including all ProgramWorkflowStates, sorted by
ConceptName
ConceptName
public java.util.List<ProgramWorkflowState> getPossibleNextStates(PatientProgram patientProgram)
ProgramWorkflowState
> including all possible next
ProgramWorkflowStates, for the passed PatientProgram
ordered by ConceptName
patientProgram
- - The PatientProgram to check
PatientProgram
ordered by ConceptName
public boolean isLegalTransition(ProgramWorkflowState fromState, ProgramWorkflowState toState)
fromState
to
toState
.
fromState
- ProgramWorkflowState
to check transition fromtoState
- ProgramWorkflowState
to check transition to
fromState
to
toState
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(Object)
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.util.Set<ProgramWorkflowState> getStates()
public void setStates(java.util.Set<ProgramWorkflowState> states)
public Concept getConcept()
public void setConcept(Concept concept)
public Program getProgram()
public void setProgram(Program program)
public java.lang.Integer getProgramWorkflowId()
public void setProgramWorkflowId(java.lang.Integer programWorkflowId)
public java.lang.Integer getId()
getId
in interface OpenmrsObject
OpenmrsObject.getId()
public void setId(java.lang.Integer id)
setId
in interface OpenmrsObject
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |