コード例 #1
0
 /** @since 2.4 */
 public IJBossServerPublishMethod createPublishMethod() {
   IDeployableServerBehaviour beh = ServerConverter.getDeployableServerBehavior(getServer());
   if (beh != null) {
     IJBossServerPublishMethod method = ((DeployableServerBehavior) beh).createPublishMethod();
     return method;
   }
   return null;
 }
コード例 #2
0
 public static boolean canExplore(IServer server, IModule[] modules) {
   IDeployableServer ds = ServerConverter.getDeployableServer(server);
   if (ds != null) {
     IPath p = ds.getDeploymentLocation(modules, false);
     if (p == null || !p.toFile().exists() || ExploreUtils.getExploreCommand() == null)
       return false;
     return true;
   }
   return false;
 }
コード例 #3
0
  public static String getDeployDirectory(IServer server) {
    IDeployableServer deployableServer = ServerConverter.getDeployableServer(server);
    if (server != null && deployableServer != null) {
      return deployableServer.getDeployFolder();
    }
    String ret =
        server.getAttribute(IDeployableServer.DEPLOY_DIRECTORY, (String) null); // $NON-NLS-1$
    if (ret != null) return ret.trim();

    // Other runtimes like tomcat / default behavior (?)
    IRuntime rt = server.getRuntime();
    if (rt != null) {
      return rt.getLocation().toString();
    }

    return null; // No idea
  }