class ZMSImpl implements Authorizer, KeyStore, ZMSHandler {

    boolean isConsistentPolicyName(final String domainName, final String policyName, Policy policy) {

        String resourceName = ZMSUtils.policyResourceName(domainName, policyName);

        // first lets assume we have the expected name specified in the policy

        if (resourceName.equals(policy.getName())) {
            return true;
        }

        // if not check to see if the policy contains the relative local name
        // part only instead of the expected resourceName and update accordingly

        if (policyName.equals(policy.getName())) {
            policy.setName(resourceName);
            return true;
        }

        // we have a mismatch

        return false;
    }

    public  ZMSImpl();

}