📄 projectmgrdelegate.java
字号:
{
e.printStackTrace();
throw new DelegateException(e);
}
catch (DelegateException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
}
public AssignmentDTO getAssignment(ID holderId) throws DelegateException
{
try
{
return getEJB().getAssignment(holderId);
}
catch (RemoteException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
catch (DelegateException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
}
/*
* Instanse
*/
public InstanceDTO createInstance(String instanceName, ID templateId)
throws DelegateException
{
// try
// {
// return getEJB().createInstance(instanceName, templateId);
// }
// catch (RemoteException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
// catch (DelegateException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
InstanceDTO insDto=new InstanceDTO();
insDto.setInstanceName(instanceName);
insDto.setTemplateID(templateId);
return insDto;
}
public boolean startInstance(InstanceDTO instance) throws DelegateException
{
// try
// {
// return getEJB().startInstance(instance);
// }
// catch (RemoteException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
// catch (DelegateException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
return true;
}
public boolean resumeInstance(InstanceDTO instance)
throws DelegateException
{
// try
// {
// return getEJB().resumeInstance(instance);
// }
// catch (RemoteException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
// catch (DelegateException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
return true;
}
public boolean abortInstance(InstanceDTO instance) throws DelegateException
{
// try
// {
// return getEJB().abortInstance(instance);
// }
// catch (RemoteException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
// catch (DelegateException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
return true;
}
public boolean suspendInstance(InstanceDTO instance)
throws DelegateException
{
// try
// {
// return getEJB().suspendInstance(instance);
// }
// catch (RemoteException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
// catch (DelegateException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
return true;
}
public boolean terminateInstance(InstanceDTO instance)
throws DelegateException
{
// try
// {
// return getEJB().terminateInstance(instance);
// }
// catch (RemoteException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
// catch (DelegateException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
return true;
}
public boolean submitInstance(InstanceDTO instance)
throws DelegateException
{
// try
// {
// return getEJB().submitInstance(instance);
// }
// catch (RemoteException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
// catch (DelegateException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
return true;
}
public Collection getALLInstances() throws DelegateException
{
// try
// {
// return getEJB().getALLInstances();
// }
// catch (RemoteException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
// catch (DelegateException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
ArrayList list=new ArrayList();
for(int i=0;i<30;i++){
ID templateId=TemplateDTO.intToID(i);
InstanceDTO insDto=new InstanceDTO();
insDto.setInstanceId(i);
insDto.setEndTime(new Date());
insDto.setExpireTime(1000);
insDto.setInstanceName("工程名"+i);
insDto.setManagerId(i);
insDto.setManagerType(i);
insDto.setRequesterId("");
insDto.setRequesterType(i);
insDto.setStartTime(new Date());
insDto.setStatusKey(i);
insDto.setTemplateID(templateId);
insDto.setTheDescription("描述"+i);
list.add(insDto);
}
return list;
}
public InstanceDTO getInstance(String instanceName)
throws DelegateException
{
// try
// {
// return getEJB().getInstance(instanceName);
// }
// catch (RemoteException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
// catch (DelegateException e)
// {
// e.printStackTrace();
// throw new DelegateException(e);
// }
int i=3;
ID templateId=TemplateDTO.intToID(1);
InstanceDTO insDto=new InstanceDTO();
insDto.setInstanceId(1);
insDto.setEndTime(new Date());
insDto.setExpireTime(1000);
insDto.setInstanceName("工程名"+i);
insDto.setManagerId(i);
insDto.setManagerType(i);
insDto.setRequesterId("");
insDto.setRequesterType(i);
insDto.setStartTime(new Date());
insDto.setStatusKey(i);
insDto.setTemplateID(templateId);
insDto.setTheDescription("描述"+i);
return insDto;
}
//根据requester获取处在准备运行状态的项目实例
public Collection getPRInstances(ID requestId) throws DelegateException
{
try
{
return getEJB().getPRInstances(requestId);
}
catch (RemoteException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
catch (DelegateException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
}
//是指根据requester获取所有该requester发起的实例
public Collection getRInstances(ID requestId) throws DelegateException
{
try
{
return getEJB().getRInstances(requestId);
}
catch (RemoteException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
catch (DelegateException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
}
//根据requester获取处在未启动状态的项目实例
public Collection getNSRInstances(ID requestId) throws DelegateException
{
try
{
return getEJB().getNSRInstances(requestId);
}
catch (RemoteException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
catch (DelegateException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
}
//根据managerId 获取处在准备运行状态的项目实例
public Collection getPMInstances(ID managerId) throws DelegateException
{
try
{
return getEJB().getPMInstances(managerId);
}
catch (RemoteException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
catch (DelegateException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
}
//根据managerId 获取处在完成状态的项目实例
public Collection getCMInstances(ID managerId) throws DelegateException
{
try
{
return getEJB().getCMInstances(managerId);
}
catch (RemoteException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
catch (DelegateException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
}
//根据managerId 获取处在暂停状态的项目实例
public Collection getSMInstances(ID managerId) throws DelegateException
{
try
{
return getEJB().getSMInstances(managerId);
}
catch (RemoteException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
catch (DelegateException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
}
//根据managerId 获取处在未启动状态的项目实例
public Collection getNSMInstances(ID managerId) throws DelegateException
{
try
{
return getEJB().getNSMInstances(managerId);
}
catch (RemoteException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
catch (DelegateException e)
{
e.printStackTrace();
throw new DelegateException(e);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -