当前位置: 首页>>代码示例>>Java>>正文


Java URI.MalformedURIException方法代码示例

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


在下文中一共展示了URI.MalformedURIException方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例3: transformToSimpleQueryRow

import org.apache.axis2.databinding.types.URI; //导入方法依赖的package包/类
/**
 * @param matchingTask :
 * @return :
 */
public static TTaskSimpleQueryResultRow transformToSimpleQueryRow(TaskDAO matchingTask) {
    TTaskSimpleQueryResultRow row = new TTaskSimpleQueryResultRow();

    row.setName(QName.valueOf(matchingTask.getDefinitionName()));
    row.setTaskType(matchingTask.getType().toString());
    try {
        row.setId(new URI(matchingTask.getId().toString()));
    } catch (URI.MalformedURIException e) {
        throw new HumanTaskRuntimeException("The task id :[" + matchingTask.getId() +
                "] is invalid", e);
    }
    Calendar createdTime = Calendar.getInstance();
    createdTime.setTime(matchingTask.getCreatedOn());
    row.setCreatedTime(createdTime);

    //set the task priority.
    TPriority priority = new TPriority();
    priority.setTPriority(BigInteger.valueOf(matchingTask.getPriority()));
    row.setPriority(priority);

    //set the task status
    TStatus taskStatus = new TStatus();
    taskStatus.setTStatus(matchingTask.getStatus().toString());
    row.setStatus(taskStatus);
    row.setPresentationSubject((transformPresentationSubject(CommonTaskUtil.
            getDefaultPresentationSubject(matchingTask))));
    row.setPresentationName(transformPresentationName(CommonTaskUtil.
            getDefaultPresentationName(matchingTask)));

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

示例4: convertToAnyURI

import org.apache.axis2.databinding.types.URI; //导入方法依赖的package包/类
public static URI convertToAnyURI(String s) {
    if ((s == null) || s.equals("")){
        return null;
    }
    try {
        return new URI(s);
    } catch (URI.MalformedURIException e) {
        throw new ObjectConversionException(
                ADBMessages.getMessage("converter.cannotParse", s), e);
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:12,代码来源:ConverterUtil.java

示例5: completeTask

import org.apache.axis2.databinding.types.URI; //导入方法依赖的package包/类
public void completeTask(String id)
        throws RemoteException, IllegalArgumentFault, IllegalOperationFault, IllegalAccessFault,
        IllegalStateFault {
    try {
        htStub.start(new URI(id));
        htStub.complete(new URI(id), "<WorkResponse>true</WorkResponse>");
    } catch (URI.MalformedURIException e) {
        log.error("Invalid task identifier", e);
    }
}
 
开发者ID:wso2,项目名称:carbon-governance,代码行数:11,代码来源:HumanTaskClient.java

示例6: createURI

import org.apache.axis2.databinding.types.URI; //导入方法依赖的package包/类
private static AttributedURI createURI(String uriAddress) throws URI.MalformedURIException {
    AttributedURI address = new AttributedURI();
    address.setAnyURI(new URI(uriAddress));
    return address;
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:6,代码来源:EventBrokerAdminClient.java

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

示例8: getTaskDataById

import org.apache.axis2.databinding.types.URI; //导入方法依赖的package包/类
public String[] getTaskDataById(String taskid) throws IllegalAccessFault, IllegalArgumentFault, IllegalStateFault, IllegalOperationFault, URI.MalformedURIException; 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:2,代码来源:HTQueryBuildHelper.java


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