Package de.danet.an.workflow.spis.rms

Examples of de.danet.an.workflow.spis.rms.DefaultUserResource


  throws ResourceNotFoundException, RemoteException {
        RmsConnection con = null;
        try {
            con = conFac.getConnection();
            RmsEntry e = con.lookupUserByAccountName (principal.getName());
            return new DefaultUserResource(rasCtx, e.getKey(), e.getDisplayName());
        } catch (ResourceException e) {
            maybeMapToRemoteException (e);
            throw new ResourceNotFoundException("Not found: " + e.getMessage());
        } catch (NameNotFoundException e) {
            throw new ResourceNotFoundException
View Full Code Here


        RmsConnection con = null;
        try {
            con = conFac.getConnection();
            if (DefaultUserResource.isValidKey(key)) {
                RmsEntry e = con.lookupResource(DefaultUserResource.getId(key));
                return new DefaultUserResource(rasCtx, e.getKey(), e.getDisplayName());
            } else if (DefaultRoleResource.isValidKey(key)) {
                RmsEntry e = con.lookupResource(DefaultRoleResource.getId(key));
                return new DefaultRoleResource(rasCtx, e.getKey(), e.getDisplayName());
            } else if (DefaultGroupResource.isValidKey(key)) {
                RmsEntry e
View Full Code Here

     * @param res
     * @param e
     */
    private void addAsTyped(Collection res, RmsEntry e) {
        if (e.getType() == RmsEntry.RESOURCE_TYPE_USER) {
            res.add(new DefaultUserResource
                    (rasCtx, e.getKey(), e.getDisplayName()));
        } else if (e.getType() == RmsEntry.RESOURCE_TYPE_ROLE) {
            res.add(new DefaultRoleResource
                    (rasCtx, e.getKey(), e.getDisplayName()));
        } else if (e.getType() == RmsEntry.RESOURCE_TYPE_GROUP) {
View Full Code Here

            rs = ps.executeQuery();
            if (!rs.next()) {
                throw new ResourceNotFoundException
                    ("No such user: " + principal.getName());
            }
            return new DefaultUserResource
                (rasCtx, rs.getString(1), rs.getString(2));
        } catch (SQLException e) {
            throw new RemoteException (e.getMessage(), e);
        } finally {
            try {
View Full Code Here

                rs = ps.executeQuery();
                if (!rs.next()) {
                    throw new ResourceNotFoundException
                        ("No user with id: " + resId);
                }
                return new DefaultUserResource (rasCtx, resId, rs.getString(1));
            } else if (DefaultGroupResource.isValidKey(key)) {
                String resId = DefaultGroupResource.getId(key);
                ps = con.prepareStatement(props.getProperty("groupNameQuery"));
                ps.setString(1, resId);
                rs = ps.executeQuery();
View Full Code Here

            ps = con.prepareStatement(props.getProperty(queryKey));
            rs = ps.executeQuery();
            while (rs.next()) {
                WfResource resource = null;
                if (queryKey.equals("allUsersQuery")) {
                    resource = new DefaultUserResource
                        (rasCtx, rs.getString(1), rs.getString(2));
                } else if (queryKey.equals("allGroupsQuery")) {
                    resource = new DefaultGroupResource
                        (rasCtx, rs.getString(1), rs.getString(2));
                } else {
View Full Code Here

            if (resType.equals("M")) {
                ps = con.prepareStatement(props.getProperty("userLookupQuery"));
                ps.setString(1, resAccount);
                rs = ps.executeQuery();
                if (rs.next()) {
                    res.add(new DefaultUserResource
                            (rasCtx, rs.getString(1), rs.getString(2)));
                }
            } else if (resType.equals("G")) {
                ps = con.prepareStatement
                    (props.getProperty("groupLookupQuery"));
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.spis.rms.DefaultUserResource

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.