Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.ws.session
Class WSRemotingSessionManagerImpl

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.ecm.platform.ws.session.WSRemotingSessionManagerImpl
All Implemented Interfaces:
DocumentLoader, WSRemotingSessionManager, Adaptable, Component, Extensible

public class WSRemotingSessionManagerImpl
extends DefaultComponent
implements WSRemotingSessionManager, DocumentLoader

Web service Remoting session manager implemtation.

Author:
Julien Anguenot

Field Summary
static ComponentName NAME
           
 
Constructor Summary
WSRemotingSessionManagerImpl()
           
 
Method Summary
 void addSession(String sid, WSRemotingSession session)
          Adds a new session.
 WSRemotingSession createSession(String username, String password, String repository, UserManager um, CoreSession session)
          Creates a new remoting session.
 void delSession(String sid)
          Deletes a session if it exists.
 void fillProperties(DocumentModel doc, List<DocumentProperty> props, WSRemotingSession rs)
           
<T> T
getAdapter(Class<T> adapter)
          Returns an object which is an instance of the given class associated with this object.
 WSRemotingSession getSession(String sid)
          Return a session given its Nuxeo Core session id if exists.
 void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
           
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, applicationStarted, deactivate, registerExtension, unregisterContribution, unregisterExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final ComponentName NAME
Constructor Detail

WSRemotingSessionManagerImpl

public WSRemotingSessionManagerImpl()
Method Detail

addSession

public void addSession(String sid,
                       WSRemotingSession session)
Description copied from interface: WSRemotingSessionManager
Adds a new session.

Specified by:
addSession in interface WSRemotingSessionManager
Parameters:
sid - the nuxeo core session id.
session - the web service remoting session.

createSession

public WSRemotingSession createSession(String username,
                                       String password,
                                       String repository,
                                       UserManager um,
                                       CoreSession session)
Description copied from interface: WSRemotingSessionManager
Creates a new remoting session.

Specified by:
createSession in interface WSRemotingSessionManager
Parameters:
username - the user name.
password - the user password
repository - the repository name
um - the user manager
session - the Nuxeo Core session
Returns:
an intialized WSRemotingSession instance.

getSession

public WSRemotingSession getSession(String sid)
                             throws ClientException
Description copied from interface: WSRemotingSessionManager
Return a session given its Nuxeo Core session id if exists.

Specified by:
getSession in interface WSRemotingSessionManager
Parameters:
sid - the Nuxeo Core session id.
Returns:
a WSRemotingSession instance.
Throws:
ClientException - if the session does not exist anymore.

delSession

public void delSession(String sid)
                throws ClientException
Description copied from interface: WSRemotingSessionManager
Deletes a session if it exists.

Specified by:
delSession in interface WSRemotingSessionManager
Parameters:
sid - the Nuxeo Core session id.
Throws:
ClientException

registerContribution

public void registerContribution(Object contribution,
                                 String extensionPoint,
                                 ComponentInstance contributor)
                          throws Exception
Overrides:
registerContribution in class DefaultComponent
Throws:
Exception

fillProperties

public void fillProperties(DocumentModel doc,
                           List<DocumentProperty> props,
                           WSRemotingSession rs)
                    throws ClientException
Specified by:
fillProperties in interface DocumentLoader
Throws:
ClientException

getAdapter

public <T> T getAdapter(Class<T> adapter)
Description copied from interface: Adaptable
Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.

Specified by:
getAdapter in interface Adaptable
Overrides:
getAdapter in class DefaultComponent
Parameters:
adapter - the adapter class to look up
Returns:
a object castable to the given class, or null if this object does not have an adapter for the given class

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.