Package org.glassfish.api.admin.AccessRequired

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


        final List<AccessCheck> accessChecks = new ArrayList<AccessCheck>();
        for (String mv : matchedVersions) {
            if ( ! DeploymentUtils.isDomainTarget(target)) {
                final ApplicationRef ref = domain.getApplicationRefInTarget(mv, target);
                if (ref != null) {
                    accessChecks.add(new AccessCheck(AccessRequired.Util.resourceNameFromConfigBeanProxy(ref), "read"));
                }
            }
        }
        return accessChecks;
    }
View Full Code Here


    @Override
    public Collection<? extends AccessCheck> getAccessChecks() {
        final List<AccessCheck> accessChecks = new ArrayList<AccessCheck>();
        app = applications.getApplication(name);
        if (app != null) {
            accessChecks.add(new AccessCheck(AccessRequired.Util.resourceNameFromConfigBeanProxy(app), "read"));
            if (app.getAppTenants() != null) {
                appTenants = app.getAppTenants().getAppTenant();
                for (AppTenant appTenant : appTenants) {
                    accessChecks.add(new AccessCheck(AccessRequired.Util.resourceNameFromConfigBeanProxy(appTenant), "delete"));
                }
            }
        }
        return accessChecks;
    }
View Full Code Here

    @Override
    public Collection<? extends AccessCheck> getAccessChecks() {
        final List<AccessRequired.AccessCheck> accessChecks = new ArrayList<AccessRequired.AccessCheck>();
        for (String libName : names) {
            accessChecks.add(new AccessCheck(DeploymentCommandUtils.LIBRARY_SECURITY_RESOURCE_PREFIX + "/" + type + "/" + libName, "delete"));
        }
        return accessChecks;
    }
View Full Code Here

    @Override
    public Collection<? extends AccessCheck> getAccessChecks() {
        final List<AccessCheck> accessChecks = new ArrayList<AccessCheck>();
        app = applications.getApplication(appname);
        if (app != null) {
            accessChecks.add(new AccessCheck(AccessRequired.Util.resourceNameFromConfigBeanProxy(app), "read"));
            if (app.getAppTenants() != null) {
                appTenant = app.getAppTenants().getAppTenant(tenant);
                if (appTenant != null) {
                    accessChecks.add(new AccessCheck(AccessRequired.Util.resourceNameFromConfigBeanProxy(appTenant), "unprovision"));
                }
            }
        }
        return accessChecks;
    }
View Full Code Here

    private Domain domain;
   
    @Override
    public Collection<? extends AccessCheck> getAccessChecks() {
        final List<AccessCheck> accessChecks = new ArrayList<AccessCheck>();
        accessChecks.add(new AccessCheck(DeploymentCommandUtils.getTargetResourceNameForNewAppRef(domain, target), "write"));
        return accessChecks;
    }
View Full Code Here

        if (env.isDas() && DeploymentUtils.isDomainTarget(target)) {
            for (Map.Entry<String,Set<String>> entry : enabledVersionsInTargets.entrySet()) {
                for (String t : entry.getValue()) {
                    final String resourceForApp = DeploymentCommandUtils.getTargetResourceNameForExistingApp(domain, t, entry.getKey());
                    if (resourceForApp != null) {
                        accessChecks.add(new AccessCheck(resourceForApp, DISABLE_ACTION));
                    }
                }
            }
        } else if ( isVersionExpressionWithWildcard ){
            for (String appNm : matchedVersions) {
                final String resourceForApp = DeploymentCommandUtils.getTargetResourceNameForExistingAppRef(domain, target, appNm);
                accessChecks.add(new AccessCheck(resourceForApp, DISABLE_ACTION));
            }
        } else if (target == null) {
            final String resourceForApp = DeploymentCommandUtils.getTargetResourceNameForExistingAppRef(domain,
                        deployment.getDefaultTarget(appName, origin, _classicstyle), appName);
            if (resourceForApp != null) {
                accessChecks.add(new AccessCheck(resourceForApp, DISABLE_ACTION));
            }
        } else {
            final String resourceForApp = DeploymentCommandUtils.getTargetResourceNameForExistingAppRef(domain, target, appName);
            if (resourceForApp != null) {
                accessChecks.add(new AccessCheck(resourceForApp, DISABLE_ACTION));
            }
        }
        final String resourceForApp = DeploymentCommandUtils.getResourceNameForExistingApp(domain, appName);
        if (resourceForApp != null) {
            accessChecks.add(new AccessCheck(resourceForApp, DISABLE_ACTION));
        }
       
        return accessChecks;
    }
View Full Code Here

                Server server = domain.getServerNamed(target);
                if (server != null) {
                    servers.add(server);
                }
                for (Server svr : servers) {
                    accessChecks.add(new AccessCheck(DeploymentCommandUtils.getTargetResourceNameForExistingAppRef(domain, svr.getName(), appname), "read"));
                }
            }
        }
        return accessChecks;
    }
View Full Code Here

    @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

    Events events;
   
    @Override
    public Collection<? extends AccessCheck> getAccessChecks() {
        final List<AccessCheck> accessChecks = new ArrayList<AccessCheck>();
        accessChecks.add(new AccessCheck(DeploymentCommandUtils.getTargetResourceNameForNewAppRef(domain, target), "create"));
        return accessChecks;
    }
View Full Code Here

    }
   
    private Collection<? extends AccessCheck> getAccessChecksForNonMonitoring() {
        final Collection<AccessCheck> accessChecks = new ArrayList<AccessCheck>();
        for (Map.Entry entry : matchingNodesSorted) {
            accessChecks.add(new AccessCheck(AccessRequired.Util.resourceNameFromDom((Dom)entry.getKey()), "read"));
        }
        return accessChecks;
    }
View Full Code Here

TOP

Related Classes of org.glassfish.api.admin.AccessRequired.AccessCheck

Copyright © 2018 www.massapicom. 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.