/*
(non-Javadoc)
@see
org.fcrepo.server.security.xacml.pdp.data.PolicyDataManager#getPolicy
(java.lang.String)
484943
@Override
    public byte[] getPolicy(String name) throws PolicyStoreException {
        String pid = getPID(name);
        if (!contains(name)) {
            throw new PolicyStoreException("Get: policy " + pid
                                                 + " does not exist.");
        }

        try {
            InputStream is =
                apiAService.getDatastreamDissemination(getContext(),
                                                       pid,
                                                       FESL_POLICY_DATASTREAM,
                                                       null).getStream();
            return IOUtils.toByteArray(is);
        } catch (Exception e) {
            throw new PolicyStoreException("Get: error reading policy "
                                                 + pid + " - " + e.getMessage(), e);
        }

    }
309843
func (ps *PolicyStore) GetPolicy(ctx context.Context, name string, policyType PolicyType) (*Policy, error) {
	return ps.switchedGetPolicy(ctx, name, policyType, true)
}
432023
protected AnnotationTargetsImpl_PolicyData doGetPolicyData(ScanPolicy policy) {

        if (policy == ScanPolicy.SEED) {
            return seedData;

        } else if (policy == ScanPolicy.PARTIAL) {
            return partialData;

        } else if (policy == ScanPolicy.EXCLUDED) {
            return excludedData;

        } else if (policy == ScanPolicy.EXTERNAL) {
            return externalData;

        } else {
            throw new IllegalArgumentException("Policy [ " + policy + " ]");
        }
    }
350028
public static appfwpolicy[] get(nitro_service service) throws Exception{
		appfwpolicy obj = new appfwpolicy();
		appfwpolicy[] response = (appfwpolicy[])obj.get_resources(service);
		return response;
	}
860439
public java.util.List<Policy> getPolicies() {
        if (policies == null) {
            policies = new com.amazonaws.internal.SdkInternalList<Policy>();
        }
        return policies;
    }
11366
func (model Model) GetPolicy(sec string, ptype string) [][]string {
	return model[sec][ptype].Policy
}
224645
@SuppressWarnings("WeakerAccess")
  public RoutingPolicy getPolicy() {
    if (proto.hasMultiClusterRoutingUseAny()) {
      return MultiClusterRoutingPolicy.of();
    } else if (proto.hasSingleClusterRouting()) {
      return new SingleClusterRoutingPolicy(proto.getSingleClusterRouting());
    } else {
      // Should never happen because the constructor verifies that one must exist.
      throw new VerifyException();
    }
  }
1327227
private List<ParsedPolicy> getJavaPolicies() {
        List<ParsedPolicy> list = new ArrayList<ParsedPolicy>();

        int counter = 1;
        String policyUrl = null;
        while ((policyUrl = SecurityActions.getSecurityProperty("policy.url." + counter)) != null) {
            try {
                policyUrl = expandStringWithProperty(policyUrl);
            } catch (Exception ex) {
                System.err.println("Expanding filepath in policy policy.url." + counter + "=" + policyUrl
                        + " failed. Exception message: " + ex.getMessage());
                counter++;
                continue;
            }
            ParsedPolicy p = null;
            InputStreamReader reader = null;
            try {
                reader = new InputStreamReader(new URL(policyUrl).openStream(), "UTF-8");
                p = new Parser(debug).parse(reader);
                if (p != null) {
                    list.add(p);
                } else {
                    System.err.println("Parsed policy policy.url." + counter + "=" + policyUrl + " is null");
                }
            } catch (Exception ex) {
                System.err.println("Policy policy.url." + counter + "=" + policyUrl
                        + " wasn't successfully parsed. Exception message: " + ex.getMessage());
            } finally {
                if (reader != null) {
                    try {
                        reader.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            }
            counter++;
        }

        return list;
    }
663772
public static policymap[] get(nitro_service service, String mappolicyname[]) throws Exception{
		if (mappolicyname !=null && mappolicyname.length>0) {
			policymap response[] = new policymap[mappolicyname.length];
			policymap obj[] = new policymap[mappolicyname.length];
			for (int i=0;i<mappolicyname.length;i++) {
				obj[i] = new policymap();
				obj[i].set_mappolicyname(mappolicyname[i]);
				response[i] = (policymap) obj[i].get_resource(service);
			}
			return response;
		}
		return null;
	}
819546
public com.google.api.ads.admanager.axis.v201902.CreativePolicyViolation[] getPolicyViolations() {
        return policyViolations;
    }
1157433
def getPolicyValue(self):
        """"""
        self._cur.execute("SELECT action FROM policy")
        r = self._cur.fetchall()
        policy = [x[0] for x in r]
        self._cur.execute("SELECT value FROM V")
        r = self._cur.fetchall()
        value = [x[0] for x in r]
        return policy, value
1345328
public GetIdentityPoliciesResult withPolicies(java.util.Map<String, String> policies) {
        setPolicies(policies);
        return this;
    }
377964
func (e *SyncedEnforcer) GetPolicy() [][]string {
	e.m.RLock()
	defer e.m.RUnlock()
	return e.Enforcer.GetPolicy()
}
327104
public com.google.api.ads.adwords.axis.v201809.cm.PolicyTopicEntryType getPolicyTopicEntryType() {
        return policyTopicEntryType;
    }
1036014
public java.util.List<String> getPolicyNames() {
        if (policyNames == null) {
            policyNames = new com.ibm.cloud.objectstorage.internal.SdkInternalList<String>();
        }
        return policyNames;
    }
394658
public static responderpolicy get(nitro_service service, String name) throws Exception{
		responderpolicy obj = new responderpolicy();
		obj.set_name(name);
		responderpolicy response = (responderpolicy) obj.get_resource(service);
		return response;
	}
254716
public static pqpolicy get(nitro_service service, String policyname) throws Exception{
		pqpolicy obj = new pqpolicy();
		obj.set_policyname(policyname);
		pqpolicy response = (pqpolicy) obj.get_resource(service);
		return response;
	}