本文整理汇总了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);
}
示例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());
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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());
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例12: testLoadDocWithBadExceptionWG
import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
@Test public void testLoadDocWithBadExceptionWG() throws Exception {
testDoc("BadExceptionWorkgroup", false, GroupNotFoundException.class);
}
示例13: testLoadDocWithBadSuperUserWG
import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
@Test public void testLoadDocWithBadSuperUserWG() throws Exception {
testDoc("BadSuperUserWorkgroup", false, GroupNotFoundException.class);
}
示例14: testLoadDocWithBadBlanketApproveWG
import org.kuali.rice.krad.exception.GroupNotFoundException; //导入依赖的package包/类
@Test public void testLoadDocWithBadBlanketApproveWG() throws Exception {
testDoc("BadBlanketApproveWorkgroup", false, GroupNotFoundException.class);
}