Added Getter methods to all the Workflow DTOs and fixed various warnings.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21357 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
N Smith
2010-07-22 16:05:04 +00:00
parent 5b86cfb4e9
commit 40ec46f565
9 changed files with 331 additions and 4 deletions

View File

@@ -93,6 +93,7 @@ public class WorkflowDefinition implements Serializable
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString()
{
return "WorkflowDefinition[id=" + id + ",name=" + name + ",version=" + version + ",title=" + title + ",startTask=" + ((getStartTaskDefinition() == null) ? "undefined" : getStartTaskDefinition().toString()) + "]";

View File

@@ -32,9 +32,26 @@ public class WorkflowDeployment
/** Workflow Status */
public String[] problems;
/**
* @return the definition
*/
public WorkflowDefinition getDefinition()
{
return definition;
}
/**
* @return the problems
*/
public String[] getProblems()
{
return problems;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString()
{
return "WorkflowDeployment[def=" + definition + ",problems=" + ((problems == null) ? 0 : problems.length) + "]";

View File

@@ -62,9 +62,90 @@ public class WorkflowInstance implements Serializable
/** Workflow Definition */
public WorkflowDefinition definition;
/**
* @return the serialversionuid
*/
public static long getSerialversionuid()
{
return serialVersionUID;
}
/**
* @return the id
*/
public String getId()
{
return id;
}
/**
* @return the description
*/
public String getDescription()
{
return description;
}
/**
* @return the active
*/
public boolean isActive()
{
return active;
}
/**
* @return the initiator
*/
public NodeRef getInitiator()
{
return initiator;
}
/**
* @return the startDate
*/
public Date getStartDate()
{
return startDate;
}
/**
* @return the endDate
*/
public Date getEndDate()
{
return endDate;
}
/**
* @return the workflowPackage
*/
public NodeRef getWorkflowPackage()
{
return workflowPackage;
}
/**
* @return the context
*/
public NodeRef getContext()
{
return context;
}
/**
* @return the definition
*/
public WorkflowDefinition getDefinition()
{
return definition;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString()
{
return "WorkflowInstance[id=" + id + ",active=" + active + ",def=" + definition.toString() + "]";

View File

@@ -46,10 +46,58 @@ public class WorkflowNode
/** The transitions leaving this node (or null, if none) */
public WorkflowTransition[] transitions;
/**
* @return the name
*/
public String getName()
{
return name;
}
/**
* @return the title
*/
public String getTitle()
{
return title;
}
/**
* @return the description
*/
public String getDescription()
{
return description;
}
/**
* @return the type
*/
public String getType()
{
return type;
}
/**
* @return the isTaskNode
*/
public boolean isTaskNode()
{
return isTaskNode;
}
/**
* @return the transitions
*/
public WorkflowTransition[] getTransitions()
{
return transitions;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString()
{
String transitionsArray = "{";

View File

@@ -43,10 +43,42 @@ public class WorkflowPath
/** Is the path still active? */
public boolean active;
/**
* @return the id
*/
public String getId()
{
return id;
}
/**
* @return the instance
*/
public WorkflowInstance getInstance()
{
return instance;
}
/**
* @return the node
*/
public WorkflowNode getNode()
{
return node;
}
/**
* @return the active
*/
public boolean isActive()
{
return active;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString()
{
return "WorkflowPath[id=" + id + ",instance=" + instance.toString() + ",active=" + active + ",node=" + node.toString()+ "]";

View File

@@ -57,9 +57,74 @@ public class WorkflowTask
/** Task Properties as described by Task Definition */
public Map<QName, Serializable> properties;
/**
* @return the id
*/
public String getId()
{
return id;
}
/**
* @return the name
*/
public String getName()
{
return name;
}
/**
* @return the title
*/
public String getTitle()
{
return title;
}
/**
* @return the description
*/
public String getDescription()
{
return description;
}
/**
* @return the state
*/
public WorkflowTaskState getState()
{
return state;
}
/**
* @return the path
*/
public WorkflowPath getPath()
{
return path;
}
/**
* @return the definition
*/
public WorkflowTaskDefinition getDefinition()
{
return definition;
}
/**
* @return the properties
*/
public Map<QName, Serializable> getProperties()
{
return properties;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString()
{
String propCount = (properties == null) ? "null" : "" + properties.size();

View File

@@ -65,8 +65,8 @@ public class WorkflowTaskQuery
TaskActor_Asc,
TaskActor_Desc,
TaskState_Asc,
TaskState_Desc
};
TaskState_Desc;
}
/**

View File

@@ -40,11 +40,60 @@ public class WorkflowTimer
/** Error */
public String error;
/**
* @return the id
*/
public String getId()
{
return id;
}
/**
* @return the name
*/
public String getName()
{
return name;
}
/**
* @return the path
*/
public WorkflowPath getPath()
{
return path;
}
/**
* @return the task
*/
public WorkflowTask getTask()
{
return task;
}
/**
* @return the dueDate
*/
public Date getDueDate()
{
return dueDate;
}
/**
* @return the error
*/
public String getError()
{
return error;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString()
{
return "WorkflowTimer[id=" + id + ",name=" + name + ",dueDate=" + dueDate + ",path=" + path + ",task=" + task + "]";

View File

@@ -38,9 +38,43 @@ public class WorkflowTransition
/** Is this the default transition */
public boolean isDefault;
/**
* @return the id
*/
public String getId()
{
return id;
}
/**
* @return the title
*/
public String getTitle()
{
return title;
}
/**
* @return the description
*/
public String getDescription()
{
return description;
}
/**
* @return the isDefault
*/
public boolean isDefault()
{
return isDefault;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString()
{
return "WorkflowTransition[id=" + id + ",title=" + title + "]";