Package org.apache.stanbol.cmsadapter.servicesapi.repository

Examples of org.apache.stanbol.cmsadapter.servicesapi.repository.RepositoryAccessException


            session = getSessionByRMI(connectionInfo);
            if (session == null) {
                session = getSessionByURL(connectionInfo);
            }
            if (session == null) {
                throw new RepositoryAccessException("Failed to get JCR Session");
            }
        } finally {
            Thread.currentThread().setContextClassLoader(cl);
        }
View Full Code Here


            Query query = qm.createQuery(queryRep.getQueryString(), queryRep.getQueryType());
            QueryResult queryResult = query.execute();
            return queryResult;

        } catch (InvalidQueryException e1) {
            throw new RepositoryAccessException("Invalid Query", e1);
        } catch (RepositoryException e) {
            throw new RepositoryAccessException("Error at query execution", e);
        }
    }
View Full Code Here

                }
                max--;
            }

        } catch (RepositoryException e) {
            throw new RepositoryAccessException("Error accesing result nodes", e);
        }
    }
View Full Code Here

        try {
            Node jcrNode = ((Session) session).getNodeByIdentifier(node.getUniqueRef());
            JCRModelMapper.fillCMSObjectChildren(node, jcrNode);
            return node.getChildren();
        } catch (RepositoryException e) {
            throw new RepositoryAccessException(e.getMessage(), e);
        }
    }
View Full Code Here

    public ObjectTypeDefinition getObjectTypeDefinition(String typeRef, Object session) throws RepositoryAccessException {
        try {
            NodeType nodeType = ((Session) session).getWorkspace().getNodeTypeManager().getNodeType(typeRef);
            return JCRModelMapper.getObjectTypeDefinition(nodeType);
        } catch (RepositoryException e) {
            throw new RepositoryAccessException(e.getMessage(), e);
        }

    }
View Full Code Here

        try {
            Node jcrNode = ((Session) session).getNodeByIdentifier(node.getUniqueRef());
            JCRModelMapper.fillProperties(node, jcrNode);
            return node.getProperty();
        } catch (RepositoryException e) {
            throw new RepositoryAccessException(e.getMessage(), e);
        }

    }
View Full Code Here

            NodeType nodeType = ((Session) session).getWorkspace().getNodeTypeManager()
                    .getNodeType(instance.getUniqueRef());
            JCRModelMapper.fillPropertyDefinitions(instance, nodeType);
            return instance.getPropertyDefinition();
        } catch (RepositoryException e) {
            throw new RepositoryAccessException(e.getMessage(), e);
        }
    }
View Full Code Here

                parentsResolved.add(JCRModelMapper.getObjectTypeDefinition(nodeType));
            }

            return parentsResolved;
        } catch (RepositoryException e) {
            throw new RepositoryAccessException(e.getMessage(), e);
        }
    }
View Full Code Here

                    .getNodeType(instance.getUniqueRef());

            JCRModelMapper.fillChildObjectDefinitions(instance, nodeType);
            return instance.getObjectTypeDefinition();
        } catch (RepositoryException e) {
            throw new RepositoryAccessException(e.getMessage(), e);
        }

    }
View Full Code Here

    public CMSObject getContainerObject(Property instance, Object session) throws RepositoryAccessException {
        try {
            Node jcrNode = ((Session) session).getNodeByIdentifier(instance.getContainerObjectRef());
            return JCRModelMapper.getCMSObject(jcrNode);
        } catch (RepositoryException e) {
            throw new RepositoryAccessException(e.getMessage(), e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.cmsadapter.servicesapi.repository.RepositoryAccessException

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.