當前位置: 首頁>>代碼示例>>Java>>正文


Java TasksResource類代碼示例

本文整理匯總了Java中org.activiti.rest.api.task.TasksResource的典型用法代碼示例。如果您正苦於以下問題:Java TasksResource類的具體用法?Java TasksResource怎麽用?Java TasksResource使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TasksResource類屬於org.activiti.rest.api.task包,在下文中一共展示了TasksResource類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createInboundRoot

import org.activiti.rest.api.task.TasksResource; //導入依賴的package包/類
/**
 * Creates a root Restlet that will receive all incoming calls.
 */
@Override
public synchronized Restlet createInboundRoot() {
  Verifier verifier = new SecretVerifier() {

    @Override
    public boolean verify(String username, char[] password) throws IllegalArgumentException {
      boolean verified = ActivitiUtil.getIdentityService().checkPassword(username, new String(password));
      return verified;
    }
  };
  authenticator = new ChallengeAuthenticator(null, true, ChallengeScheme.HTTP_BASIC,
        "Activiti Realm") {
    
    @Override
    protected boolean authenticate(Request request, Response response) {
      if (request.getChallengeResponse() == null) {
        return false;
      } else {
        return super.authenticate(request, response);
      }
    }
  };
  authenticator.setVerifier(verifier);
  
  Router router = new Router(getContext());

  router.attachDefault(DefaultResource.class);
  
  router.attach("/process-engine", ProcessEngineResource.class);
  
  router.attach("/login", LoginResource.class);
  
  router.attach("/user/{userId}", UserResource.class);
  router.attach("/user/{userId}/groups", UserGroupsResource.class);
  router.attach("/group/{groupId}", GroupResource.class);
  router.attach("/groups/{groupId}/users", GroupUsersResource.class);
  
  router.attach("/process-definitions", ProcessDefinitionsResource.class);
  router.attach("/process-instances", ProcessInstancesResource.class);
  router.attach("/process-instance", ProcessInstanceResource.class);
  router.attach("/processInstance/{processInstanceId}/diagram", ProcessInstanceDiagramResource.class);
  router.attach("/process-definition/{processDefinitionId}/form", ProcessDefinitionFormResource.class);
  
  router.attach("/tasks", TasksResource.class);
  router.attach("/tasks-summary", TasksSummaryResource.class);
  router.attach("/task/{taskId}", TaskResource.class);
  router.attach("/task/{taskId}/form", TaskFormResource.class);
  router.attach("/task/{taskId}/{operation}", TaskOperationResource.class);
  
  router.attach("/form/{taskId}/properties", TaskPropertiesResource.class);
  
  router.attach("/deployments", DeploymentsResource.class);
  router.attach("/deployment", DeploymentUploadResource.class);
  router.attach("/deployments/delete", DeploymentsDeleteResource.class);
  router.attach("/deployment/{deploymentId}", DeploymentDeleteResource.class);
  
  router.attach("/management/jobs", JobsResource.class);
  router.attach("/management/job/{jobId}", JobResource.class);
  router.attach("/management/job/{jobId}/execute", JobExecuteResource.class);
  router.attach("/management/jobs/execute", JobsExecuteResource.class);
  
  router.attach("/management/tables", TablesResource.class);
  router.attach("/management/table/{tableName}", TableResource.class);
  router.attach("/management/table/{tableName}/data", TableDataResource.class);
  
  authenticator.setNext(router);
  
  return authenticator;
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:73,代碼來源:ActivitiRestApplication.java


注:本文中的org.activiti.rest.api.task.TasksResource類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。