public void persistConfig(String policyEditorType, String xmlConfig) throws PolicyEditorException { manager.persistConfig(policyEditorType, xmlConfig); dataHolder = manager.buildDataHolder(); }
public PolicyEditorEngine(int tenantId) { this.tenantId = tenantId; this.manager = new RegistryPersistenceManager(); try { this.dataHolder = this.manager.buildDataHolder(); } catch (PolicyEditorException e) { log.error("Error while building policy editor config", e); } }
public String getConfig(String policyEditorType) { Map<String, String> configs = manager.getConfig(); if (configs != null) { return configs.get(policyEditorType); } return null; } }
/** * Create XACML policy using the data received from basic policy wizard * * @param basicPolicyDTO BasicPolicyDTO * @return String object of the XACML policy * @throws PolicyEditorException throws */ public String createBasicPolicy(BasicPolicyDTO basicPolicyDTO) throws PolicyEditorException { if (basicPolicyDTO == null) { throw new PolicyEditorException("Policy object can not be null"); } try { return PolicyBuilder.getInstance().build(basicPolicyDTO); } catch (PolicyBuilderException e) { log.error(e); throw new PolicyEditorException("Error while building policy"); } }
@Override public Map<String, PolicyEditorDataHolder> buildDataHolder() throws PolicyEditorException { xmlConfig = this.getConfig(); Map<String, PolicyEditorDataHolder> holders = new HashMap<String, PolicyEditorDataHolder>(); for (String type : EntitlementConstants.PolicyEditor.EDITOR_TYPES) { PolicyEditorDataHolder holder = buildDataHolder(type, xmlConfig.get(type)); if (holder != null) { holders.put(type, holder); } } return holders; }
@Override public void persistConfig(String policyEditorType, String xmlConfig) throws PolicyEditorException { // to verify buildDataHolder(policyEditorType, xmlConfig); this.xmlConfig.put(policyEditorType, xmlConfig); }
/** * Create XACML policy using the data received from basic policy wizard * * @param basicPolicyDTO BasicPolicyDTO * @return String object of the XACML policy * @throws PolicyEditorException throws */ public String createBasicPolicy(BasicPolicyDTO basicPolicyDTO) throws PolicyEditorException { if (basicPolicyDTO == null) { throw new PolicyEditorException("Policy object can not be null"); } try { return PolicyBuilder.getInstance().build(basicPolicyDTO); } catch (PolicyBuilderException e) { log.error(e); throw new PolicyEditorException("Error while building policy"); } }
public PolicyEditorEngine(int tenantId) { this.tenantId = tenantId; this.manager = new RegistryPersistenceManager(); try { this.dataHolder = this.manager.buildDataHolder(); } catch (PolicyEditorException e) { log.error("Error while building policy editor config", e); } }
public void persistConfig(String policyEditorType, String xmlConfig) throws PolicyEditorException { manager.persistConfig(policyEditorType, xmlConfig); dataHolder = manager.buildDataHolder(); }
@Override public Map<String, PolicyEditorDataHolder> buildDataHolder() throws PolicyEditorException { xmlConfig = this.getConfig(); Map<String, PolicyEditorDataHolder> holders = new HashMap<String, PolicyEditorDataHolder>(); for (String type : EntitlementConstants.PolicyEditor.EDITOR_TYPES) { PolicyEditorDataHolder holder = buildDataHolder(type, xmlConfig.get(type)); if (holder != null) { holders.put(type, holder); } } return holders; }
public String getConfig(String policyEditorType) { Map<String, String> configs = manager.getConfig(); if (configs != null) { return configs.get(policyEditorType); } return null; } }
@Override public void persistConfig(String policyEditorType, String xmlConfig) throws PolicyEditorException { // to verify buildDataHolder(policyEditorType, xmlConfig); this.xmlConfig.put(policyEditorType, xmlConfig); }
/** * Create basic XACML request * * @param requestDTO request element * @return String object of the XACML request * @throws EntitlementPolicyCreationException throws */ public String createBasicRequest(RequestDTO requestDTO) throws EntitlementPolicyCreationException, PolicyEditorException { try { RequestElementDTO requestElementDTO = PolicyCreatorUtil.createRequestElementDTO(requestDTO); return PolicyBuilder.getInstance().buildRequest(requestElementDTO); } catch (PolicyBuilderException e) { throw new PolicyEditorException("Error while building XACML Request"); } } }
public PolicyEditorEngine(int tenantId) { this.tenantId = tenantId; this.manager = new RegistryPersistenceManager(); try { this.dataHolder = this.manager.buildDataHolder(); } catch (PolicyEditorException e) { log.error("Error while building policy editor config", e); } }
public void persistConfig(String policyEditorType, String xmlConfig) throws PolicyEditorException { manager.persistConfig(policyEditorType, xmlConfig); dataHolder = manager.buildDataHolder(); }
@Override public Map<String, PolicyEditorDataHolder> buildDataHolder() throws PolicyEditorException { xmlConfig = this.getConfig(); Map<String, PolicyEditorDataHolder> holders = new HashMap<String, PolicyEditorDataHolder>(); for (String type : EntitlementConstants.PolicyEditor.EDITOR_TYPES) { PolicyEditorDataHolder holder = buildDataHolder(type, xmlConfig.get(type)); if (holder != null) { holders.put(type, holder); } } return holders; }
public String getConfig(String policyEditorType) { Map<String, String> configs = manager.getConfig(); if (configs != null) { return configs.get(policyEditorType); } return null; } }
@Override public void persistConfig(String policyEditorType, String xmlConfig) throws PolicyEditorException { // to verify buildDataHolder(policyEditorType, xmlConfig); this.xmlConfig.put(policyEditorType, xmlConfig); }
/** * Create basic XACML request * * @param requestDTO request element * @return String object of the XACML request * @throws EntitlementPolicyCreationException throws */ public String createBasicRequest(RequestDTO requestDTO) throws EntitlementPolicyCreationException, PolicyEditorException { try { RequestElementDTO requestElementDTO = PolicyCreatorUtil.createRequestElementDTO(requestDTO); return PolicyBuilder.getInstance().buildRequest(requestElementDTO); } catch (PolicyBuilderException e) { throw new PolicyEditorException("Error while building XACML Request"); } } }
/** * Create basic XACML request * * @param requestDTO request element * @return String object of the XACML request * @throws EntitlementPolicyCreationException throws */ public String createBasicRequest(RequestDTO requestDTO) throws EntitlementPolicyCreationException, PolicyEditorException { try { RequestElementDTO requestElementDTO = PolicyCreatorUtil.createRequestElementDTO(requestDTO); return PolicyBuilder.getInstance().buildRequest(requestElementDTO); } catch (PolicyBuilderException e) { throw new PolicyEditorException("Error while building XACML Request"); } } }