• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java URI类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.axis2.databinding.types.URI的典型用法代码示例。如果您正苦于以下问题:Java URI类的具体用法?Java URI怎么用?Java URI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



URI类属于org.apache.axis2.databinding.types包,在下文中一共展示了URI类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:26,代码来源:HTTaskStatusMonitor.java


示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:28,代码来源:TaskOperationsImpl.java


示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:29,代码来源:TaskOperationsImpl.java


示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:29,代码来源:TaskOperationsImpl.java


示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:31,代码来源:TaskOperationsImpl.java


示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:25,代码来源:TaskOperationsImpl.java


示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:27,代码来源:TaskOperationsImpl.java


示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:35,代码来源:TaskOperationsImpl.java


示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:28,代码来源:TaskOperationsImpl.java


示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:28,代码来源:TaskOperationsImpl.java


示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:29,代码来源:TaskOperationsImpl.java


示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:29,代码来源:TaskOperationsImpl.java


示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:26,代码来源:TaskOperationsImpl.java


示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:27,代码来源:TaskOperationsImpl.java


示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:34,代码来源:TaskOperationsImpl.java


示例16: complete

import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
public void complete(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);
    }

}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:19,代码来源:TaskOperationServiceImpl.java


示例17: start

import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
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);
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:19,代码来源:TaskOperationServiceImpl.java


示例18: convertAttachment

import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
/**
 * Transform {@link Attachment} to (DTO) {@link TAttachment}
 *
 * @param attachment
 * @return
 */
public static TAttachment convertAttachment(Attachment attachment) throws AttachmentMgtException {
    TAttachment attachmentDTO = new TAttachment();
    attachmentDTO.setId(attachment.getId());
    attachmentDTO.setName(attachment.getName());
    attachmentDTO.setCreatedBy(attachment.getCreatedBy());

    Calendar cal = Calendar.getInstance();
    cal.setTime(attachment.getCreatedTime());
    attachmentDTO.setCreatedTime(cal);

    attachmentDTO.setContentType(attachment.getContentType());

    attachmentDTO.setContent(attachment.getContent());

    try {
        URI attachmentURI = new URI(attachment.getURL().toString());
        attachmentDTO.setUrl(attachmentURI);
    } catch (URI.MalformedURIException e) {
        log.error(e.getLocalizedMessage(), e);
        throw new AttachmentMgtException("Conversion of Attachment to TAttachment (DTO) failed due to reason : " +
                                         e.getLocalizedMessage(), e);
    }

    return attachmentDTO;
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:32,代码来源:TransformerUtil.java


示例19: getWorkItems

import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
public WorkItem[] getWorkItems()
		throws IllegalStateFault, IllegalAccessFault, RemoteException, IllegalArgumentFault {

	TSimpleQueryInput queryInput = new TSimpleQueryInput();
	queryInput.setPageNumber(0);
	queryInput.setSimpleQueryCategory(TSimpleQueryCategory.ALL_TASKS);

	TTaskSimpleQueryResultSet resultSet = htStub.simpleQuery(queryInput);
	if (resultSet == null || resultSet.getRow() == null || resultSet.getRow().length == 0) {
		return new WorkItem[0];
	}
	List<WorkItem> workItems = new LinkedList<>();
	for (TTaskSimpleQueryResultRow row : resultSet.getRow()) {
		URI id = row.getId();
		String taskUser = "";
		//Ready state notification doesn't have taskUser
		if (htStub.loadTask(id) != null && htStub.loadTask(id).getActualOwner() != null) {
			taskUser = htStub.loadTask(id).getActualOwner().getTUser();
		}

		workItems.add(new WorkItem(id, row.getPresentationSubject(),
				row.getPresentationName(), row.getPriority(), row.getStatus(),
				row.getCreatedTime(), taskUser));
	}
	return workItems.toArray(new WorkItem[workItems.size()]);
}
 
开发者ID:wso2,项目名称:product-es,代码行数:27,代码来源:HumanTaskAdminClient.java


示例20: stop

import org.apache.axis2.databinding.types.URI; //导入依赖的package包/类
public void stop(final URI taskId) throws Exception {
    try {
        humanTaskClientAPIAdminStub.stop(taskId);
    } catch (Exception e) {
        String error_String = "Unable to stop task " + taskId;
        log.error(error_String, e);
        throw e;
    }
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:10,代码来源:HumanTaskClientApiClient.java



注:本文中的org.apache.axis2.databinding.types.URI类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java JAnnotationUse类代码示例发布时间:2022-05-23
下一篇:
Java KeyIntMap类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap