Package com.bitmovers.maui

Examples of com.bitmovers.maui.MauiApplication


        {
          HTTPSession [] theSessions = getSessions (theApplications [i]);
          String theApplicationClass = theFolderName + theApplications [i].getClass ().getName ();
          for (int j = 0; j < theSessions.length; j++)
          {
            MauiApplication theApplication = theSessions [j].getCachedMauiApplication (theApplicationClass);
            if (theApplication != null)
            {
              theApplication.exit ();
              theSessions [j].removeApplication (theApplication);
              theApplication.setChainApplicationName (theFolderName + theApplication.getName ());
            }
          }
        }
      }
      StringBuffer theStatusMessage = new StringBuffer ((aUnloadOnly ? "Unloading " : "Reloading "));
View Full Code Here


    * @param aInitializer The I_ApplicationInitializer object
    */
  private MauiApplication doAuthorizationCheck (HTTPSession aSession,
                          I_ApplicationInitializer aInitializer)
  {
    MauiApplication retVal = null;
    AuthorizationManager theAuth = AuthorizationManager.getInstance ();
    if (!theAuth.isAuthorized (null, theAuth.AUTHORIZATION_SESSIONS))
    {
      retVal = new com.bitmovers.maui.engine.httpserver.SessionLimitExceeded (aInitializer);
    }
View Full Code Here

         SecurityException,
         NoSuchMethodException,
         InvocationTargetException,
         IllegalAccessException
  {
    MauiApplication retVal = null;
    if (aClassName != null &&
      aClassName.trim ().length () > 0)
    {
     
      //FolderInformation theFolderInformation = getFolder (aClassName);
      //String theClassName = theFolderInformation.getClassName (aClassName);
      //theClassName = getMauiApplicationClassName (theClassName);
      //ApplicationClassWrapper theWrapper = (ApplicationClassWrapper) theFolderInformation.applications.get (theClassName);
      final ApplicationClassWrapper theWrapper = getApplicationClassWrapper (aClassName);
      if (theWrapper == null)
      {
        if (aCreateDefault)
        {
          String theLocation = (defaultFolder.trim ().length () == 0 ?
                        "" :
                        defaultFolder + "/");   
          retVal = createMauiApplication (aRequestHeader, aCheckpoint, aSession, theLocation + defaultApplicationClassName, false);
        }
        else
        {
          FolderInformation theFolderInformation = getFolder (aClassName);
          String theClassName = theFolderInformation.getClassName (aClassName);
          theClassName = getMauiApplicationClassName (theClassName);
          throw new ClassNotFoundException (theClassName);
        }
      }
      else
      {
        I_ApplicationInitializer theInitializer = new I_ApplicationInitializer ()
          {
            public void initializeApplication (MauiApplication aMauiApplication)
            {
             
              theWrapper.createWorkSpace ();
              ComponentManager.getInstance ().setApplication (aMauiApplication);
              ApplicationSuite theApplicationSuite = theWrapper.getApplicationSuite ();
              aMauiApplication.setApplicationSuiteName (theApplicationSuite.getName ());
              aMauiApplication.setApplicationName (aClassName);
              aMauiApplication.setChainApplicationName (aClassName);
              aMauiApplication.setShortName (getShortName (aClassName));
              aMauiApplication.setSession (aSession);
              aMauiApplication.setFolderName (theApplicationSuite.getLocation ());
              aMauiApplication.setInboundCookies (aCheckpoint);
              Properties theProperties = (Properties) theWrapper.getProperties ().clone ();
              aMauiApplication.setProperties (theProperties);
              String theProperty = theProperties.getProperty (scm.MAUI_APPLICATION_PREAMBLE);
              if (theProperty != null)
              {
                aMauiApplication.setPreamble (theProperty);
              }
             
              theProperty = theProperties.getProperty (scm.MAUI_APPLICATION_POSTAMBLE);
              if (theProperty != null)
              {
                aMauiApplication.setPostamble (theProperty);
              }
             
              theProperty = theProperties.getProperty (scm.MAUI_APPLICATION_BACKGROUND_COLOR);
              if (theProperty != null)
              {
                aMauiApplication.setBackgroundColor (theProperty);
              }
             
              theProperty = theProperties.getProperty (scm.MAUI_APPLICATION_BACKGROUND_IMAGE);
              if (theProperty != null)
              {
                aMauiApplication.setBackgroundImage (theProperty);
              }
             
              aMauiApplication.setDesktop (MDesktop.getInstance ());
              aMauiApplication.initialize (aRequestHeader);
            }
          };
        if ((retVal = doAuthorizationCheck (aSession, theInitializer)) == null)
        {
          retVal = theWrapper.instantiateApplication (theInitializer);
        }
        try
        {
          if (isOutOfDate (retVal))
          {
            retVal = createMauiApplication (aRequestHeader,
                            aCheckpoint,
                            aSession,
                            aClassName,
                            aCreateDefault);
          }
        }
        catch (IOException e)
        {
        }
      }
    }
    else if (aCreateDefault)
    {
      //
      //  Create a default application
      //
      retVal = createMauiApplication (aRequestHeader, aCheckpoint, aSession, defaultApplicationClassName, false);
    }
    else
    {
      throw new ClassNotFoundException ((aClassName == null ? defaultApplicationClassName : aClassName));
    }
   
    if (retVal != null)
    {
      retVal.staticInitialize ();
      if (aClassName != null && aClassName.equals (defaultApplicationClassName))
      {
        retVal.setDefaultApplication (true);
      }
    }
    return retVal;
  }
View Full Code Here

  {
    MButton theButton = (MButton) aRenderable;
   
    if (theButton.getLink () != null)
    {
      MauiApplication theApplication = (MauiApplication) theButton.getRootParent ();
      theApplication.setURLString (theButton.getLink ());
    }
    clicked = false;
    return super.render (aRenderable);
  }
View Full Code Here

    *
    */
   
  public String generatePostList(I_Renderable aRenderable, String aRenderableValue)
  {
    MauiApplication theApplication = getMauiApplication (aRenderable);
   
    StringBuffer retVal = new StringBuffer ("<go href=\"");
    if (isUp && !theApplication.getRuntimeName ().equals (""))
    {
      retVal.append (theApplication.getServletAndApplication ());
      generatePseudo (getContainingFrame (aRenderable), "peek");
      retVal.append (getGeneratedPseudo ());
    }
    retVal.append ("#postCard_");
    retVal.append (Integer.toString (currentPostCard));
View Full Code Here

  // ----------------------------------------------------------------------
 
  protected StringBuffer generatePseudoHref(String aPseudoCommand, String aSuffix, boolean aUsePreviousApp)
  {
    StringBuffer retVal = new StringBuffer ("<go href=\"/");
    MauiApplication theApplication = getMauiApplication (renderable);
   
    if (aUsePreviousApp)
    {
      HTTPSession theSession = theApplication.getSession ();
      Object thePreviousApp = theSession.getShared ("previousApp");
      if (thePreviousApp != null)
      {
        theApplication = (MauiApplication) thePreviousApp;
      }
    }
    //if (!theApplication.getRuntimeName ().equals (""))
    //{
    //  retVal.append (theApplication.getRuntimeName ());
    //}
    retVal.append (theApplication.getServletAndApplication ().substring (1));
   
    if (retVal.charAt (retVal.length () - 1) != '/')
    {
      retVal.append ("/");
    }
View Full Code Here

    //
   
    String theURL = theButton.getLink ();
    if (theURL != null && theURL.indexOf ("://") != -1)
    {
      MauiApplication theApplication = (MauiApplication) theButton.getRootParent ();
      theApplication.setURLString (theButton.getLink ());
    }
  }
View Full Code Here

TOP

Related Classes of com.bitmovers.maui.MauiApplication

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.