Examples of WonderlandServerIdentity


Examples of org.jdesktop.wonderland.server.auth.WonderlandServerIdentity

            // what should we do here?  Grant access?  Deny access?
            logger.log(Level.SEVERE, "Cannot apply security for user " + curId);
            task.run(request);
            return;
        }
        WonderlandServerIdentity id = (WonderlandServerIdentity) curId;

        // create the response object, which will be populated below with
        // any actions that are granted
        ResourceMap grant = new ResourceMap();

        // create a set of actions to schedule in a separate transaction
        ResourceMap schedule = new ResourceMap();

        // loop through each action set in the request, and generate
        // an appropriate response
        for (ActionMap set : request.values()) {
            // get the resource this set pertains to
            Resource resource = set.getResource();

            // create a response set that we will append the granted
            // permissions to
            ActionMap grantSet = new ActionMap(resource);
            grant.put(resource.getId(), grantSet);

            // create a set of requests to schedule.  We do not add the
            // set immediately -- it will be added at the end if it
            // is not empty
            ActionMap scheduleSet = new ActionMap(resource);

            // go through each action, and decider whether to grant or deny
            // access, or if necessary, schedule for later
            for (Action action : set.values()) {
                // query the resource about this permission, and handle the
                // result
                switch (resource.request(id.getIdentity(), action)) {
                    case GRANT:
                        // access is granted, add to the response list
                        grantSet.put(action.getName(), action);
                        break;
                    case DENY:
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.