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

Java IllegalStateFault类代码示例

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

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



IllegalStateFault类属于org.wso2.carbon.humantask.stub.ui.task.client.api包,在下文中一共展示了IllegalStateFault类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getWorkItems

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的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


示例2: getNotification

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
/**
 * get management console subscriptions
 *
 * @param type type of the element
 * @return true if the required notification is generated, false otherwise
 * @throws java.rmi.RemoteException
 * @throws IllegalStateFault
 * @throws IllegalAccessFault
 * @throws IllegalArgumentFault
 * @throws InterruptedException
 */
private boolean getNotification(String type) throws RemoteException, IllegalStateFault,
                                                    IllegalAccessFault,
                                                    IllegalArgumentFault,
                                                    InterruptedException {
    boolean success = false;
    Thread.sleep(3000);//force delay otherwise getWorkItems return null
    // get all the management console notifications
    WorkItem[] workItems = WorkItemClient.getWorkItems(humanTaskAdminClient);
    for (WorkItem workItem : workItems) {
        // search for the correct notification
        if (workItem.getPresentationSubject().toString().contains(type)) {
            success = true;
            break;
        }
    }
    return success;
}
 
开发者ID:wso2,项目名称:product-es,代码行数:29,代码来源:LifecycleUtil.java


示例3: getNotification

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
/**
 * get management console subscriptions
 *
 * @param path
 * @return true if the required notification is generated, false otherwise
 * @throws java.rmi.RemoteException
 * @throws IllegalStateFault
 * @throws IllegalAccessFault
 * @throws IllegalArgumentFault
 * @throws InterruptedException
 */
private static boolean getNotification(String path) throws RemoteException, IllegalStateFault,
                                                           IllegalAccessFault,
                                                           IllegalArgumentFault,
                                                           InterruptedException {
    boolean success = false;
    HumanTaskAdminClient humanTaskAdminClient =
            new HumanTaskAdminClient(backEndUrl, sessionCookie);
    Thread.sleep(5000);//force delay otherwise get work items return error

    // get all the notifications
    WorkItem[] workItems = WorkItemClient.getWorkItems(humanTaskAdminClient);

    for (WorkItem workItem : workItems) {
        if (workItem.getPresentationSubject().toString().contains(path + " was updated.")) {
            success = true;
            break;
        }
    }
    return success;
}
 
开发者ID:wso2,项目名称:product-es,代码行数:32,代码来源:ManagementConsoleSubscription.java


示例4: getWorkItems

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
/**
 * get the existing management console notifications
 *
 * @param humanTaskAdminClient
 * @return
 * @throws java.rmi.RemoteException
 * @throws IllegalStateFault
 * @throws IllegalAccessFault
 * @throws IllegalArgumentFault
 * @throws InterruptedException
 */
public static WorkItem[] getWorkItems(HumanTaskAdminClient humanTaskAdminClient)
        throws RemoteException, IllegalStateFault, IllegalAccessFault, IllegalArgumentFault,
               InterruptedException {
    long startTime = new Date().getTime();
    long endTime = startTime + 2 * 60 * 1000;
    WorkItem[] workItems = null;
    // try for a minute to get all the notifications
    while ((new Date().getTime()) < endTime) {
        workItems = humanTaskAdminClient.getWorkItems();
        if (workItems.length > 0) {
            break;
        }
        Thread.sleep(5000);
    }
    return workItems;
}
 
开发者ID:wso2,项目名称:product-es,代码行数:28,代码来源:WorkItemClient.java


