當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。