/** * Returns the resource name, if any was set when the access check was created. * @return */ public String resourceName() { if (resource != null) { return Util.resourceNameFromConfigBeanProxy(resource); } if (parent != null) { if (childName == null) { return Util.resourceNameFromConfigBeanType(parent, null, childType); } else { return Util.resourceNameFromConfigBeanTypeAndName(parent, childType, childName); } } return resourceName; }
/** * Returns the resource name, if any was set when the access check was created. * @return */ public String resourceName() { if (resource != null) { return Util.resourceNameFromConfigBeanProxy(resource); } if (parent != null) { if (childName == null) { return Util.resourceNameFromConfigBeanType(parent, null, childType); } else { return Util.resourceNameFromConfigBeanTypeAndName(parent, childType, childName); } } return resourceName; }
/** * Creates a new {@code AccessCheck} (typically for an existing target child) * @param parent the parent of the config bean to be accessed * @param childType the type of the child config bean * @param childName the name of the child config bean * @param action the action on the resource */ public AccessCheck(final ConfigBeanProxy parent, final Class<? extends ConfigBeanProxy> childType, final String childName, final String action) { this(Util.resourceNameFromConfigBeanTypeAndName(parent, childType, childName), action); }
/** * Creates a new {@code AccessCheck} (typically for an existing target child) * @param parent the parent of the config bean to be accessed * @param childType the type of the child config bean * @param childName the name of the child config bean * @param action the action on the resource */ public AccessCheck(final ConfigBeanProxy parent, final Class<? extends ConfigBeanProxy> childType, final String childName, final String action) { this(Util.resourceNameFromConfigBeanTypeAndName(parent, childType, childName), action); }