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


Java IllegalStateFault类代码示例

本文整理汇总了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类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


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