Package org.fcrepo.server.security.xacml

Examples of org.fcrepo.server.security.xacml.MelcoeXacmlException


        } catch (ServerException e) {
            if (e instanceof ObjectNotInLowlevelStorageException) {
                // querying a subject that doesn't exist
                return new HashMap<String, Set<String>>();
            } else {
                throw new MelcoeXacmlException(e.getMessage(), e);
            }
        }

        Map<String, Set<String>> relationships =
                new HashMap<String, Set<String>>();
View Full Code Here


                    ReadOnlyContext.getContext(null,
                                               null,
                                               null,
                                               ReadOnlyContext.DO_OP);
        } catch (Exception e) {
            throw new MelcoeXacmlException(e.getMessage(), e);
        }
        return fedoraCtx;
    }
View Full Code Here

        super(options);

        try {
            RI = (ResourceIndex) server.getModule("org.fcrepo.server.resourceIndex.ResourceIndex");
        } catch (Exception e) {
            throw new MelcoeXacmlException("Error getting resource index.", e);
        }
        if (RI == null) {
            throw new MelcoeXacmlException("No Resource Index Module is available to the Server.");
        }

    }
View Full Code Here

            } else {
                p = null;
            }

        } catch (TrippiException e) {
            throw new MelcoeXacmlException("Error creating nodes for trippi query " + e.getMessage(), e);
        }

        try {
            TripleIterator it = RI.findTriples(s, p, null, 0);
            while (it.hasNext()) {
                Triple t = it.next();
                String pred = t.getPredicate().toString();

                Set<String> values = rels.get(pred);
                if (values == null) {
                    values = new HashSet<String>();
                }
                values.add(t.getObject().stringValue());
                rels.put(pred, values);
            }

        } catch (TrippiException e) {
            throw new MelcoeXacmlException("Error finding relationships " + e.getMessage(), e);
        }

        return rels;

    }
View Full Code Here

            } else {
                p = null;
            }

        } catch (TrippiException e) {
            throw new MelcoeXacmlException("Error creating nodes for trippi query " + e.getMessage(), e);
        }

        try {
            TripleIterator it = RI.findTriples(null, p, o, 0);
            while (it.hasNext()) {
                Triple t = it.next();
                String pred = t.getPredicate().toString();

                Set<String> values = rels.get(pred);
                if (values == null) {
                    values = new HashSet<String>();
                }
                values.add(t.getSubject().stringValue());
                rels.put(pred, values);
            }

        } catch (TrippiException e) {
            throw new MelcoeXacmlException("Error finding relationships " + e.getMessage(), e);
        }

        return rels;

    }
View Full Code Here

                res.put(XACML_RESOURCE_ID, new AnyURIAttribute(new URI(pid)));
            }
        } catch (Exception e) {
            logger.error("Error finding parents.", e);
            throw new MelcoeXacmlException("Error finding parents.", e);
        }

        for (URI uri : res.keySet()) {
            attributes.add(new Attribute(uri, null, null, res.get(uri)));
        }
View Full Code Here

                                   setupResources(resources, relationshipResolver),
                                   setupAction(actions),
                                   setupEnvironment(environment));
        } catch (Exception e) {
            logger.error("Error creating request.", e);
            throw new MelcoeXacmlException("Error creating request", e);
        }

        return request;
    }
View Full Code Here

                    response.replaceAll("ResourceID", "ResourceId");
            ByteArrayInputStream is =
                    new ByteArrayInputStream(newResponse.getBytes());
            resCtx = ResponseCtx.getInstance(is);
        } catch (ParsingException pe) {
            throw new MelcoeXacmlException("Error parsing response.", pe);
        }
        return resCtx;
    }
View Full Code Here

        try {
            ByteArrayInputStream is =
                    new ByteArrayInputStream(request.getBytes());
            reqCtx = RequestCtx.getInstance(is);
        } catch (ParsingException pe) {
            throw new MelcoeXacmlException("Error parsing response.", pe);
        }
        return reqCtx;
    }
View Full Code Here

                                               relationship);
            // Anticipating searches which fail because the object identified by
            // pid may not exist in the Fedora repository, since objects can
            // declare parent relationships to objects that do not exist
        } catch (ServerException e) {
            throw new MelcoeXacmlException(e.getMessage(), e);
        }

        Map<String, Set<String>> relationships =
                new HashMap<String, Set<String>>();
        for (RelationshipTuple t : tuples) {
View Full Code Here

TOP

Related Classes of org.fcrepo.server.security.xacml.MelcoeXacmlException

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.