• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RouteNodeInstance类的典型用法和代码示例

java 1次浏览

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

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

示例1: canSuperUserTakeAction

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
public boolean canSuperUserTakeAction(Document document, Person user) {
    if (!document.getDocumentHeader().hasWorkflowDocument()) {
        return false;
    }

    String principalId = user.getPrincipalId();

    String documentTypeId = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeId();
    if (KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, documentTypeId)) {
        return true;
    }

    String documentTypeName = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
    List<RouteNodeInstance> routeNodeInstances = document.getDocumentHeader().getWorkflowDocument().getRouteNodeInstances();
    String documentStatus =  document.getDocumentHeader().getWorkflowDocument().getStatus().getCode();
    return KewApiServiceLocator.getDocumentTypeService().canSuperUserApproveSingleActionRequest(
            principalId, documentTypeName, routeNodeInstances, documentStatus);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:19,
代码来源:DocumentAuthorizerBase.java

示例2: canSuperUserApprove

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
public boolean canSuperUserApprove(Document document, Person user) {
    if (!document.getDocumentHeader().hasWorkflowDocument()) {
        return false;
    }

    String principalId = user.getPrincipalId();

    String documentTypeId = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeId();
    if (KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, documentTypeId)) {
        return true;
    }

    String documentTypeName = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
    List<RouteNodeInstance> routeNodeInstances = document.getDocumentHeader().getWorkflowDocument().getRouteNodeInstances();
    String documentStatus =  document.getDocumentHeader().getWorkflowDocument().getStatus().getCode();
    return KewApiServiceLocator.getDocumentTypeService().canSuperUserApproveDocument(
            principalId, documentTypeName, routeNodeInstances, documentStatus);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:19,
代码来源:DocumentAuthorizerBase.java

示例3: canSuperUserDisapprove

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
public boolean canSuperUserDisapprove(Document document, Person user) {
    if (!document.getDocumentHeader().hasWorkflowDocument()) {
        return false;
    }

    String principalId = user.getPrincipalId();

    String documentTypeId = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeId();
    if (KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, documentTypeId)) {
        return true;
    }

    String documentTypeName = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
    List<RouteNodeInstance> routeNodeInstances = document.getDocumentHeader().getWorkflowDocument().getRouteNodeInstances();
    String documentStatus =  document.getDocumentHeader().getWorkflowDocument().getStatus().getCode();
    return KewApiServiceLocator.getDocumentTypeService().canSuperUserDisapproveDocument(
            principalId, documentTypeName, routeNodeInstances, documentStatus);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:19,
代码来源:DocumentAuthorizerBase.java

示例4: isSuperUserApproveSingleActionRequestAuthorized

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
public boolean isSuperUserApproveSingleActionRequestAuthorized() {
    String principalId =  GlobalVariables.getUserSession().getPrincipalId();
    String docId = this.getDocId();
    DocumentType documentType = KewApiServiceLocator.getDocumentTypeService().getDocumentTypeByName(docTypeName);
    String docTypeId = null;
    if (documentType != null) {
        docTypeId = documentType.getId();
    }
    if ( KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, docTypeId) ) {
        return true;
    }
    List<RouteNodeInstance> routeNodeInstances= KewApiServiceLocator.getWorkflowDocumentService().getRouteNodeInstances(docId);
    String documentStatus =  KewApiServiceLocator.getWorkflowDocumentService().getDocumentStatus(docId).getCode();
    return KewApiServiceLocator.getDocumentTypeService().canSuperUserApproveSingleActionRequest(
            principalId, getDocTypeName(), routeNodeInstances, documentStatus);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:17,
代码来源:KualiDocumentFormBase.java

