Last change
on this file since 507 was 507, checked in by George Lilly, 15 years ago |
NHIN gateway and adaptor for use on linux with VistA EHR and RPMS
|
File size:
883 bytes
|
Rev | Line | |
---|
[507] | 1 | /*
|
---|
| 2 | * To change this template, choose Tools | Templates
|
---|
| 3 | * and open the template in the editor.
|
---|
| 4 | */
|
---|
| 5 | package gov.hhs.fha.nhinc.gateway.policyenginetransformation.Helpers;
|
---|
| 6 |
|
---|
| 7 | import oasis.names.tc.xacml._2_0.context.schema.os.ActionType;
|
---|
| 8 |
|
---|
| 9 | /**
|
---|
| 10 | *
|
---|
| 11 | * @author rayj
|
---|
| 12 | */
|
---|
| 13 | public class ActionHelper {
|
---|
| 14 |
|
---|
| 15 | private static final String ActionAttributeId = "urn:oasis:names:tc:xacml:1.0:action:action-id";
|
---|
| 16 |
|
---|
| 17 | public static ActionType actionFactory(String actionValue) {
|
---|
| 18 | ActionType action = new ActionType();
|
---|
| 19 | return actionFactory(action, actionValue);
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | public static ActionType actionFactory(ActionType action, String actionValue) {
|
---|
| 23 | if (action == null) {
|
---|
| 24 | action = new ActionType();
|
---|
| 25 | }
|
---|
| 26 | action.getAttribute().add(AttributeHelper.attributeFactory(ActionAttributeId, Constants.DataTypeString, actionValue));
|
---|
| 27 | return action;
|
---|
| 28 | }
|
---|
| 29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.