/** * Get the permission methods * * @return the permission methods */ public Iterator<MethodMetaData> getPermissionMethods() { MethodPermissionsMetaData methodPermissions = getDelegate().getMethodPermissions(); return new PermissionMethodMetaDataIterator(methodPermissions); }
/** * Get the permission methods * * @return the permission methods */ public Iterator<MethodMetaData> getPermissionMethods() { MethodPermissionsMetaData methodPermissions = getDelegate().getMethodPermissions(); return new PermissionMethodMetaDataIterator(methodPermissions); }
/** * A somewhat tedious method that builds a Set<Principal> of the roles * that have been assigned permission to execute the indicated method. The * work performed is tedious because of the wildcard style of declaring * method permission allowed in the ejb-jar.xml descriptor. This method is * called by the Container.getMethodPermissions() when it fails to find the * prebuilt set of method roles in its cache. * * @param methodName the method name * @param params the parameters * @param iface the interface * @return The Set<String> for the application domain roles that * caller principal's are to be validated against. */ public Set<String> getMethodPermissions(String methodName, Class[] params, InvocationType iface) { return getDelegate().getMethodPermissions(methodName, params, invocationTypeToMethodInterfaceType(iface)); }
/** * A somewhat tedious method that builds a Set<Principal> of the roles * that have been assigned permission to execute the indicated method. The * work performed is tedious because of the wildcard style of declaring * method permission allowed in the ejb-jar.xml descriptor. This method is * called by the Container.getMethodPermissions() when it fails to find the * prebuilt set of method roles in its cache. * * @param methodName the method name * @param params the parameters * @param iface the interface * @return The Set<String> for the application domain roles that * caller principal's are to be validated against. */ public Set<String> getMethodPermissions(String methodName, Class[] params, InvocationType iface) { return getDelegate().getMethodPermissions(methodName, params, invocationTypeToMethodInterfaceType(iface)); }
/** * Check to see if there was a method-permission or exclude-list statement * for the given method. * * @param methodName - the method name * @param params - the method parameter signature * @param interfaceType - the method interface type * @return true if a matching method permission exists, false if no match */ public boolean hasMethodPermissions(String methodName, Class<?>[] params, MethodInterfaceType interfaceType) { // First check the excluded method list as this takes priority over // all other assignments ExcludeListMetaData excluded = getExcludeList(); if (excluded != null && excluded.matches(methodName, params, interfaceType)) return true; // Check the permissioned methods list MethodPermissionsMetaData permissions = getMethodPermissions(); if (permissions != null) { for (MethodPermissionMetaData permission : permissions) { if (permission.matches(methodName, params, interfaceType)) return true; } } // No match return false; }
MethodPermissionsMetaData permissions = getMethodPermissions(); if (permissions != null)
/** * Check to see if there was a method-permission or exclude-list statement * for the given method. * * @param methodName - the method name * @param params - the method parameter signature * @param interfaceType - the method interface type * @return true if a matching method permission exists, false if no match */ public boolean hasMethodPermissions(String methodName, Class<?>[] params, MethodInterfaceType interfaceType) { // First check the excluded method list as this takes priority over // all other assignments ExcludeListMetaData excluded = getExcludeList(); if (excluded != null && excluded.matches(methodName, params, interfaceType)) return true; // Check the permissioned methods list MethodPermissionsMetaData permissions = getMethodPermissions(); if (permissions != null) { for (MethodPermissionMetaData permission : permissions) { if (permission.matches(methodName, params, interfaceType)) return true; } } // No match return false; }
MethodPermissionsMetaData permissions = getMethodPermissions(); if (permissions != null)
MethodPermissionsMetaData perms = bean.getMethodPermissions(); if (perms != null) for (MethodPermissionMetaData perm : perms)