示例5: isSuperUserApproveDocumentAuthorized

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
public boolean isSuperUserApproveDocumentAuthorized() {
       String principalId =  GlobalVariables.getUserSession().getPrincipalId();
       String docId = this.getDocId();
       DocumentType documentType = KewApiServiceLocator.getDocumentTypeService().getDocumentTypeByName(docTypeName);
       String docTypeId = null;
       if (documentType != null) {
           docTypeId = documentType.getId();
       }
       if ( KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, docTypeId) ) {
           return true;
       }
    List<RouteNodeInstance> routeNodeInstances= KewApiServiceLocator.getWorkflowDocumentService().getRouteNodeInstances(docId);
       String documentStatus =  KewApiServiceLocator.getWorkflowDocumentService().getDocumentStatus(docId).getCode();
       return KewApiServiceLocator.getDocumentTypeService().canSuperUserApproveDocument(
                   principalId, this.getDocTypeName(), routeNodeInstances, documentStatus);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:17,
代码来源:KualiDocumentFormBase.java

示例6: isSuperUserDisapproveDocumentAuthorized

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
public boolean isSuperUserDisapproveDocumentAuthorized() {
    String principalId =  GlobalVariables.getUserSession().getPrincipalId();
    String docId = this.getDocId();
    DocumentType documentType = KewApiServiceLocator.getDocumentTypeService().getDocumentTypeByName(docTypeName);
    String docTypeId = null;
    if (documentType != null) {
        docTypeId = documentType.getId();
    }
    if ( KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, docTypeId) ) {
        return true;
    }
 List<RouteNodeInstance> routeNodeInstances= KewApiServiceLocator.getWorkflowDocumentService().getRouteNodeInstances(docId);
    String documentStatus =  KewApiServiceLocator.getWorkflowDocumentService().getDocumentStatus(docId).getCode();
    return KewApiServiceLocator.getDocumentTypeService().canSuperUserDisapproveDocument(
        principalId, this.getDocTypeName(), routeNodeInstances, documentStatus);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:17,
代码来源:KualiDocumentFormBase.java

示例7: isSuperUserAuthorized

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
public boolean isSuperUserAuthorized() {
    String docId = this.getDocId();
    if (StringUtils.isBlank(docId) || ObjectUtils.isNull(docTypeName)) {
        return false;
    }

    DocumentType documentType = KewApiServiceLocator.getDocumentTypeService().getDocumentTypeByName(docTypeName);
    String docTypeId = null;
    if (documentType != null) {
        docTypeId = documentType.getId();
    }
    String principalId =  GlobalVariables.getUserSession().getPrincipalId();
    if ( KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, docTypeId) ) {
        return true;
    }
    List<RouteNodeInstance> routeNodeInstances= KewApiServiceLocator.getWorkflowDocumentService().getRouteNodeInstances(
            docId);
    String documentStatus =  KewApiServiceLocator.getWorkflowDocumentService().getDocumentStatus(docId).getCode();
    return ((KewApiServiceLocator.getDocumentTypeService().canSuperUserApproveSingleActionRequest(
                principalId, this.getDocTypeName(), routeNodeInstances, documentStatus)) ||
            (KewApiServiceLocator.getDocumentTypeService().canSuperUserApproveDocument(
                principalId, this.getDocTypeName(), routeNodeInstances, documentStatus)) ||
            (KewApiServiceLocator.getDocumentTypeService().canSuperUserDisapproveDocument (
                principalId, this.getDocTypeName(), routeNodeInstances, documentStatus))) ;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:26,
代码来源:KualiDocumentFormBase.java

示例8: canSuperUserTakeAction

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public boolean canSuperUserTakeAction(Document document, Person user) {
    if (!document.getDocumentHeader().hasWorkflowDocument()) {
        return false;
    }

    String principalId = user.getPrincipalId();

    String documentTypeId = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeId();
    if (KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, documentTypeId)) {
        return true;
    }

    String documentTypeName = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
    List<RouteNodeInstance> routeNodeInstances = document.getDocumentHeader().getWorkflowDocument().getRouteNodeInstances();
    String documentStatus =  document.getDocumentHeader().getWorkflowDocument().getStatus().getCode();
    return KewApiServiceLocator.getDocumentTypeService().canSuperUserApproveSingleActionRequest(
            principalId, documentTypeName, routeNodeInstances, documentStatus);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:23,
代码来源:DocumentAuthorizerBase.java

