Examples of WebApplication


Examples of com.dodo.blog.WebApplication

{
    public UserInfoPanel()
    {
        setClassName( "user-info-panel" );

        WebApplication webApplication = WebApplication.get();
        Account account = webApplication.getLoggedInAccount();
        if ( account != null )
        {
            Anchor link = new Anchor( account.getUserInfo(), MyAccount.class );
            add( link );
        }
        else
        {
            add( new Span( localize(
                    "label.registerOrLogin",
                    webApplication.getPathByPageClass( Registration.class ),
                    webApplication.getPathByPageClass( Login.class ) ) ) );
        }
    }
View Full Code Here

Examples of com.sun.enterprise.web.WebApplication

    static WebModule getWebModule(WebServiceEndpoint wsep) {
        ApplicationRegistry appRegistry = org.glassfish.internal.api.Globals.getDefaultHabitat().getComponent(ApplicationRegistry.class);
        String appName = wsep.getBundleDescriptor().getApplication().getAppName();
        ApplicationInfo appInfo = appRegistry.get(appName);

        WebApplication webApp = null;
        if (appInfo != null) {
            Collection<ModuleInfo> moduleInfos = appInfo.getModuleInfos();
            Set<EngineRef> engineRefs = null;
            WebBundleDescriptor requiredWbd = (WebBundleDescriptor) wsep.getBundleDescriptor();
            for (ModuleInfo moduleInfo : moduleInfos) {
                engineRefs = moduleInfo.getEngineRefs();
                for (EngineRef engineRef : engineRefs) {
                    if (engineRef.getApplicationContainer() instanceof WebApplication) {
                        webApp = (WebApplication) engineRef.getApplicationContainer();
                        WebBundleDescriptor wbd = webApp.getDescriptor();
                        if (wbd.equals(requiredWbd)) {
                            break; //WebApp corresponding to wsep is found.
                        } else {
                            webApp = null;
                        }
                    }
                }
            }
        }
        //get the required WebModule from the webApp.
        if (webApp != null) {
            String requiredModule = ((WebBundleDescriptor) wsep.getBundleDescriptor()).getModuleName();
            Set<WebModule> webModules = webApp.getWebModules();
            for(WebModule wm : webModules) {
                if(wm.getModuleName().equalsIgnoreCase(requiredModule)) {
                    return wm;
                }
            }
View Full Code Here

Examples of com.sun.jersey.spi.container.WebApplication

*/
public class WebApplicationImplTest {

    @Test
    public void testInstantiatesWebApplicationImpl() {
        WebApplication app = new WebApplicationImpl();
        assertFalse(app.isInitiated());
    }
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WebApplication

    }

    public void init(IWorkbench workbench, IStructuredSelection selection) {
        WGARuntime runtime = null;
        if (selection.getFirstElement() instanceof WebApplication) {
            WebApplication app = (WebApplication) selection.getFirstElement();
            runtime = app.getRuntime();
            _webApplication = app.getContentStore().getKey();
        } else {               
            runtime = WGARuntime.fromSelection(selection);
        }
       
        if (runtime != null) {
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WebApplication

    WGAConfiguration config;
    try {
      config = _model.getWgaRuntime().retrieveWGAConfig(false);     
      if (config != null) {
        for (ContentStore cs : config.getContentStores()) {
          WebApplication webApplication = new WebApplication();
          webApplication.setRuntime(_model.getWgaRuntime());
          webApplication.setContentStore(cs);
          apps.add(webApplication);         
        }
      }
    }  catch (Exception e) {
      WGADesignerPlugin.getDefault().logError("Unable to create web application model.", e);
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WebApplication

        // check if runtime is started
        if (!TomcatUtils.getInstance().isRunning(_model.getWgaRuntime()) || !TomcatUtils.getInstance().acceptRequests()) {
          MessageDialog.openWarning(getSite().getShell(), "Warning", "The current runtime is not started.");
          return;
        }
        WebApplication app = _webAppModel.getBeans().get(_tblWebApplications.getTable().getSelectionIndex());
        IWebBrowser browser = WGADesignerPlugin.getDefault().createBrowser(WGADesignerPlugin.DEFAULT_BROWSER_ID);
        browser.openURL(_model.getWgaRuntime().getDefaultURL(app.getContentStore()));
      } catch (PartInitException e1) {
        WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to open web application", e1);
      }
    } else {
      MessageDialog.openInformation(getSite().getShell(), "Selection required", "Please select a web application for this action first.");
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WebApplication

  private void handleOpenInDesignEditor() {
   
   
    if (_tblWebApplications.getTable().getSelectionCount() > 0) {
      try {           
        WebApplication app = _webAppModel.getBeans().get(_tblWebApplications.getTable().getSelectionIndex());           
        Map<String, IContainer> connectedDesigns;
        try {
          connectedDesigns = _model.getWgaRuntime().getConnectedDesignContainers();
          IContainer design = connectedDesigns.get(app.getContentStore().getKey())
          if (design !=null && design.exists()){
            WGADesignStructureHelper helper = new WGADesignStructureHelper(design);
            WorkbenchUtils.openEditor(Plugin.getDefault().getWorkbench(), helper.getSyncInfo(), ExternalResourceIDs.EDITOR_WGA_DESIGN);
          }
          else {
            MessageDialog.openWarning(getSite().getShell(), "Unable to determine design", "Unable to determine design for application '" + app.getContentStore().getKey() + "'.");   
          }         
        } catch (IncompatibleWGAConfigVersion e1) {
          WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to determine design", "Unable to determine design for application '" + app.getContentStore().getKey() + "'. WGA configuration is incompatible.", e1);
        } catch (IOException e1) {
          WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to determine design", "Unable to determine design for application '" + app.getContentStore().getKey() + "'. Cannot read WGA configuration.", e1);
        }                   
      } catch (Exception e1) {
        WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to open Design Editor", e1);
      }
    } else {
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WebApplication

  }
 
  private void handleOpenInContentManager() {
    if (_tblWebApplications.getTable().getSelectionCount() > 0) {
      try {
        WebApplication app = _webAppModel.getBeans().get(_tblWebApplications.getTable().getSelectionIndex());
        IWebBrowser browser = WGADesignerPlugin.getDefault().createBrowser(OpenContentManager.BROWSER_ID);
        browser.openURL(_model.getWgaRuntime().getContentManagerURL(app.getContentStore()));
      } catch (PartInitException e1) {
        WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to open Content Manager", e1);
      }
    } else {
      MessageDialog.openInformation(getSite().getShell(), "Selection required", "Please select a web application for this action first.");
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WebApplication

  }
 
  private void handleOpenInAdminClient() {
    if (_tblWebApplications.getTable().getSelectionCount() > 0) {
      try {
        WebApplication app = _webAppModel.getBeans().get(_tblWebApplications.getTable().getSelectionIndex());
        IWebBrowser browser = WGADesignerPlugin.getDefault().createBrowser(OpenContentManager.BROWSER_ID);
        browser.openURL(_model.getWgaRuntime().getAdminClientURL(app.getContentStore()));
      } catch (PartInitException e1) {
        WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to open Admin Client", e1);
      }
    } else {
      MessageDialog.openInformation(getSite().getShell(), "Selection required", "Please select a web application for this action first.");
View Full Code Here

Examples of de.innovationgate.eclipse.wgadesigner.models.WebApplication

  }
 
  private void handleExportWebApplication() {
      if (_tblWebApplications.getTable().getSelectionCount() > 0) {
            try {
                WebApplication app = _webAppModel.getBeans().get(_tblWebApplications.getTable().getSelectionIndex());
                IStructuredSelection selection = new SingleStructuredSelection(app);
                WorkbenchUtils.openWizard(WGADesignerPlugin.getDefault().getWorkbench(), ResourceIDs.WIZARD_EXPORT_WGAAPPLICATION, selection);             
            } catch (Exception e) {
                WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to open export wizard for web application", e);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.