Nuxeo Enterprise Platform 5.1

org.nuxeo.ecm.platform.ws
Class AbstractNuxeoWebService

java.lang.Object
  extended by org.nuxeo.ecm.platform.ws.AbstractNuxeoWebService
All Implemented Interfaces:
Serializable, BaseNuxeoWebService
Direct Known Subclasses:
NuxeoRemotingBean, WSAuditBean

public abstract class AbstractNuxeoWebService
extends Object
implements BaseNuxeoWebService

Abstract Nuxeo Web Service.

Extend this if you want to share the Web Service remoting sessions with the other Nuxeo platform web services.

Author:
Julien Anguenot
See Also:
Serialized Form

Constructor Summary
protected AbstractNuxeoWebService()
           
 
Method Summary
 String connect(String username, String password)
          Connects to the default nuxeo core repository.
 void disconnect(String sid)
          Disconnect the Nuxeo core given the session id.
protected  WSRemotingSessionManager getSessionsManager()
          Returns the platform service that deals with shared Web Service remote sessions.
protected  UserManager getUserManager()
          Returns the user manager service.
protected  WSRemotingSession initSession(String sid)
          Initializes a user session.
protected  void login(String username, String password)
          Initializes a new user session from the credentials bound the Web Service remote session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNuxeoWebService

protected AbstractNuxeoWebService()
Method Detail

getSessionsManager

protected WSRemotingSessionManager getSessionsManager()
                                               throws ClientException
Returns the platform service that deals with shared Web Service remote sessions.

Returns:
a WSRemotingSessionManager service
Throws:
ClientException

connect

@PermitAll
public String connect(String username,
                                String password)
               throws ClientException
Description copied from interface: BaseNuxeoWebService
Connects to the default nuxeo core repository.

Specified by:
connect in interface BaseNuxeoWebService
Parameters:
username - : the user name
password - : the user password
Returns:
a Nuxeo core session identifier.
Throws:
ClientException

disconnect

public void disconnect(String sid)
                throws ClientException
Description copied from interface: BaseNuxeoWebService
Disconnect the Nuxeo core given the session id.

Specified by:
disconnect in interface BaseNuxeoWebService
Parameters:
sid - : the Nuxeo core session id.
Throws:
ClientException

login

protected void login(String username,
                     String password)
              throws ClientException
Initializes a new user session from the credentials bound the Web Service remote session.

Parameters:
rs - a Web Service remote instance.
Throws:
ClientException

initSession

protected WSRemotingSession initSession(String sid)
                                 throws ClientException
Initializes a user session.

Parameters:
sid - the session identifier.
Returns:
a Web Service remoting session instance.
Throws:
ClientException

getUserManager

protected UserManager getUserManager()
                              throws Exception
Returns the user manager service.

Returns:
the user manager service.
Throws:
Exception

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.