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

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


            Session cmisSession = checkSession(session);
            CmisObject cmisObject = cmisSession.getObject(CMISObjectId.getObjectId(instance
                    .getContainerObjectRef()));
            return CMISModelMapper.getCMSObject(cmisObject);
        } catch (CmisBaseException e) {
            throw new RepositoryAccessException("Error at accessing repository", e);
        }
    }
View Full Code Here


                    // Problems may occur when comparing Properties localname vs definitions localname/id
                    return CMISModelMapper.getPropertyDefinition(definition);
                }
            }
        } catch (CmisBaseException e) {
            throw new RepositoryAccessException("Error at accessing repository", e);
        }
        return null;
    }
View Full Code Here

                    // TODO handle multiple parents
                    return CMISModelMapper.getCMSObject(parent);
                }
            }
        } catch (CmisBaseException e) {
            throw new RepositoryAccessException("Error at accessing repository", e);
        }
        return null;
    }
View Full Code Here

            if (node instanceof ObjectType) {
                ObjectType type = (ObjectType) node;
                CMISModelMapper.fillChildObjectTypeDefinitions(instance, type);
                return instance.getObjectTypeDefinition();
            } else {
                throw new RepositoryAccessException("No object type with id " + instance.getUniqueRef());
            }
        } catch (CmisBaseException e) {
            throw new RepositoryAccessException("Error at accessing repository", e);
        }
    }
View Full Code Here

        if (repositoryAccess == null) {
            log.warn(String
                    .format(
                        "There is no suitable RepositoryAccess instance in the environment. \n Repository URL: %s\n Workspace identifier: %s\n Username: %s\n Password: %s\n Connection type: %s",
                        repositoryURL, workspaceIdentifier, username, password, connectionType));
            throw new RepositoryAccessException(
                    "There is no suitable RepositoryAccess instance in the environment. Please refer to logs");
        }
        Object session = repositoryAccess.getSession(connectionInfo);
        return cacheSessionContext(new SessionContext(session, connectionInfo));
    }
View Full Code Here

                        .format(
                            "There is no suitable RepositoryAccess instance in the environment. \n Repository URL: %s\n Workspace identifier: %s\n Username: %s\n Password: %s\n Connection type: %s",
                            connectionInfo.getRepositoryURL(), connectionInfo.getWorkspaceName(),
                            connectionInfo.getUsername(), connectionInfo.getPassword(),
                            connectionInfo.getConnectionType()));
                throw new RepositoryAccessException(
                        "There is no suitable RepositoryAccess instance in the environment. Please refer to logs");
            }
        } else {
            log.warn("There is no cached session for the key: {}", sessionKey);
            throw new RepositoryAccessException(String.format("There is no cached session for the key: %s",
                sessionKey));
        }
    }
View Full Code Here

        SessionContext sessionContext = sessions.get(sessionKey);
        if (sessionContext != null) {
            return sessionContext.getConnectionInfo().getConnectionType();
        } else {
            log.warn("There is no cached session for the key: {}", sessionKey);
            throw new RepositoryAccessException(String.format("There is no cached session for the key: %s",
                sessionKey));
        }
    }
View Full Code Here

    }

    private List<CMSObject> getNodeById(String id) throws RepositoryAccessException {
        CMSObject cmsObject = cmsObjectMap.get(id);
        if (cmsObject == null) {
            throw new RepositoryAccessException("No object with id=" + id);
        } else {
            return Arrays.asList(new CMSObject[] {cmsObject});
        }
    }
View Full Code Here

    public ObjectTypeDefinition getObjectTypeDefinition(String typeRef, Object session) throws RepositoryAccessException {
        checkNullArgument(session);
        if (typeDefinitionMap.containsKey(typeRef)) {
            return typeDefinitionMap.get(typeRef);
        } else {
            throw new RepositoryAccessException("No object type definition with id " + typeRef);
        }
    }
View Full Code Here

    public CMSObject getContainerObject(Property instance, Object session) throws RepositoryAccessException {
        checkNullArgument(session);
        if (propertyMap.containsKey(instance)) {
            return propertyMap.get(instance);
        } else {
            throw new RepositoryAccessException("Container object for property not found");
        }
    }
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.