private void parseDataTypes(Node root, PolicyEditorDataHolder holder) throws PolicyEditorException { NodeList nodeList = root.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if ("dataType".equals(node.getNodeName())) { String name = null; String uri = null; NodeList childList = node.getChildNodes(); for (int j = 0; j < childList.getLength(); j++) { Node child = childList.item(j); if ("name".equals(child.getNodeName())) { name = child.getTextContent(); } else if ("uri".equals(child.getNodeName())) { uri = child.getTextContent(); } } if (name != null && uri != null) { if (!Utils.isValidDataType(uri)) { throw new PolicyEditorException("Invalid DataType : " + uri); } holder.getDataTypeMap().put(name, uri); } } if ("defaultDataTypes".equals(node.getNodeName())) { holder.setDefaultDataType(node.getTextContent()); } } }
if (!Utils.isValidFunction(uri)) { throw new PolicyEditorException("Invalid Function : " + uri);
private void parsePreFunctions(Node root, PolicyEditorDataHolder holder) throws PolicyEditorException { NodeList nodeList = root.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if ("preFunction".equals(node.getNodeName())) { String name = null; String uri = null; NodeList childList = node.getChildNodes(); for (int j = 0; j < childList.getLength(); j++) { Node child = childList.item(j); if ("name".equals(child.getNodeName())) { name = child.getTextContent(); } else if ("uri".equals(child.getNodeName())) { uri = child.getTextContent(); } } if (name != null && uri != null) { if (!Utils.isValidPreFunction(uri)) { throw new PolicyEditorException("Invalid PreFunction : " + uri); } holder.getPreFunctionMap().put(name, uri); } } } }
if (!Utils.isValidRuleAlgorithm(uri, isPolicy)) { throw new PolicyEditorException("Invalid Algorithm : " + uri);
if (EntitlementConstants.PolicyEditor.BASIC.equals(type) || (EntitlementConstants.PolicyEditor.RBAC.equals(type))) { if (!Utils.isValidCategory(name)) { throw new PolicyEditorException("Invalid Category : " + name + " Basic policy editor supports only for Subject, " +
if (child.getTextContent() != null) { String uri = child.getTextContent(); if (!Utils.isValidEffect(uri)) { throw new PolicyEditorException("Invalid Rule Effect : " + uri); if (!Utils.isValidEffect(uri)) { throw new PolicyEditorException("Invalid Rule Effect : " + uri); if (child.getTextContent() != null) { String uri = child.getTextContent(); if (!Utils.isValidEffect(uri)) { throw new PolicyEditorException("Invalid Rule Effect : " + uri);
if (!Utils.isValidRuleAlgorithm(uri, isPolicy)) { throw new PolicyEditorException("Invalid Algorithm : " + uri);
if (EntitlementConstants.PolicyEditor.BASIC.equals(type) || (EntitlementConstants.PolicyEditor.RBAC.equals(type))) { if (!Utils.isValidCategory(name)) { throw new PolicyEditorException("Invalid Category : " + name + " Basic policy editor supports only for Subject, " +
if (child.getTextContent() != null) { String uri = child.getTextContent(); if (!Utils.isValidEffect(uri)) { throw new PolicyEditorException("Invalid Rule Effect : " + uri); if (!Utils.isValidEffect(uri)) { throw new PolicyEditorException("Invalid Rule Effect : " + uri); if (child.getTextContent() != null) { String uri = child.getTextContent(); if (!Utils.isValidEffect(uri)) { throw new PolicyEditorException("Invalid Rule Effect : " + uri);
private void parsePreFunctions(Node root, PolicyEditorDataHolder holder) throws PolicyEditorException { NodeList nodeList = root.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if ("preFunction".equals(node.getNodeName())) { String name = null; String uri = null; NodeList childList = node.getChildNodes(); for (int j = 0; j < childList.getLength(); j++) { Node child = childList.item(j); if ("name".equals(child.getNodeName())) { name = child.getTextContent(); } else if ("uri".equals(child.getNodeName())) { uri = child.getTextContent(); } } if (name != null && uri != null) { if (!Utils.isValidPreFunction(uri)) { throw new PolicyEditorException("Invalid PreFunction : " + uri); } holder.getPreFunctionMap().put(name, uri); } } } }
private void parseDataTypes(Node root, PolicyEditorDataHolder holder) throws PolicyEditorException { NodeList nodeList = root.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if ("dataType".equals(node.getNodeName())) { String name = null; String uri = null; NodeList childList = node.getChildNodes(); for (int j = 0; j < childList.getLength(); j++) { Node child = childList.item(j); if ("name".equals(child.getNodeName())) { name = child.getTextContent(); } else if ("uri".equals(child.getNodeName())) { uri = child.getTextContent(); } } if (name != null && uri != null) { if (!Utils.isValidDataType(uri)) { throw new PolicyEditorException("Invalid DataType : " + uri); } holder.getDataTypeMap().put(name, uri); } } if ("defaultDataTypes".equals(node.getNodeName())) { holder.setDefaultDataType(node.getTextContent()); } } }
if (!Utils.isValidFunction(uri)) { throw new PolicyEditorException("Invalid Function : " + uri);
if (!Utils.isValidRuleAlgorithm(uri, isPolicy)) { throw new PolicyEditorException("Invalid Algorithm : " + uri);
if (EntitlementConstants.PolicyEditor.BASIC.equals(type) || (EntitlementConstants.PolicyEditor.RBAC.equals(type))) { if (!Utils.isValidCategory(name)) { throw new PolicyEditorException("Invalid Category : " + name + " Basic policy editor supports only for Subject, " +
if (child.getTextContent() != null) { String uri = child.getTextContent(); if (!Utils.isValidEffect(uri)) { throw new PolicyEditorException("Invalid Rule Effect : " + uri); if (!Utils.isValidEffect(uri)) { throw new PolicyEditorException("Invalid Rule Effect : " + uri); if (child.getTextContent() != null) { String uri = child.getTextContent(); if (!Utils.isValidEffect(uri)) { throw new PolicyEditorException("Invalid Rule Effect : " + uri);
private void parsePreFunctions(Node root, PolicyEditorDataHolder holder) throws PolicyEditorException { NodeList nodeList = root.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if ("preFunction".equals(node.getNodeName())) { String name = null; String uri = null; NodeList childList = node.getChildNodes(); for (int j = 0; j < childList.getLength(); j++) { Node child = childList.item(j); if ("name".equals(child.getNodeName())) { name = child.getTextContent(); } else if ("uri".equals(child.getNodeName())) { uri = child.getTextContent(); } } if (name != null && uri != null) { if (!Utils.isValidPreFunction(uri)) { throw new PolicyEditorException("Invalid PreFunction : " + uri); } holder.getPreFunctionMap().put(name, uri); } } } }
private void parseDataTypes(Node root, PolicyEditorDataHolder holder) throws PolicyEditorException { NodeList nodeList = root.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if ("dataType".equals(node.getNodeName())) { String name = null; String uri = null; NodeList childList = node.getChildNodes(); for (int j = 0; j < childList.getLength(); j++) { Node child = childList.item(j); if ("name".equals(child.getNodeName())) { name = child.getTextContent(); } else if ("uri".equals(child.getNodeName())) { uri = child.getTextContent(); } } if (name != null && uri != null) { if (!Utils.isValidDataType(uri)) { throw new PolicyEditorException("Invalid DataType : " + uri); } holder.getDataTypeMap().put(name, uri); } } if ("defaultDataTypes".equals(node.getNodeName())) { holder.setDefaultDataType(node.getTextContent()); } } }
if (!Utils.isValidFunction(uri)) { throw new PolicyEditorException("Invalid Function : " + uri);