Package de.danet.an.workflow.jetspeedrms

Examples of de.danet.an.workflow.jetspeedrms.Resource


    public WfResource asResource (Principal principal)
  throws ResourceNotFoundException, RemoteException {
        String name = principal.getName();
        try {
            User user = UserUtil.findByPrimaryKey(name);
            return new Resource(ras, "U:" + name, userToName(user));
        } catch (PortalException e) {
            throw new ResourceNotFoundException
                ("No user with name \"" + name + "\"");
        } catch (SystemException e) {
            throw new ResourceNotFoundException
View Full Code Here


  throws ResourceNotFoundException, RemoteException {
        if (key.startsWith("U:")) {
            String name = key.substring(2);
            try {
                User user = UserUtil.findByPrimaryKey(name);
                return new Resource(ras, key, userToName(user));
            } catch (PortalException e) {
                // fall through to "not found"
            } catch (SystemException e) {
                // fall through to "not found"
            }
        } else if (key.startsWith("G:")) {
            String name = key.substring(2);
            try {
                GroupUtil.findByPrimaryKey(name);
                return new Resource(ras, key, name);
            } catch (PortalException e) {
            } catch (SystemException e) {
            }
        } else if (key.startsWith("R:")) {
            String name = key.substring(2);
            try {
                RoleUtil.findByPrimaryKey(name);
                return new Resource(ras, key, name);
            } catch (PortalException e) {
            } catch (SystemException e) {
            }
        } else {
            throw new IllegalArgumentException
View Full Code Here

        String crit = (String)resSel;
        if (crit.startsWith("U:")) {
            String name = crit.substring(2);
            try {
                User user = UserUtil.findByPrimaryKey(name);
                res.add(new Resource(ras, crit, userToName(user)));
            } catch (PortalException e) {
                // fall through to "not found"
            } catch (SystemException e) {
                // fall through to "not found"
            }
        } else if (crit.startsWith("G:")) {
            String name = crit.substring(2);
            try {
                GroupUtil.findByPrimaryKey(name);
                res.add(new Resource(ras, crit, name));
            } catch (PortalException e) {
            } catch (SystemException e) {
            }
        } else if (crit.startsWith("R:")) {
            String name = crit.substring(2);
            try {
                RoleUtil.findByPrimaryKey(name);
                res.add(new Resource(ras, crit, name));
            } catch (PortalException e) {
            } catch (SystemException e) {
            }
        }
  return res;
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.jetspeedrms.Resource

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.