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


Java InitiatedDocumentType类代码示例

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


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

示例1: getInitiatedDocumentTypesList

import org.kuali.rice.kew.quicklinks.InitiatedDocumentType; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
   public List<InitiatedDocumentType> getInitiatedDocumentTypesList(final String principalId) {
       String documentNames = CoreFrameworkServiceLocator.getParameterService().getParameterValueAsString(KewApiConstants.KEW_NAMESPACE, KRADConstants.DetailTypes.QUICK_LINK_DETAIL_TYPE, KewApiConstants.QUICK_LINKS_RESTRICT_DOCUMENT_TYPES);
       if (documentNames != null) {
           documentNames = documentNames.trim();
       }
       if (documentNames == null || "none".equals(documentNames)) {
           documentNames = "";
       }

       final StringTokenizer st = new StringTokenizer(documentNames, ",");
       final List<String> docTypesToRestrict = new ArrayList<String>();
       while (st.hasMoreTokens()) {
           docTypesToRestrict.add(st.nextToken());
       }

       try {
           final List<Object[]> list = getEntityManager().createNamedQuery(
                   "DocumentType.QuickLinks.FindInitiatedDocumentTypesListByInitiatorWorkflowId").
                   setParameter("initiatorWorkflowId", principalId).getResultList();
           final List<InitiatedDocumentType> documentTypesByName = new ArrayList<InitiatedDocumentType>(list.size());
           for (Object[] doc : list) {
               final String docTypeName = (String) doc[0];
               final String label = (String) doc[1];

               final String docTypeTopParent;
               final int firstPeriod = docTypeName.indexOf(".");
               if (firstPeriod == -1) {
                   docTypeTopParent = docTypeName.substring(0);
               } else {
                   docTypeTopParent = docTypeName.substring(0, firstPeriod);
               }
               if (!docTypesToRestrict.contains(docTypeTopParent)) {
                   // the document types should be cached so this should be pretty quick
                   final DocumentType docType = KEWServiceLocator.getDocumentTypeService().findByName(docTypeName);
                   final DocumentTypePolicy quickInitiatePolicy = docType.getSupportsQuickInitiatePolicy();
                   if (quickInitiatePolicy.getPolicyValue().booleanValue()) {
                       documentTypesByName.add(new InitiatedDocumentType(docTypeName, label));
                   }
               }
           }
           return documentTypesByName;
       } catch (Exception e) {
           throw new WorkflowRuntimeException("Error getting initiated document types for user: " + principalId, e);
       }
   }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:48,代码来源:QuickLinksDAOJpa.java

示例2: getInitiatedDocumentTypesList

import org.kuali.rice.kew.quicklinks.InitiatedDocumentType; //导入依赖的package包/类
@Override
public List<InitiatedDocumentType> getInitiatedDocumentTypesList(String principalId) {
       return getQuickLinksDAO().getInitiatedDocumentTypesList(principalId);
   }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:5,代码来源:QuickLinksServiceImpl.java

示例3: getInitiatedDocumentTypesList

import org.kuali.rice.kew.quicklinks.InitiatedDocumentType; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
   public List<InitiatedDocumentType> getInitiatedDocumentTypesList(final String principalId) {
       String documentNames = CoreFrameworkServiceLocator.getParameterService().getParameterValueAsString(KewApiConstants.KEW_NAMESPACE, KRADConstants.DetailTypes.QUICK_LINK_DETAIL_TYPE, KewApiConstants.QUICK_LINKS_RESTRICT_DOCUMENT_TYPES);
       if (documentNames != null) {
           documentNames = documentNames.trim();
       }
       if (documentNames == null || "none".equals(documentNames)) {
           documentNames = "";
       }

       final StringTokenizer st = new StringTokenizer(documentNames, ",");
       final List<String> docTypesToRestrict = new ArrayList<String>();
       while (st.hasMoreTokens()) {
           docTypesToRestrict.add(st.nextToken());
       }

       try {
           final List<Object[]> list = entityManager.createNamedQuery("DocumentType.QuickLinks.FindInitiatedDocumentTypesListByInitiatorWorkflowId").setParameter("initiatorWorkflowId", principalId).getResultList();
           final List<InitiatedDocumentType> documentTypesByName = new ArrayList<InitiatedDocumentType>(list.size());
           for (Object[] doc : list) {
               final String docTypeName = (String) doc[0];
               final String label = (String) doc[1];

               final String docTypeTopParent;
               final int firstPeriod = docTypeName.indexOf(".");
               if (firstPeriod == -1) {
                   docTypeTopParent = docTypeName.substring(0);
               } else {
                   docTypeTopParent = docTypeName.substring(0, firstPeriod);
               }
               if (!docTypesToRestrict.contains(docTypeTopParent)) {
                   // the document types should be cached so this should be pretty quick
                   final DocumentType docType = KEWServiceLocator.getDocumentTypeService().findByName(docTypeName);
                   final DocumentTypePolicy quickInitiatePolicy = docType.getSupportsQuickInitiatePolicy();
                   if (quickInitiatePolicy.getPolicyValue().booleanValue()) {
                       documentTypesByName.add(new InitiatedDocumentType(docTypeName, label));
                   }
               }
           }
           return documentTypesByName;
       } catch (Exception e) {
           throw new WorkflowRuntimeException("Error getting initiated document types for user: " + principalId, e);
       }
   }
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:46,代码来源:QuickLinksDAOJpaImpl.java

示例4: getInitiatedDocumentTypesList

import org.kuali.rice.kew.quicklinks.InitiatedDocumentType; //导入依赖的package包/类
public List<InitiatedDocumentType> getInitiatedDocumentTypesList(String principalId); 
开发者ID:kuali,项目名称:kc-rice,代码行数:2,代码来源:QuickLinksDAO.java


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