/** @since 2.4 */
 public IJBossServerPublishMethod createPublishMethod() {
   IDeployableServerBehaviour beh = ServerConverter.getDeployableServerBehavior(getServer());
   if (beh != null) {
     IJBossServerPublishMethod method = ((DeployableServerBehavior) beh).createPublishMethod();
     return method;
   }
   return null;
 }
 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;
 }
  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
  }