Examples of AccessCheck


Examples of org.glassfish.api.admin.AccessRequired.AccessCheck

        parentBean = habitat.getService((Class<? extends ConfigBeanProxy>) parentType);
        name = "";
        if (resolver instanceof TypeAndNameResolver) {
            name = ((TypeAndNameResolver) resolver).name();
        }
        checks.add(new AccessCheck(parentBean, targetType, name, "delete"));
        return checks;
    }
View Full Code Here

Examples of org.glassfish.api.admin.AccessRequired.AccessCheck

    }

    @Override
    public Collection<? extends AccessCheck> getAccessChecks() {
        final Collection<AccessCheck> checks = new ArrayList<AccessCheck>();
        checks.add(new AccessCheck(AccessRequired.Util.resourceNameFromConfigBeanProxy(parentBean), "read"));
        if (longOpt) {
            try {
                List<ConfigBeanProxy> children = (List<ConfigBeanProxy>) targetMethod.invoke(parentBean);
                for (ConfigBeanProxy child : children) {
                    if (name == null || name.equals(Dom.unwrap(child).getKey())) {
                        checks.add(new AccessCheck(AccessRequired.Util.resourceNameFromConfigBeanProxy(child), "read"));
                    }
                }
            } catch (Exception ex) {
                String msg = localStrings.getLocalString(GenericCrudCommand.class,
                    "GenericListCommand.accesschecks",
View Full Code Here

Examples of org.glassfish.api.admin.AccessRequired.AccessCheck

    }

    @Override
    public Collection<? extends AccessCheck> getAccessChecks() {
        final Collection<AccessCheck> checks = new ArrayList<AccessCheck>();
        checks.add(new AccessCheck(parentBean, (Class<? extends ConfigBeanProxy>) targetType, "create"));
        return checks;
    }
View Full Code Here

Examples of org.glassfish.api.admin.AccessRequired.AccessCheck

    public Collection<? extends AccessCheck> getAccessChecksForGet() {
        final Collection<AccessCheck> accessChecks = new ArrayList<AccessCheck>();
        for (Object obj : nodeTreeToProcess.keySet()) {
            final String name = obj.toString().replace('.', '/');
            accessChecks.add(new AccessCheck(name, "read"));
        }
        return accessChecks;
    }
View Full Code Here

Examples of org.glassfish.api.admin.AccessRequired.AccessCheck

             * include them here in building the access checks
             * because the user needs read access to the node
             * in order to find out that it does or does not have children.
             */
            String name = tn1.getCompletePathName().replace('.', '/');
            accessChecks.add(new AccessCheck(name, "read"));
        }
        return accessChecks;
    }
View Full Code Here

Examples of org.glassfish.api.admin.AccessRequired.AccessCheck

    @Override
    public Collection<? extends AccessCheck> getAccessChecks() {
        final Collection<AccessCheck> accessChecks = new ArrayList<AccessCheck>();
        for (SetOperation op : setOperations) {
            accessChecks.add(new AccessCheck(op.getResourceName(), "update"));
        }
        return accessChecks;
    }
View Full Code Here

Examples of org.glassfish.api.admin.AccessRequired.AccessCheck

    public Collection<? extends AccessCheck> getAccessChecksForGet() {
        final Collection<AccessCheck> accessChecks = new ArrayList<AccessCheck>();
        for (Object obj : nodeTreeToProcess.keySet()) {
            final String name = obj.toString().replace('.', '/');
            accessChecks.add(new AccessCheck(sanitizeResourceName(name), "read"));
        }
        return accessChecks;
    }
View Full Code Here

Examples of org.glassfish.api.admin.AccessRequired.AccessCheck

             * include them here in building the access checks
             * because the user needs read access to the node
             * in order to find out that it does or does not have children.
             */
            String name = tn1.getCompletePathName().replace('.', '/');
            accessChecks.add(new AccessCheck(sanitizeResourceName(name), "read"));
        }
        return accessChecks;
    }
View Full Code Here

Examples of org.glassfish.api.admin.AccessRequired.AccessCheck

   
    @Override
    public Collection<? extends AccessCheck> getAccessChecks() {
        final List<AccessCheck> accessChecks = new ArrayList<AccessCheck>();
        accessChecks.add(new AccessCheck(DeploymentCommandUtils.getResourceNameForApps(domain), "create"));
        accessChecks.add(new AccessCheck(DeploymentCommandUtils.getTargetResourceNameForNewAppRef(domain, target), "create"));
       
        /*
         * If this app is already deployed then this operation also represents
         * an undeployment - a delete - of that app. 
         */
        if (isredeploy) {
            final String appResource = DeploymentCommandUtils.getResourceNameForNewApp(domain, name);
            accessChecks.add(new AccessCheck(appResource, "delete"));
            final String appRefResource = DeploymentCommandUtils.getTargetResourceNameForNewAppRef(domain, target, name);
            accessChecks.add(new AccessCheck(appRefResource, "delete"));
        }
       
        return accessChecks;
    }
View Full Code Here

Examples of org.glassfish.api.admin.AccessRequired.AccessCheck

            final List<AccessCheckWork> accessChecks, final Class<?> currentClass, final boolean isTaggable)
            throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
        for (final String resource : ar.resource()) {
            final String translatedResource = processTokens(resource, command);
            for (final String action : ar.action()) {
                final AccessCheck a = new AccessCheck(translatedResource, action);
                String tag = null;
                if (isTaggable) {
                    tag = "  @AccessRequired on " + currentClass.getName() + LINE_SEP;
                }
                accessChecks.add(new AccessCheckWork(a, tag));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.