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


Java GroupNotFoundException类代码示例

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


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

示例1: retrieveValidKimGroup

import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
private Group retrieveValidKimGroup(String xpathExpression, Node documentTypeNode, boolean deprecatedGroupElement) throws XPathExpressionException, GroupNotFoundException {
    String groupName;
    String groupNamespace = null;
    try {
        groupName = (String) getXPath().evaluate(xpathExpression, documentTypeNode, XPathConstants.STRING);
        // If not using the deprecated "namespaceCode:GroupName" format for group names, obtain the namespace from the element's "namespace" attribute.
        if (!deprecatedGroupElement) {
        	groupNamespace = (String) getXPath().evaluate(xpathExpression + "/@" + NAMESPACE, documentTypeNode, XPathConstants.STRING);
        }
    } catch (XPathExpressionException xpee) {
        LOG.error("Error obtaining document type workgroup using xpath expression: " + xpathExpression, xpee);
        throw xpee;
    }
    // Use the appropriate method to retrieve the group, based on whether or not the deprecated "namespaceCode:groupName" naming pattern is in use. 
    return (deprecatedGroupElement) ?
    		retrieveValidKimGroupUsingUnparsedGroupName(groupName) : retrieveValidKimGroupUsingGroupNameAndNamespace(groupName, groupNamespace);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:DocumentTypeXmlParser.java

示例2: parseDocumentTypes

import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
public List<DocumentType> parseDocumentTypes(InputStream input) throws SAXException, IOException, ParserConfigurationException, XPathExpressionException, WorkflowException, GroupNotFoundException {
    Document routeDocument = XmlHelper.trimXml(input);
    Map<String, DocumentType> documentTypesByName = new HashMap<String, DocumentType>();
    for (DocumentType type:  parseAllDocumentTypes(routeDocument)) {
        documentTypesByName.put(type.getName(), type);
    }
    return new ArrayList<DocumentType>(documentTypesByName.values());
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:DocumentTypeXmlParser.java

示例3: parseDocumentType

import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
private DocumentType parseDocumentType(boolean isOverwrite, Node documentTypeNode) throws SAXException, IOException, ParserConfigurationException, XPathExpressionException, WorkflowException, GroupNotFoundException {
    DocumentType documentType = getFullDocumentType(isOverwrite, documentTypeNode);
    // reset variables
    nodesMap = null;
    xpath = null;
    defaultExceptionWorkgroup = null;

    LOG.debug("Saving document type " + documentType.getName());
    return routeDocumentType(documentType);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:11,代码来源:DocumentTypeXmlParser.java

示例4: retrieveValidKimGroupUsingUnparsedGroupName

import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
private Group retrieveValidKimGroupUsingUnparsedGroupName(String unparsedGroupName) throws GroupNotFoundException {
    // allow core config parameter replacement in documenttype workgroups
    unparsedGroupName = Utilities.substituteConfigParameters(unparsedGroupName);
    String groupName = Utilities.parseGroupName(unparsedGroupName);
    String groupNamespace = Utilities.parseGroupNamespaceCode(unparsedGroupName);
    return retrieveValidKimGroupUsingProcessedGroupNameAndNamespace(groupName, groupNamespace);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:DocumentTypeXmlParser.java

示例5: retrieveValidKimGroupUsingProcessedGroupNameAndNamespace

import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
private Group retrieveValidKimGroupUsingProcessedGroupNameAndNamespace(String groupName, String groupNamespace) throws GroupNotFoundException {
    if (StringUtils.isBlank(groupNamespace) || StringUtils.isBlank(groupName)) {
        throw new GroupNotFoundException("Valid Workgroup could not be found... Namespace: " + groupNamespace + "  Name: " + groupName);
    }
    Group workgroup = getGroupService().getGroupByNamespaceCodeAndName(groupNamespace, groupName);
    if (workgroup == null) {
        throw new GroupNotFoundException("Valid Workgroup could not be found... Namespace: " + groupNamespace + "  Name: " + groupName);
    }
    return workgroup;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:11,代码来源:DocumentTypeXmlParser.java

示例6: generateNewDocumentTypeFromExisting

import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
public DocumentType generateNewDocumentTypeFromExisting(String documentTypeName) throws SAXException, IOException, ParserConfigurationException, XPathExpressionException, GroupNotFoundException, WorkflowException {
    // export the document type that exists in the database
    DocumentType docTypeFromDatabase = KEWServiceLocator.getDocumentTypeService().findByName(documentTypeName);
    if (docTypeFromDatabase != null) {
        KewExportDataSet kewExportDataSet = new KewExportDataSet();
        kewExportDataSet.getDocumentTypes().add(docTypeFromDatabase);
        byte[] xmlBytes = CoreApiServiceLocator.getXmlExporterService().export(kewExportDataSet.createExportDataSet());
        // use the exported document type from the database to generate the new document type
        Document tempDocument = XmlHelper.trimXml(new BufferedInputStream(new ByteArrayInputStream(xmlBytes)));
        Node documentTypeNode = (Node) getXPath().evaluate("/" + DATA_ELEMENT + "/" + DOCUMENT_TYPES + "/" + DOCUMENT_TYPE, tempDocument, XPathConstants.NODE);
        return getFullDocumentType(false, documentTypeNode);
    }
    return null;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:15,代码来源:DocumentTypeXmlParser.java

示例7: parseDocumentTypes

import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
public List<DocumentType> parseDocumentTypes(InputStream input) throws SAXException, IOException, ParserConfigurationException, XPathExpressionException, WorkflowException, GroupNotFoundException {
    Document routeDocument=XmlHelper.trimXml(input);
    Map<String, DocumentType> documentTypesByName = new HashMap();
    for (DocumentType type:  parseAllDocumentTypes(routeDocument)) {
        documentTypesByName.put(type.getName(), type);
    }
    return new ArrayList<DocumentType>(documentTypesByName.values());
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:9,代码来源:DocumentTypeXmlParser.java

示例8: parseDocumentType

import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
private DocumentType parseDocumentType(boolean isOverwrite, Node documentTypeNode) throws SAXException, IOException, ParserConfigurationException, XPathExpressionException, WorkflowException, GroupNotFoundException {
        DocumentType documentType = getFullDocumentType(isOverwrite, documentTypeNode);
//        parseStructure(isOverwrite, documentTypeNode, documentType, new RoutePathContext());
        // reset variables
        docTypeRouteNodes = null;
        nodesMap = null;
        xpath = null;
        defaultExceptionWorkgroup = null;

        LOG.debug("Saving document type " + documentType.getName());
        routeDocumentType(documentType);
        return documentType;
    }
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:14,代码来源:DocumentTypeXmlParser.java

示例9: generateNewDocumentTypeFromExisting

import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
public DocumentType generateNewDocumentTypeFromExisting(String documentTypeName) throws SAXException, IOException, ParserConfigurationException, XPathExpressionException, GroupNotFoundException, WorkflowException {
    // export the document type that exists in the database
    DocumentType docTypeFromDatabase = KEWServiceLocator.getDocumentTypeService().findByName(documentTypeName);
    if (ObjectUtils.isNotNull(docTypeFromDatabase)) {
        KewExportDataSet kewExportDataSet = new KewExportDataSet();
        kewExportDataSet.getDocumentTypes().add(docTypeFromDatabase);
        byte[] xmlBytes = CoreApiServiceLocator.getXmlExporterService().export(kewExportDataSet.createExportDataSet());
        // use the exported document type from the database to generate the new document type
        Document tempDocument = XmlHelper.trimXml(new BufferedInputStream(new ByteArrayInputStream(xmlBytes)));
        Node documentTypeNode = (Node) getXPath().evaluate("/" + DATA_ELEMENT + "/" + DOCUMENT_TYPES + "/" + DOCUMENT_TYPE, tempDocument, XPathConstants.NODE);
        return getFullDocumentType(false, documentTypeNode);
    }
    return null;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:15,代码来源:DocumentTypeXmlParser.java

示例10: getFullDocumentType

import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
private DocumentType getFullDocumentType(boolean isOverwrite, Node documentTypeNode) throws XPathExpressionException, GroupNotFoundException, XmlException, WorkflowException, SAXException, IOException, ParserConfigurationException {
    DocumentType documentType = getDocumentType(isOverwrite, documentTypeNode);
    /*
     * The following code does not need to apply the isOverwrite mode logic because it already checks to see if each node
     * is available on the ingested XML. If the node is ingested then it doesn't matter if we're in overwrite mode or not
     * the ingested code should save.
     */
    NodeList policiesList = (NodeList) getXPath().evaluate("./" + POLICIES, documentTypeNode, XPathConstants.NODESET);
    if (policiesList.getLength() > 1) {
        // more than one <policies> tag is invalid
        throw new XmlException("More than one " + POLICIES + " node is present in a document type node");
    }
    else if (policiesList.getLength() > 0) {
        // if there is exactly one <policies> tag then parse it and use the values
        NodeList policyNodes = (NodeList) getXPath().evaluate("./" + POLICY, policiesList.item(0), XPathConstants.NODESET);
        documentType.setDocumentTypePolicies(getDocumentTypePolicies(policyNodes, documentType));
    }

    NodeList attributeList = (NodeList) getXPath().evaluate("./attributes", documentTypeNode, XPathConstants.NODESET);
    if (attributeList.getLength() > 1) {
        throw new XmlException("More than one attributes node is present in a document type node");
    }
    else if (attributeList.getLength() > 0) {
        NodeList attributeNodes = (NodeList) getXPath().evaluate("./attribute", attributeList.item(0), XPathConstants.NODESET);
        documentType.setDocumentTypeAttributes(getDocumentTypeAttributes(attributeNodes, documentType));
    }

    NodeList securityList = (NodeList) getXPath().evaluate("./" + SECURITY, documentTypeNode, XPathConstants.NODESET);
    if (securityList.getLength() > 1) {
        throw new XmlException("More than one " + SECURITY + " node is present in a document type node");
    }
    else if (securityList.getLength() > 0) {
       try {
         Node securityNode = securityList.item(0);
         String securityText = XmlJotter.jotNode(securityNode);
         documentType.setDocumentTypeSecurityXml(securityText);
       }
       catch (Exception e) {
         throw new XmlException(e);
       }
    }
    parseStructure(isOverwrite, documentTypeNode, documentType, new RoutePathContext());
    return documentType;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:45,代码来源:DocumentTypeXmlParser.java

示例11: retrieveValidKimGroupUsingGroupNameAndNamespace

import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
private Group retrieveValidKimGroupUsingGroupNameAndNamespace(String groupName, String groupNamespace) throws GroupNotFoundException {
	// allow core config parameter replacement in documenttype workgroups
	groupName = Utilities.substituteConfigParameters(groupName).trim();
	groupNamespace = Utilities.substituteConfigParameters(groupNamespace).trim();
	return retrieveValidKimGroupUsingProcessedGroupNameAndNamespace(groupName, groupNamespace);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:DocumentTypeXmlParser.java

示例12: testLoadDocWithBadExceptionWG

import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
@Test public void testLoadDocWithBadExceptionWG() throws Exception {
    testDoc("BadExceptionWorkgroup", false, GroupNotFoundException.class);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:DocumentTypeXmlParserTest.java

示例13: testLoadDocWithBadSuperUserWG

import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
@Test public void testLoadDocWithBadSuperUserWG() throws Exception {
    testDoc("BadSuperUserWorkgroup", false, GroupNotFoundException.class);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:DocumentTypeXmlParserTest.java

示例14: testLoadDocWithBadBlanketApproveWG

import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
@Test public void testLoadDocWithBadBlanketApproveWG() throws Exception {
    testDoc("BadBlanketApproveWorkgroup", false, GroupNotFoundException.class);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:DocumentTypeXmlParserTest.java


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