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

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


            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
                ("No user \"" + principal.getName() + "\" found: "
                 + e.getMessage());
        } finally {
            closeConnection(con);
        }
View Full Code Here


                RmsEntry e = con.lookupResource (key);
                return new DefaultResource(rasCtx, e.getKey(), e.getDisplayName());
            }
        } catch (ResourceException e) {
            maybeMapToRemoteException (e);
            throw new ResourceNotFoundException("Not found: " + e.getMessage());
        } catch (NameNotFoundException e) {
            throw new ResourceNotFoundException
                ("No entry with key \"" + key + "\" found: " + e.getMessage());
        } finally {
            closeConnection(con);
        }
    }
View Full Code Here

        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
                ("No user with name \"" + name + "\"");
        }
    }
View Full Code Here

            }
        } else {
            throw new IllegalArgumentException
                ("Resource with invalid key " + key);
        }
        throw new ResourceNotFoundException
            ("Unknown resource: \"" + key + "\"");
    }
View Full Code Here

            con = ds().getConnection();
            ps = con.prepareStatement(props.getProperty("userLookupQuery"));
            ps.setString(1, principal.getName());
            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) {
View Full Code Here

                String resId = DefaultUserResource.getId(key);
                ps = con.prepareStatement(props.getProperty("userNameQuery"));
                ps.setString(1, resId);
                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();
                if (!rs.next()) {
                    throw new ResourceNotFoundException
                        ("No group with id: " + resId);
                }
                return new DefaultGroupResource (rasCtx, resId, rs.getString(1));
            } else if (DefaultRoleResource.isValidKey(key)) {
                String resId = DefaultRoleResource.getId(key);
                ps = con.prepareStatement(props.getProperty("roleNameQuery"));
                ps.setString(1, resId);
                rs = ps.executeQuery();
                if (!rs.next()) {
                    throw new ResourceNotFoundException
                        ("No role with id: " + resId);
                }
                return new DefaultRoleResource (rasCtx, resId, rs.getString(1));
            } else {
                throw new IllegalArgumentException
View Full Code Here

TOP

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

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.