diff options
Diffstat (limited to 'source/com/c2kernel/entity/proxy/ItemProxy.java')
| -rw-r--r--[-rwxr-xr-x] | source/com/c2kernel/entity/proxy/ItemProxy.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source/com/c2kernel/entity/proxy/ItemProxy.java b/source/com/c2kernel/entity/proxy/ItemProxy.java index e816a53..702dd26 100755..100644 --- a/source/com/c2kernel/entity/proxy/ItemProxy.java +++ b/source/com/c2kernel/entity/proxy/ItemProxy.java @@ -152,7 +152,7 @@ public class ItemProxy extends EntityProxy /**************************************************************************
*
**************************************************************************/
- private ArrayList getJobList(int agentId, boolean filter)
+ private ArrayList<Job> getJobList(int agentId, boolean filter)
throws AccessRightsException,
ObjectNotFoundException,
PersistencyException
@@ -163,14 +163,13 @@ public class ItemProxy extends EntityProxy thisJobList = (JobArrayList)CastorXMLUtility.unmarshall(jobs);
}
catch (Exception e) {
- Logger.error("Exception::ItemProxy::getJobList() - Cannot unmarshall the jobs");
Logger.error(e);
- return new ArrayList();
+ throw new PersistencyException("Exception::ItemProxy::getJobList() - Cannot unmarshall the jobs", null);
}
return thisJobList.list;
}
- public ArrayList getJobList(AgentProxy agent)
+ public ArrayList<Job> getJobList(AgentProxy agent)
throws AccessRightsException,
ObjectNotFoundException,
PersistencyException
@@ -178,7 +177,7 @@ public class ItemProxy extends EntityProxy return getJobList(agent.getSystemKey());
}
- private ArrayList getJobList(int agentId)
+ private ArrayList<Job> getJobList(int agentId)
throws AccessRightsException,
ObjectNotFoundException,
PersistencyException
@@ -191,9 +190,8 @@ public class ItemProxy extends EntityProxy ObjectNotFoundException,
PersistencyException {
- ArrayList jobList = getJobList(agentId);
- for (Object jobObj : jobList) {
- Job job = (Job)jobObj;
+ ArrayList<Job> jobList = getJobList(agentId);
+ for (Job job : jobList) {
int transition = job.getPossibleTransition();
if (job.getStepName().equals(actName))
if (transition == Transitions.COMPLETE || transition == Transitions.DONE)
|
