本文整理汇总了Java中org.apache.axis2.databinding.types.URI类的典型用法代码示例。如果您正苦于以下问题:Java URI类的具体用法?Java URI怎么用?Java URI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
URI类属于org.apache.axis2.databinding.types包,在下文中一共展示了URI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTaskInstanceDetails
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* @param taskID taskId of the task instance which details should be displayed
* @return all the available details of the task instance
* @throws IllegalAccessFault
* @throws IllegalArgumentFault
* @throws IllegalStateFault
* @throws IllegalOperationFault
* @throws URI.MalformedURIException
*/
public String[] getTaskInstanceDetails(String taskID)
throws IllegalAccessFault, IllegalArgumentFault, IllegalStateFault,
IllegalOperationFault, URI.MalformedURIException {
String[] taskInstances = {"No task found with the given ID in all the available tenants"};
String[] invalidTaskIDMessage = {"Invalid task id provided, please specify a valid task id"};
if(null == taskID || taskID.isEmpty()) {
return invalidTaskIDMessage;
}
try {
taskInstances = queryBuilderHelper.getTaskDataById(taskID);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return taskInstances;
}
示例2: resume
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* Resume a suspended task.
*
* @param taskId : task identifier
* @throws IllegalStateFault
* @throws IllegalOperationFault
* @throws IllegalArgumentFault
* @throws IllegalAccessFault
*/
public void resume(final URI taskId)
throws IllegalStateFault, IllegalOperationFault, IllegalArgumentFault,
IllegalAccessFault {
try {
validateTaskId(taskId);
HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine().getScheduler().
execTransaction(new Callable<Object>() {
public Object call() throws Exception {
HumanTaskCommand resumeCommand =
new Resume(getCaller(), new Long(taskId.toString()));
resumeCommand.execute();
return null;
}
});
} catch (Exception ex) {
handleException(ex);
}
}
示例3: suspend
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* Suspend the task.
*
* @param taskId : task identifier
* @throws IllegalStateFault
* @throws IllegalOperationFault
* @throws IllegalArgumentFault
* @throws IllegalAccessFault
*/
public void suspend(final URI taskId)
throws IllegalStateFault, IllegalOperationFault, IllegalArgumentFault,
IllegalAccessFault {
try {
validateTaskId(taskId);
HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine().getScheduler().
execTransaction(new Callable<Object>() {
public Object call() throws Exception {
HumanTaskCommand suspendCommand =
new Suspend(getCaller(), new Long(taskId.toString()));
suspendCommand.execute();
return null;
}
});
} catch (Exception ex) {
handleException(ex);
}
}
示例4: updateComment
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* Updates the identified comment with the supplied new text.
* @param taskIdURI : task identifier
* @param commentId : comment identifier
* @param s : new comment in plain text.
* @throws IllegalStateFault
* @throws IllegalOperationFault
* @throws IllegalArgumentFault
* @throws IllegalAccessFault
*/
public void updateComment(final URI taskIdURI, final URI commentId, final String s)
throws IllegalStateFault, IllegalOperationFault, IllegalArgumentFault,
IllegalAccessFault {
try {
final Long taskId = validateTaskId(taskIdURI);
HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine().getScheduler().
execTransaction(new Callable<Object>() {
public Object call() throws Exception {
UpdateComment updateCommentCommand =
new UpdateComment(getCaller(), taskId, new Long(commentId.toString()), s);
updateCommentCommand.execute();
return null;
}
});
} catch (Exception ex) {
handleException(ex);
}
}
示例5: getRendering
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* Returns the rendering specified by the type parameter.
* @param taskIdURI task identifier
* @param qName rendering type
* @return rendering string
* @throws IllegalArgumentFault
*/
public Object getRendering(final URI taskIdURI,final QName qName) throws IllegalArgumentFault {
final Long taskId = validateTaskId(taskIdURI);
try {
String rendering = HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine().getScheduler().
execTransaction(new Callable<String>() {
public String call() throws Exception {
HumanTaskEngine engine = HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine();
HumanTaskDAOConnection daoConn = engine.getDaoConnectionFactory().getConnection();
TaskDAO task = daoConn.getTask(taskId);
validateTaskTenant(task);
HumanTaskBaseConfiguration taskConfiguration = HumanTaskServiceComponent.getHumanTaskServer().
getTaskStoreManager().getHumanTaskStore(task.getTenantId()).
getTaskConfiguration(QName.valueOf(task.getName()));
return CommonTaskUtil.getRendering(task, taskConfiguration, qName);
}
});
return rendering;
} catch (Exception e) {
log.error(e);
throw new IllegalArgumentFault(e);
}
}
示例6: skip
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* Skip the task.
* @param taskIdURI : task identifier
* @throws IllegalStateFault
* @throws IllegalOperationFault
* @throws IllegalArgumentFault
* @throws IllegalAccessFault
*/
public void skip(URI taskIdURI) throws IllegalStateFault, IllegalOperationFault, IllegalArgumentFault,
IllegalAccessFault {
try {
final Long taskId = validateTaskId(taskIdURI);
HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine().getScheduler().
execTransaction(new Callable<Object>() {
public Object call() throws Exception {
Skip skipCommand = new Skip(getCaller(), taskId);
skipCommand.execute();
return null;
}
});
} catch (Exception ex) {
handleException(ex);
}
}
示例7: start
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* Start the task
* @param taskId : task identifier
* @throws IllegalStateFault
* @throws IllegalOperationFault
* @throws IllegalArgumentFault
* @throws IllegalAccessFault
*/
public void start(final URI taskId)
throws IllegalStateFault, IllegalOperationFault, IllegalArgumentFault,
IllegalAccessFault {
try {
validateTaskId(taskId);
HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine().getScheduler().
execTransaction(new Callable<Object>() {
public Object call() throws Exception {
Start startCommand = new Start(getCaller(), new Long(taskId.toString()));
startCommand.execute();
return null;
}
});
} catch (Exception ex) {
handleException(ex);
}
}
示例8: fail
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* Execution of the task fails
* @param taskIdURI : task identifier
* @param tFault
* @throws IllegalStateFault
* @throws IllegalOperationFault
* @throws IllegalArgumentFault
* @throws IllegalAccessFault
*/
public void fail(final URI taskIdURI, final TFault tFault)
throws IllegalStateFault, IllegalOperationFault, IllegalArgumentFault,
IllegalAccessFault {
try {
final Long taskID = validateTaskId(taskIdURI);
HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine().getScheduler().
execTransaction(new Callable<Object>() {
public Object call() throws Exception {
String faultName = null;
Element faultData = null;
if (tFault != null) {
faultName = tFault.getFaultName().toString();
faultData = DOMUtils.getElementFromObject(tFault.getFaultData());
}
Fail failCommand = new Fail(getCaller(), taskID, faultName, faultData);
failCommand.execute();
return null;
}
});
} catch (Exception ex) {
handleException(ex);
}
}
示例9: activate
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* Activate the task, i.e. set the task to status Ready (Administrative Operations)
* @param taskIdURI : task identifier
* @throws IllegalStateFault
* @throws IllegalOperationFault
* @throws IllegalArgumentFault
* @throws IllegalAccessFault
*/
public void activate(URI taskIdURI)
throws IllegalStateFault, IllegalOperationFault, IllegalArgumentFault,
IllegalAccessFault {
try {
final Long taskID = validateTaskId(taskIdURI);
HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine().getScheduler().
execTransaction(new Callable<Object>() {
public Object call() throws Exception {
Activate activateCommand = new Activate(getCaller(), taskID);
activateCommand.execute();
return null;
}
});
} catch (Exception ex) {
handleException(ex);
}
}
示例10: getAttachmentInfos
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* Get attachment information for all attachments associated with the task.
* @param taskIdentifier : task identifier
* @return
* @throws IllegalAccessFault
*/
public TAttachmentInfo[] getAttachmentInfos(final URI taskIdentifier) throws IllegalAccessFault {
final Long taskId = validateTaskId(taskIdentifier);
try {
List<AttachmentDAO> attachmentList = HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine()
.getScheduler().
execTransaction(new Callable<List<AttachmentDAO>>() {
public List<AttachmentDAO> call() throws Exception {
HumanTaskEngine engine = HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine();
HumanTaskDAOConnection daoConn = engine.getDaoConnectionFactory().getConnection();
TaskDAO task = daoConn.getTask(taskId);
validateTaskTenant(task);
return task.getAttachments();
}
});
return TransformerUtils.transformAttachments(attachmentList);
} catch (Exception ex) {
log.error(ex);
throw new IllegalAccessFault(ex);
}
}
示例11: complete
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* Execution of the task finished successfully.
* @param taskIdURI : task identifier
* @param outputStr : task outcome (String)
* @throws IllegalStateFault
* @throws IllegalOperationFault
* @throws IllegalArgumentFault
* @throws IllegalAccessFault
*/
public void complete(final URI taskIdURI, final String outputStr)
throws IllegalStateFault, IllegalOperationFault, IllegalArgumentFault,
IllegalAccessFault {
try {
final Long taskId = validateTaskId(taskIdURI);
HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine().getScheduler().
execTransaction(new Callable<Object>() {
public Object call() throws Exception {
Element output = DOMUtils.stringToDOM(outputStr);
Complete completeCommand = new Complete(getCaller(), taskId, output);
completeCommand.execute();
return null;
}
});
} catch (Exception ex) {
handleException(ex);
}
}
示例12: nominate
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* Nominate an organization entity to process the task. (An Administrative Operation)
* @param taskIdURI : task identifier
* @param nomineeOrgEntity : TOrganizationalEntity
* @throws IllegalStateFault
* @throws IllegalOperationFault
* @throws IllegalArgumentFault
* @throws IllegalAccessFault
*/
public void nominate(final URI taskIdURI, final TOrganizationalEntity nomineeOrgEntity)
throws IllegalStateFault, IllegalOperationFault, IllegalArgumentFault,
IllegalAccessFault {
try {
final Long taskId = validateTaskId(taskIdURI);
HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine().getScheduler().
execTransaction(new Callable<Object>() {
public Object call() throws Exception {
List<OrganizationalEntityDAO> nominees = TransformerUtils.
transformOrganizationalEntityList(nomineeOrgEntity);
Nominate nominateCommand = new Nominate(getCaller(), taskId, nominees);
nominateCommand.execute();
return null;
}
});
} catch (Exception ex) {
handleException(ex);
}
}
示例13: deleteFault
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* Deletes the fault name and fault data of the task.
* @param taskIdURI : task identifier
* @throws IllegalStateFault
* @throws IllegalOperationFault
* @throws IllegalArgumentFault
* @throws IllegalAccessFault
*/
public void deleteFault(final URI taskIdURI)
throws IllegalStateFault, IllegalOperationFault, IllegalArgumentFault,
IllegalAccessFault {
try {
final Long taskId = validateTaskId(taskIdURI);
HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine().getScheduler().
execTransaction(new Callable<Object>() {
public Object call() throws Exception {
DeleteFault deleteFaultCommand = new DeleteFault(getCaller(), taskId);
deleteFaultCommand.execute();
return null;
}
});
} catch (Exception ex) {
handleException(ex);
}
}
示例14: release
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* Release the task, i.e. set the task back to status Ready.
* @param taskId : task identifier
* @throws IllegalStateFault
* @throws IllegalOperationFault
* @throws IllegalArgumentFault
* @throws IllegalAccessFault
*/
public void release(final URI taskId)
throws IllegalStateFault, IllegalOperationFault, IllegalArgumentFault,
IllegalAccessFault {
try {
validateTaskId(taskId);
HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine().getScheduler().
execTransaction(new Callable<Object>() {
public Object call() throws Exception {
HumanTaskCommand releaseCommand =
new Release(getCaller(), new Long(taskId.toString()));
releaseCommand.execute();
return null;
}
});
} catch (Exception ex) {
handleException(ex);
}
}
示例15: setPriority
import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
* Change the priority of the task.
* @param taskIdURI : task identifier
* @param tPriority : The WS-HumanTask Client MUST specify the integer value of the new priority.
* @throws IllegalStateFault
* @throws IllegalOperationFault
* @throws IllegalArgumentFault
* @throws IllegalAccessFault
*/
public void setPriority(final URI taskIdURI, final TPriority tPriority)
throws IllegalStateFault, IllegalOperationFault, IllegalArgumentFault,
IllegalAccessFault {
if (tPriority.getTPriority().intValue() < 1 || tPriority.getTPriority().intValue() > 10) {
log.warn("The priority value should be between 1 and 10. " +
"Hence ignoring the provided priority :" + tPriority.getTPriority());
}
try {
final Long taskId = validateTaskId(taskIdURI);
HumanTaskServiceComponent.getHumanTaskServer().getTaskEngine().getScheduler().
execTransaction(new Callable<Object>() {
public Object call() throws Exception {
int newPriority = tPriority.getTPriority().intValue();
SetPriority setPriorityCommand =
new SetPriority(getCaller(), taskId, newPriority);
setPriorityCommand.execute();
return null;
}
});
} catch (Exception ex) {
handleException(ex);
}
}