示例5: taskListQuery

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
public TTaskSimpleQueryResultSet taskListQuery(TSimpleQueryInput queryInput)
        throws RemoteException, IllegalArgumentFault, IllegalStateFault, IllegalOperationFault, IllegalAccessFault {
    String errMsg = "Error occurred while performing taskListQuery operation";
    try {
        return stub.simpleQuery(queryInput);
    } catch (Exception ex) {
        handleException(errMsg, ex);
}
    return null;
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:11,代码来源:HumanTaskClientAPIServiceClient.java


示例6: loadTask

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
/**
 *
 * Load task data for the give task id.
 *
 * @param taskId :
 * @return :
 * @throws java.rmi.RemoteException    :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalAccessFault :
 */
public TTaskAbstract loadTask(URI taskId)
        throws RemoteException, IllegalAccessFault, IllegalOperationFault, IllegalArgumentFault, IllegalStateFault {
    String errMsg = "Error occurred while performing loadTask operation";
    try {
        return stub.loadTask(taskId);
    } catch (Exception ex) {
        handleException(errMsg, ex);
    }
    return null;
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:20,代码来源:HumanTaskClientAPIServiceClient.java


示例7: loadTaskInput

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
/**
 * Loads the task input.
 *
 * @param taskId : The id of the task/.
 * @return : The task input OMElement.
 * @throws java.rmi.RemoteException                     :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault                   :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalOperationFault               :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalAccessFault                  :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalArgumentFault                :
 * @throws javax.xml.stream.XMLStreamException :
 */
public OMElement loadTaskInput(URI taskId)
        throws RemoteException, IllegalStateFault, IllegalOperationFault, IllegalAccessFault, IllegalArgumentFault,
               XMLStreamException {
    String errMsg = "Error occurred while performing loadTaskInput operation";
    try {
        String input = (String) stub.getInput(taskId, null);
        return AXIOMUtil.stringToOM(input);
    } catch (Exception ex) {
        handleException(errMsg, ex);
    }
    return null;
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:25,代码来源:HumanTaskClientAPIServiceClient.java


示例8: loadTaskOutput

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
/**
 * Loads the task output.
 *
 * @param taskId : The id of the task/.
 * @return : The task input OMElement.
 * @throws java.rmi.RemoteException                     :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault                   :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalOperationFault               :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalAccessFault                  :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalArgumentFault                :
 * @throws javax.xml.stream.XMLStreamException :
 */
public OMElement loadTaskOutput(URI taskId)
        throws RemoteException, IllegalStateFault, IllegalOperationFault, IllegalAccessFault, IllegalArgumentFault,
               XMLStreamException {
    String errMsg = "Error occurred while performing loadTaskOutput operation";
    try {
        String output = (String) stub.getOutput(taskId, null);
        return AXIOMUtil.stringToOM(output);
    } catch (Exception ex) {
        handleException(errMsg, ex);
    }
    return null;
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:25,代码来源:HumanTaskClientAPIServiceClient.java


示例9: start

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
public void start(URI taskId)
        throws RemoteException, IllegalStateFault, IllegalOperationFault, IllegalArgumentFault, IllegalAccessFault {
    String errMsg = "Error occurred while performing start operation";
    try {
        stub.start(taskId);
    } catch (Exception ex) {
        handleException(errMsg, ex);
    }
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:10,代码来源:HumanTaskClientAPIServiceClient.java


示例10: remove

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
/**
 * Task remove operation. Note: applicable for notifications only.
 *
 * @param taskId : The id of the task to be removed.
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalArgumentFault  :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalOperationFault :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalAccessFault    :
 * @throws java.rmi.RemoteException       :
 */
public void remove(URI taskId)
        throws IllegalArgumentFault, IllegalOperationFault, IllegalAccessFault, RemoteException, IllegalStateFault {
    String errMsg = "Error occurred while performing resume operation";
    try {
        stub.remove(taskId);
    } catch (Exception ex) {
        handleException(errMsg, ex);
    }
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:19,代码来源:HumanTaskClientAPIServiceClient.java


示例11: handleException

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
private void handleException(String errMsg, Exception ex)
        throws IllegalStateFault, IllegalOperationFault, IllegalArgumentFault,
               IllegalAccessFault {
    if (ex instanceof IllegalAccessFault) {
        throw new IllegalAccessFault(errMsg, ex);
    } else if (ex instanceof IllegalArgumentFault) {
        throw new IllegalArgumentFault(errMsg, ex);
    } else if (ex instanceof IllegalOperationFault) {
        throw new IllegalOperationFault(errMsg, ex);
    } else if (ex instanceof IllegalStateFault) {
        throw new IllegalStateFault(errMsg, ex);
    } else {
        throw new IllegalStateFault(errMsg, ex);
    }
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:16,代码来源:HumanTaskClientAPIServiceClient.java


示例12: checkMatchingTaskAndDelete

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
private void checkMatchingTaskAndDelete(String requestId, HumanTaskClientAPIAdminClient client,
                                        TTaskSimpleQueryResultRow[] resultsList, int resultIndex, OMElementImpl
                                                taskElement) throws RemoteException, IllegalStateFault,
        IllegalOperationFault, IllegalArgumentFault, IllegalAccessFault {

    if (taskElement.getLocalName().equals(WFImplConstant.HT_PARAMETER_LIST_ELEMENT)) {
        Iterator<OMElementImpl> parameters = taskElement.getChildElements();
        while (parameters.hasNext()) {
            OMElementImpl parameter = parameters.next();
            Iterator<OMAttribute> attributes = parameter.getAllAttributes();
            while (attributes.hasNext()) {
                OMAttribute currentAttribute = attributes.next();
                if (currentAttribute.getLocalName().equals(WFImplConstant.HT_ITEM_NAME_ATTRIBUTE) &&
                        currentAttribute
                                .getAttributeValue().equals(WFImplConstant.HT_REQUEST_ID_ATTRIBUTE_VALUE)) {
                    Iterator<OMElementImpl> itemValues = parameter.getChildElements();
                    if (itemValues.hasNext()) {
                        String taskRequestId = itemValues.next().getText();
                        if (taskRequestId.contains(",")) {
                            taskRequestId = taskRequestId.replaceAll(",", "");
                        }
                        if (taskRequestId.equals(requestId)) {
                            client.skip(resultsList[resultIndex].getId());
                        }
                    }

                }
            }
        }
    }

}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:33,代码来源:WorkflowImplServiceImpl.java


示例13: skip

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
/**
 * The skip operation.
 * @param taskId : The task id.
 * @throws IllegalArgumentFault :
 * @throws IllegalOperationFault  :
 * @throws IllegalAccessFault :
 * @throws IllegalStateFault :
 * @throws RemoteException :
 */
public void skip(URI taskId)
        throws IllegalArgumentFault, IllegalOperationFault, IllegalAccessFault,
        IllegalStateFault, RemoteException {
    String errMsg = "Error occurred while performing skip operation";
    try {
        stub.skip(taskId);
    } catch (RemoteException | IllegalStateFault | IllegalOperationFault | IllegalArgumentFault | IllegalAccessFault e) {
        log.error(errMsg, e);
        throw e;
    }
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:21,代码来源:HumanTaskClientAPIAdminClient.java


示例14: complete

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
/**
 * Task complete operation.
 *
 * @param taskId  : The task id to be completed.
 * @param payLoad : The payload.
 * @throws java.rmi.RemoteException       :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalAccessFault    :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalArgumentFault  :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault     :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalOperationFault :
 * @throws javax.xml.stream.XMLStreamException    :
 */
public void complete(URI taskId, String payLoad)
        throws RemoteException, IllegalAccessFault, IllegalArgumentFault, IllegalStateFault, IllegalOperationFault,
               XMLStreamException {
    String errMsg = "Error occurred while performing complete operation";
    try {
        String decodedPayload = decodeHTML(payLoad);
        stub.complete(taskId, decodedPayload);
    } catch (Exception ex) {
        handleException(errMsg, ex);
    }
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:24,代码来源:HumanTaskClientAPIServiceClient.java


示例15: claim

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
/**
 * Claim task operation.
 *
 * @param taskId : The ID of the task to be claimed.
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalArgumentFault  :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalAccessFault    :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault     :
 * @throws java.rmi.RemoteException       :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalOperationFault :
 */
public void claim(URI taskId)
        throws IllegalArgumentFault, IllegalAccessFault, IllegalStateFault, RemoteException, IllegalOperationFault {
    String errMsg = "Error occurred while performing claim operation";
    try {
        stub.claim(taskId);
    } catch (Exception ex) {
        handleException(errMsg, ex);
    }
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:20,代码来源:HumanTaskClientAPIServiceClient.java


示例16: stop

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
/**
 * Stop task.
 *
 * @param taskId : The task Id.
 * @throws java.rmi.RemoteException       :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault     :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalOperationFault :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalArgumentFault  :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalAccessFault    :
 */
public void stop(URI taskId)
        throws RemoteException, IllegalStateFault, IllegalOperationFault, IllegalArgumentFault, IllegalAccessFault {
    String errMsg = "Error occurred while performing stop operation";
    try {
        stub.stop(taskId);
    } catch (Exception ex) {
        handleException(errMsg, ex);
    }
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:20,代码来源:HumanTaskClientAPIServiceClient.java


示例17: simpleQuery

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
/**
 * Lists the tasks matching the provided simple query object.
 *
 * @param queryInput : The simple query object with the filtering criteria.
 * @return : The result set
 * @throws java.rmi.RemoteException :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalArgumentFault
 *                                  :
 * @throws org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault
 *                                  :
 */
public TTaskSimpleQueryResultSet simpleQuery(TSimpleQueryInput queryInput)
        throws RemoteException, IllegalArgumentFault, IllegalStateFault {
    try {
        return stub.simpleQuery(queryInput);
    } catch (RemoteException | IllegalStateFault | IllegalArgumentFault e) {
        log.error("Error occurred while performing taskListQuery operation", e);
        throw e;
    }
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:21,代码来源:HumanTaskClientAPIAdminClient.java


示例18: getInput

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
/**
 * Loads the task input.
 *
 * @param taskId : The id of the task/.
 * @return : The task input OMElement.
 * @throws RemoteException        :
 * @throws IllegalStateFault      :
 * @throws IllegalOperationFault:
 * @throws IllegalAccessFault:
 * @throws IllegalArgumentFault:
 * @throws javax.xml.stream.XMLStreamException
 * 
 */
public OMElement getInput(URI taskId)
        throws RemoteException, IllegalStateFault, IllegalOperationFault, IllegalAccessFault,
        IllegalArgumentFault, XMLStreamException {

    try {
        String input = (String) stub.getInput(taskId, new NCName(""));
        return AXIOMUtil.stringToOM(input);
    } catch (RemoteException | IllegalStateFault | IllegalOperationFault | IllegalArgumentFault | IllegalAccessFault | XMLStreamException e) {
        log.error("Error occurred while performing loadTaskInput operation", e);
        throw e;
    }
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:26,代码来源:HumanTaskClientAPIAdminClient.java


示例19: completeTask

import org.wso2.carbon.humantask.stub.ui.task.client.api.IllegalStateFault; //导入依赖的package包/类
/**
 * change the workItem status to Complete. it will hide from the management console
 *
 * @param id
 * @throws RemoteException
 * @throws IllegalStateFault
 * @throws IllegalOperationFault
 * @throws IllegalArgumentFault
 * @throws IllegalAccessFault
 */
public void completeTask(URI id) throws RemoteException, IllegalStateFault,
		IllegalOperationFault, IllegalArgumentFault, IllegalAccessFault {
	htStub.start(id);
	htStub.complete(id, "<WorkResponse>true</WorkResponse>");
}
 
开发者ID:wso2,项目名称:product-es,代码行数:16,代码来源:HumanTaskAdminClient.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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