本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例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;
示例8: getTaskDataById
import org.apache.axis2.databinding.types.URI; //导入方法依赖的package包/类
public String[] getTaskDataById(String taskid) throws IllegalAccessFault, IllegalArgumentFault, IllegalStateFault, IllegalOperationFault, URI.MalformedURIException;