Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.SessionInfo


        }

        public SessionInfo obtain(final SessionInfo sessionInfo, final String workspaceName)
                throws RepositoryException {

            SessionInfo result = super.obtain(sessionInfo, workspaceName);
            return result == null
                ? null
                : create(result, logWriterProvider);
        }
View Full Code Here


        }

        public SessionInfo impersonate(final SessionInfo sessionInfo, final Credentials credentials)
                throws RepositoryException {

            SessionInfo result = super.impersonate(sessionInfo, credentials);
            return result == null
                ? null
                : create(result, logWriterProvider);
        }
View Full Code Here

    /**
     * @see javax.jcr.Session#impersonate(Credentials)
     */
    public Session impersonate(Credentials credentials) throws LoginException, RepositoryException {
        checkIsAlive();
        SessionInfo info = config.getRepositoryService().impersonate(sessionInfo, credentials);
        try {
            if (info instanceof XASessionInfo) {
                return new XASessionImpl((XASessionInfo) info, repository, config);
            } else {
                return new SessionImpl(info, repository, config);
View Full Code Here

    //--------------------------------------------------------------------------
    SessionImpl switchWorkspace(String workspaceName) throws AccessDeniedException,
        NoSuchWorkspaceException, RepositoryException {
        checkAccessibleWorkspace(workspaceName);

        SessionInfo info = config.getRepositoryService().obtain(sessionInfo, workspaceName);
        if (info instanceof XASessionInfo) {
            return new XASessionImpl((XASessionInfo) info, repository, config);
        } else {
            return new SessionImpl(info, repository, config);
        }
View Full Code Here

        };
        resolver = new DefaultNamePathResolver(nsResolver);
    }

    public void testObtainWithNullWorkspaceName() throws RepositoryException, LoginException {
        SessionInfo sInfo = rs.obtain(new SimpleCredentials("admin", "admin".toCharArray()), null);
        try {
            assertEquals("default",sInfo.getWorkspaceName());
        } finally {
            rs.dispose(sInfo);
        }
    }
View Full Code Here

    /**
     * @see javax.jcr.Session#impersonate(Credentials)
     */
    public Session impersonate(Credentials credentials) throws LoginException, RepositoryException {
        checkIsAlive();
        SessionInfo info = config.getRepositoryService().impersonate(sessionInfo, credentials);
        try {
            if (info instanceof XASessionInfo) {
                return new XASessionImpl((XASessionInfo) info, repository, config);
            } else {
                return new SessionImpl(info, repository, config);
View Full Code Here

    //--------------------------------------------------------------------------
    SessionImpl switchWorkspace(String workspaceName) throws AccessDeniedException,
        NoSuchWorkspaceException, RepositoryException {
        checkAccessibleWorkspace(workspaceName);

        SessionInfo info = config.getRepositoryService().obtain(sessionInfo, workspaceName);
        if (info instanceof XASessionInfo) {
            return new XASessionImpl((XASessionInfo) info, repository, config);
        } else {
            return new SessionImpl(info, repository, config);
        }
View Full Code Here

    /**
     * @see Repository#login(javax.jcr.Credentials, String)
     */
    public Session login(Credentials credentials, String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException {
        SessionInfo info = config.getRepositoryService().obtain(credentials, workspaceName);
        try {
            if (info instanceof XASessionInfo) {
                return new XASessionImpl((XASessionInfo) info, this, config);
            } else {
                return new SessionImpl(info, this, config);
View Full Code Here

    /**
     * @see Repository#login(javax.jcr.Credentials, String)
     */
    public Session login(Credentials credentials, String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException {
        SessionInfo info = config.getRepositoryService().obtain(credentials, workspaceName);
        try {
            if (info instanceof XASessionInfo) {
                return new XASessionImpl((XASessionInfo) info, this, config);
            } else {
                return new SessionImpl(info, this, config);
View Full Code Here

     * @see javax.jcr.Session#impersonate(Credentials)
     */
    @Override
    public Session impersonate(Credentials credentials) throws LoginException, RepositoryException {
        checkIsAlive();
        SessionInfo info = config.getRepositoryService().impersonate(sessionInfo, credentials);
        try {
            if (info instanceof XASessionInfo) {
                return new XASessionImpl((XASessionInfo) info, repository, config);
            } else {
                return new SessionImpl(info, repository, config);
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.SessionInfo

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.