Beispiel #1
0
 public void projectAnalysis(String projectId, String appType) throws Exception {
   WfNode wfNode = new WfNode();
   wfNode.setId(projectId);
   wfNode.copyFrom(wfNode.databaseMe());
   if (App.APP_TYPE_PROCESS.equals(appType)) {
     // 프로젝트의 jar 파일의 위치를 찾는다. projectId / bundle / 프로젝트.jar
     String jarBasePath = MetadataBundle.getProjectBasePath(projectId, "bundle");
     String jarFileName = wfNode.getName() + ".jar";
     File jarFile = new File(jarBasePath + File.separatorChar + jarFileName);
     if (jarFile.exists()) {
       // 프로젝트의 jar 파일을 앱의 jar로 옴기고... 해당 경로를 appName / root / extFileName 에 저장을 해 놓는다.
       // AppMapping 의 openAppBrowser() 에서 활용됨
       String appFilePath =
           MetadataBundle.getProjectBasePath(this.getAppName())
               + File.separatorChar
               + this.getAppName()
               + ".jar";
       LocalFileSystem fileUtil = new LocalFileSystem();
       fileUtil.copyFile(jarFile.getPath(), appFilePath);
     }
   }
 }
Beispiel #2
0
  @ServiceMethod(callByContent = true)
  public Object[] addApp() throws Exception {

    //		App app = new App();
    //		app.setAppId(this.getAppId());
    //		app.copyFrom(app.databaseMe());
    //		app.setAppName(this.getAppName());
    //		app.setComcode(session.getCompany().getComCode());
    //		app.setInstallCnt(this.getInstallCnt());
    //		app.setAppId(this.getAppId());
    //		app.setAppName(this.getAppName());
    //		app.setSimpleOverview(this.getSimpleOverview());
    //		app.setFullOverview(this.getFullOverview());
    //		app.setPricing(this.getPricing());
    //		app.setLogoFile(this.getLogoFile());
    //		app.setCategory(this.getCategory());

    //
    ////		AppInformation setAppInfo = new AppInformation();
    ////
    ////		setAppInfo.getMetaworksContext().setWhen("view");
    ////
    ////		setAppInfo.setAppId(this.getAppId());
    ////		setAppInfo.setAppName(this.getAppName());
    ////		setAppInfo.setSimpleOverview(this.getSimpleOverview());
    ////		setAppInfo.setFullOverview(this.getFullOverview());
    ////		setAppInfo.setPricing(this.getPricing());
    ////		setAppInfo.setLogoFile(this.getLogoFile());
    ////		setAppInfo.setCategory(this.getCategory());
    //
    //		String defId = "AppAcquisition.process";
    //
    //		ProcessMap goProcess = new ProcessMap();
    //		goProcess.session = session;
    //		goProcess.processManager = processManager;
    //		goProcess.instanceView = instanceView;
    //		goProcess.setDefId(defId);
    //
    //
    //		// 프로세스 발행
    //	    Long instId = Long.valueOf(goProcess.initializeProcess());
    //
    //	    // 프로세스 실행
    //	    ResultPayload rp = new ResultPayload();
    //	    rp.setProcessVariableChange(new KeyedParameter("requestAquisitionApp", app));
    //
    //	    //무조건 compleate
    //	    processManager.executeProcessByWorkitem(instId.toString(), rp);
    //	    processManager.applyChanges();
    WfNode wfNode = new WfNode();
    wfNode.setId(this.getProjectId());
    String projectName = wfNode.databaseMe().getName();

    AppMapping am = new AppMapping();
    am.setAppId(this.getAppId());
    am.setAppName(this.getAppName());
    am.setComCode(this.getComcode());
    String url = null;
    String reopsitoryService = GlobalContext.getPropertyString("file.repository.service");
    url = GlobalContext.getPropertyString("app.url.prod") + projectName;

    am.setUrl(url);
    am.setAppType(this.getAppType());

    am.createDatabaseMe();
    am.flushDatabaseMe();
    //		ModalWindow removeWindow = new ModalWindow();
    //		removeWindow.setId("subscribe");
    //
    //		ModalWindow modalWindow = new ModalWindow();
    //		modalWindow.getMetaworksContext().setWhen(MetaworksContext.WHEN_VIEW);
    //		modalWindow.setWidth(300);
    //		modalWindow.setHeight(150);
    //
    //		modalWindow.setTitle("앱취득 신청 완료");
    //
    //		String panelMessage = "";
    //
    ////		ProjectInfo info = new ProjectInfo(String.valueOf(this.getAppId()));
    ////		info.load();
    //
    ////		String url = "http://" + session.getCompany().getComName() + "." + info.getDomainName() +
    // ":9090/uengine-web";
    //
    //		panelMessage = "앱 취득 신청이 완료 되었습니다. 관리자 승인 후 이용이 가능합니다.";
    ////		panelMessage += "url: <a href='" + url + "'>" + url + "</a>";
    //
    //		modalWindow.setPanel(panelMessage);
    //		modalWindow.getButtons().put("$Confirm", this);

    return new Object[] {this.detail()};

    //		return new Object[]{new MainPanel(new OceMain(session, this.getAppId()))};
  }