Package org.dmd.dmp.server.servlet.extended

Examples of org.dmd.dmp.server.servlet.extended.SessionRI


   
    try {
      response = (ActionResponse) pluginManager.getSecurityManager().validateSession(request);
     
      if (response == null){
        SessionRI session = pluginManager.getSecurityManager().getSession(request);

        response = session.handleActionRequest(request);
      }
    } catch (DmcValueException e) {
      response = request.getResponse();
      response.setResponseType(ResponseTypeEnum.ERROR);
      response.setResponseText(e.toString());
View Full Code Here


   
    try {
      response = (CreateResponse) pluginManager.getSecurityManager().validateSession(request);
     
      if (response == null){
        SessionRI session = pluginManager.getSecurityManager().getSession(request);

        response = session.handleCreateRequest(request);
      }
    } catch (DmcValueException e) {
      response = (CreateResponse) request.getErrorResponse();
      response.setResponseText(e.toString());
     
View Full Code Here

    try {
      response = (DeleteResponse) pluginManager.getSecurityManager().validateSession(request);
     
      if (response == null){
        SessionRI session = pluginManager.getSecurityManager().getSession(request);

        response = session.handleDeleteRequest(request);
      }
    } catch (DmcValueException e) {
      response = (DeleteResponse) request.getErrorResponse();
      response.setResponseText(e.toString());
     
View Full Code Here

      // Ensure that the session is valid - if it isn't, an error reponse
      // will be returned.
      response = (GetResponse) securityManager.validateSession(request);
      if (response == null){
        // All activity takes place against the session
        SessionRI session = securityManager.getSession(request);
        response = session.handleGetRequest(request);
       
//        response = request.getResponse();
//        response.setLastResponse(true);
      }
    } catch (DmcValueException e) {
View Full Code Here

      try {
        response = (SetResponse) pluginManager.getSecurityManager().validateSession(request);
       
        if (response == null){
          SessionRI session = pluginManager.getSecurityManager().getSession(request);
 
          response = session.handleSetRequest(request);
        }
      } catch (DmcValueException e) {
        response = (SetResponse) request.getErrorResponse();
        response.setResponseText(e.toString());
       
View Full Code Here

        super(new SessionRIDMO(mods), org.dmd.dmp.server.servlet.generated.DmpServerSchemaAG._SessionRI);
    }

    // Generated from: org.dmd.dmg.generators.BaseDMWGeneratorNewest.dumpWrapper(BaseDMWGeneratorNewest.java:491)
    public SessionRI getModificationRecorder(){
        SessionRI rc = new SessionRI();
        rc.setDotName(getDotName());
        rc.setModifier(new DmcTypeModifierMV(MetaDMSAG.__modify));
        return(rc);
    }
View Full Code Here

    public SessionRIDMW(SessionRIDMO obj) {
        super(obj, org.dmd.dmp.server.servlet.generated.DmpServerSchemaAG._SessionRI);
    }

    public SessionRI cloneIt() {
        SessionRI rc = new SessionRI();
        rc.setDmcObject(getDMO().cloneIt());
        return(rc);
    }
View Full Code Here

         
          if (request.isTrackingEnabled())
            logger.warn("Incorrect password for user: " + request.getUserName());
        }
        else{
          SessionRI session = new SessionRI(pluginManager.getCache(),pluginManager.getRequestTracker());
          try {
            session.setDotName(new DotName("sf." + request.getServletRequest().getSession().getId()));
          } catch (DmcValueException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
          }
          session.setSessionIDRI(request.getServletRequest().getSession().getId());
          session.setSessionHostRI(request.getServletRequest().getRemoteHost());
          session.setUserRefRI(user);
         
          // This will create a new GWT Event Service Domain that's named by the session identifier
          // The session will be used to forward events and asynchronous responses back to the client
          // via this mechanism.
          session.initializeEventChannel(servlet);
         
          sessions.put(session.getSessionIDRI(), session);
         
          response.setSessionID(session.getSessionIDRI());
         
          if (request.isTrackingEnabled())
            logger.trace("New session created: " + session.getSessionIDRI() + " - for user: " + request.getUserName());

          // TODO: proper addition of the entry to the cache
          try {
            cache.addObject(session);
          } catch (ResultException e) {
View Full Code Here

  @Override
  public LogoutResponse logout(LogoutRequest request) {
    LogoutResponse response = request.getResponse();
   
    synchronized (sessions) {
      SessionRI session = sessions.get(request.getSessionID());
      if (session == null){
        response.setResponseType(ResponseTypeEnum.ERROR);
      }
      else{
        sessions.remove(session.getSessionIDRI());
       
        // TODO: remove it from the cache
      }
    }
   
View Full Code Here

  @Override
  public Response validateSession(Request request) throws DmcValueException {
    Response rc = null;
   
    synchronized (sessions) {
      SessionRI session = sessions.get(request.getSessionID());
     
      if (request instanceof LoginRequest){
        if (session != null){
          rc = request.getErrorResponse();
          rc.setResponseText("User already logged in.");
View Full Code Here

TOP

Related Classes of org.dmd.dmp.server.servlet.extended.SessionRI

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.