示例9: canSuperUserApprove

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public boolean canSuperUserApprove(Document document, Person user) {
    if (!document.getDocumentHeader().hasWorkflowDocument()) {
        return false;
    }

    String principalId = user.getPrincipalId();

    String documentTypeId = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeId();
    if (KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, documentTypeId)) {
        return true;
    }

    String documentTypeName = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
    List<RouteNodeInstance> routeNodeInstances = document.getDocumentHeader().getWorkflowDocument().getRouteNodeInstances();
    String documentStatus =  document.getDocumentHeader().getWorkflowDocument().getStatus().getCode();
    return KewApiServiceLocator.getDocumentTypeService().canSuperUserApproveDocument(
            principalId, documentTypeName, routeNodeInstances, documentStatus);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:23,
代码来源:DocumentAuthorizerBase.java

示例10: canSuperUserDisapprove

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public boolean canSuperUserDisapprove(Document document, Person user) {
    if (!document.getDocumentHeader().hasWorkflowDocument()) {
        return false;
    }

    String principalId = user.getPrincipalId();

    String documentTypeId = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeId();
    if (KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, documentTypeId)) {
        return true;
    }

    String documentTypeName = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
    List<RouteNodeInstance> routeNodeInstances = document.getDocumentHeader().getWorkflowDocument().getRouteNodeInstances();
    String documentStatus =  document.getDocumentHeader().getWorkflowDocument().getStatus().getCode();
    return KewApiServiceLocator.getDocumentTypeService().canSuperUserDisapproveDocument(
            principalId, documentTypeName, routeNodeInstances, documentStatus);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:23,
代码来源:DocumentAuthorizerBase.java

示例11: generateXmlInput

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
protected Document generateXmlInput(RouteContext context) throws Exception {
DocumentBuilder db = getDocumentBuilder(true);
       Document doc = db.newDocument();
       Element emailNodeElem = doc.createElement("emailNode");
       doc.appendChild(emailNodeElem);
       String principalId = null;  // Added to the convertRouteHeader is not ambigious.
       org.kuali.rice.kew.api.document.Document routeHeaderVO = DocumentRouteHeaderValue.to(context.getDocument());
       RouteNodeInstance routeNodeInstanceVO = org.kuali.rice.kew.engine.node.RouteNodeInstance.to(context.getNodeInstance());
       Document documentContent = context.getDocumentContent().getDocument();
       XStream xstream = new XStream();
       Element docElem = XmlHelper.readXml(xstream.toXML(routeHeaderVO)).getDocumentElement();
       Element nodeElem = XmlHelper.readXml(xstream.toXML(routeNodeInstanceVO)).getDocumentElement();
       emailNodeElem.appendChild(doc.importNode(docElem, true));
       emailNodeElem.appendChild(doc.importNode(nodeElem, true));
       emailNodeElem.appendChild(doc.importNode(documentContent.getDocumentElement(), true));
       Element dConElem = context.getDocumentContent().getApplicationContent();//Add document Content element for
	 	emailNodeElem.appendChild(doc.importNode(dConElem, true));//access by the stylesheet when creating the email
       return doc;
   }
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:20,
代码来源:EmailNode.java

示例12: canSuperUserApproveSingleActionRequest

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
@Override
public boolean canSuperUserApproveSingleActionRequest( String principalId, String documentTypeName, List<RouteNodeInstance> routeNodeInstances, String routeStatusCode ) {

    checkSuperUserInput( principalId, documentTypeName );

    org.kuali.rice.kew.doctype.bo.DocumentType documentType = KEWServiceLocator.getDocumentTypeService().findByName(documentTypeName);
    List<org.kuali.rice.kew.engine.node.RouteNodeInstance> currentNodeInstances = null;
    if (routeNodeInstances != null && !routeNodeInstances.isEmpty()) {
        currentNodeInstances = KEWServiceLocator.getRouteNodeService().getCurrentNodeInstances(routeNodeInstances.get(0).getDocumentId());
    }

    boolean isSuperUser = KEWServiceLocator.getDocumentTypePermissionService().canSuperUserApproveSingleActionRequest( principalId, documentType,
            currentNodeInstances, routeStatusCode);
    if (LOG.isDebugEnabled()) {
        LOG.debug("Super user approve single action request status is " + isSuperUser + ".");
    }
    return isSuperUser;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:19,
代码来源:DocumentTypeServiceImpl.java

示例13: canSuperUserApproveDocument

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
@Override
public boolean canSuperUserApproveDocument( String principalId, String documentTypeName, List<RouteNodeInstance> routeNodeInstances, String routeStatusCode ) {
    checkSuperUserInput( principalId, documentTypeName );

    org.kuali.rice.kew.doctype.bo.DocumentType documentType = KEWServiceLocator.getDocumentTypeService().findByName(documentTypeName);
    List<org.kuali.rice.kew.engine.node.RouteNodeInstance> currentNodeInstances = null;
    if (routeNodeInstances != null && !routeNodeInstances.isEmpty()) {
        currentNodeInstances = KEWServiceLocator.getRouteNodeService().getCurrentNodeInstances(routeNodeInstances.get(0).getDocumentId());
    }

    boolean isSuperUser = KEWServiceLocator.getDocumentTypePermissionService().canSuperUserApproveDocument(
            principalId, documentType, currentNodeInstances, routeStatusCode);
    if (LOG.isDebugEnabled()) {
        LOG.debug("Super user approve document status is " + isSuperUser + ".");
    }
    return isSuperUser;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:18,
代码来源:DocumentTypeServiceImpl.java

示例14: canSuperUserDisapproveDocument

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
@Override
public boolean canSuperUserDisapproveDocument( String principalId, String documentTypeName, List<RouteNodeInstance> routeNodeInstances, String routeStatusCode ) {
    checkSuperUserInput( principalId, documentTypeName );

    org.kuali.rice.kew.doctype.bo.DocumentType documentType = KEWServiceLocator.getDocumentTypeService().findByName(documentTypeName);

    List<org.kuali.rice.kew.engine.node.RouteNodeInstance> currentNodeInstances = null;
    if (routeNodeInstances != null && !routeNodeInstances.isEmpty()) {
        currentNodeInstances = KEWServiceLocator.getRouteNodeService().getCurrentNodeInstances(routeNodeInstances.get(0).getDocumentId());
    }

    boolean isSuperUser = KEWServiceLocator.getDocumentTypePermissionService().canSuperUserDisapproveDocument( principalId, documentType,
            currentNodeInstances, routeStatusCode);
    if (LOG.isDebugEnabled()) {
        LOG.debug("Super user disapprove document status is " + isSuperUser + ".");
    }
    return isSuperUser;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:19,
代码来源:DocumentTypeServiceImpl.java

示例15: setFiscalOfficer

点赞 3

import org.kuali.rice.kew.api.document.node.RouteNodeInstance; //导入依赖的package包/类
/**
 * This method determines if the user is a fiscal officer
 *
 * @return true if they are a fiscal officer
 */
protected boolean setFiscalOfficer(TravelFormBase reqForm) {
    // Find if they have the role

    // checking this is causing a RuntimeException when the workflow document is null (when generating a report).
    // apparently even checking if a workflow document is null will cause it to send a RuntimeException - hence the try catch.
    boolean workflowCheck = false;
    try {
        List<RouteNodeInstance> nodes = reqForm.getWorkflowDocument().getRouteNodeInstances();
        for (RouteNodeInstance routeNode : nodes){
            if (routeNode.getName().equals(KFSConstants.RouteLevelNames.ACCOUNT)){
                workflowCheck = true;
            }
        }
        workflowCheck &= reqForm.getWorkflowDocument().isEnroute();
    }
    catch (RuntimeException e) {
        // Do not propagate this exception.
       LOG.info("Could not retrieve the workflow document. This is most likely normal and ok in this case.");
    }

    return getTravelDocumentService().isResponsibleForAccountsOn(reqForm.getTravelDocument(), GlobalVariables.getUserSession().getPerson().getPrincipalId()) && workflowCheck;
}
 

开发者ID:kuali,
项目名称:kfs,
代码行数:28,
代码来源:TravelActionBase.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)