org.eclipse.wst.server.core_1.1.304.v20120208_1420

16:49:22.625 INFO  jd.cli.Main - Decompiling org.eclipse.wst.server.core_1.1.304.v20120208_1420.jar
package org.eclipse.wst.server.core;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;

public abstract interface IModule
  extends IAdaptable
{
  public abstract String getId();
  
  public abstract String getName();
  
  public abstract IModuleType getModuleType();
  
  public abstract IProject getProject();
  
  public abstract boolean isExternal();
  
  public abstract boolean exists();
  
  public abstract Object getAdapter(Class paramClass);
  
  public abstract Object loadAdapter(Class paramClass, IProgressMonitor paramIProgressMonitor);
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IModule
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

public abstract interface IModuleArtifact
{
  public abstract IModule getModule();
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IModuleArtifact
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

public abstract interface IModuleType
{
  public abstract String getId();
  
  public abstract String getName();
  
  public abstract String getVersion();
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IModuleType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

/**
 * @deprecated
 */
public abstract interface IProjectProperties
{
  /**
   * @deprecated
   */
  public abstract IRuntime getRuntimeTarget();
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IProjectProperties
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import org.eclipse.core.runtime.IStatus;

public abstract interface IPublishListener
{
  public abstract void publishStarted(IServer paramIServer);
  
  public abstract void publishFinished(IServer paramIServer, IStatus paramIStatus);
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IPublishListener
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;

public abstract interface IRuntime
  extends IAdaptable
{
  public abstract String getName();
  
  public abstract String getId();
  
  public abstract void delete()
    throws CoreException;
  
  public abstract boolean isReadOnly();
  
  public abstract boolean isWorkingCopy();
  
  public abstract Object getAdapter(Class paramClass);
  
  public abstract Object loadAdapter(Class paramClass, IProgressMonitor paramIProgressMonitor);
  
  public abstract IRuntimeType getRuntimeType();
  
  public abstract IRuntimeWorkingCopy createWorkingCopy();
  
  public abstract IPath getLocation();
  
  public abstract boolean isStub();
  
  public abstract IStatus validate(IProgressMonitor paramIProgressMonitor);
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IRuntime
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

public abstract interface IRuntimeLifecycleListener
{
  public abstract void runtimeAdded(IRuntime paramIRuntime);
  
  public abstract void runtimeChanged(IRuntime paramIRuntime);
  
  public abstract void runtimeRemoved(IRuntime paramIRuntime);
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IRuntimeLifecycleListener
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import org.eclipse.core.runtime.IAdaptable;

/**
 * @deprecated
 */
public abstract interface IRuntimeTargetHandler
  extends IAdaptable
{
  public abstract String getId();
  
  public abstract boolean supportsRuntimeType(IRuntimeType paramIRuntimeType);
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IRuntimeTargetHandler
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;

public abstract interface IRuntimeType
{
  public abstract String getId();
  
  public abstract String getName();
  
  public abstract String getDescription();
  
  public abstract String getVendor();
  
  public abstract String getVersion();
  
  public abstract IModuleType[] getModuleTypes();
  
  public abstract boolean canCreate();
  
  public abstract IRuntimeWorkingCopy createRuntime(String paramString, IProgressMonitor paramIProgressMonitor)
    throws CoreException;
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IRuntimeType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import java.beans.PropertyChangeListener;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;

public abstract interface IRuntimeWorkingCopy
  extends IRuntime
{
  public static final int SAVE_CONFLICT = 1;
  public static final String PROPERTY_NAME = "name";
  public static final String PROPERTY_LOCATION = "location";
  
  public abstract void setName(String paramString);
  
  public abstract void setReadOnly(boolean paramBoolean);
  
  public abstract boolean isDirty();
  
  public abstract void addPropertyChangeListener(PropertyChangeListener paramPropertyChangeListener);
  
  public abstract void removePropertyChangeListener(PropertyChangeListener paramPropertyChangeListener);
  
  public abstract IRuntime getOriginal();
  
  public abstract void setLocation(IPath paramIPath);
  
  public abstract void setStub(boolean paramBoolean);
  
  public abstract IRuntime save(boolean paramBoolean, IProgressMonitor paramIProgressMonitor)
    throws CoreException;
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IRuntimeWorkingCopy
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import org.eclipse.core.runtime.IStatus;

public abstract interface IServer$IOperationListener
{
  public abstract void done(IStatus paramIStatus);
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IServer.IOperationListener
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;

public abstract interface IServer
  extends IServerAttributes, ISchedulingRule
{
  public static final int STATE_UNKNOWN = 0;
  public static final int STATE_STARTING = 1;
  public static final int STATE_STARTED = 2;
  public static final int STATE_STOPPING = 3;
  public static final int STATE_STOPPED = 4;
  public static final int PUBLISH_STATE_UNKNOWN = 0;
  public static final int PUBLISH_STATE_NONE = 1;
  public static final int PUBLISH_STATE_INCREMENTAL = 2;
  public static final int PUBLISH_STATE_FULL = 3;
  public static final int PUBLISH_INCREMENTAL = 1;
  public static final int PUBLISH_FULL = 2;
  public static final int PUBLISH_AUTO = 3;
  public static final int PUBLISH_CLEAN = 4;
  
  public abstract int getServerState();
  
  public abstract String getMode();
  
  public abstract int getServerPublishState();
  
  public abstract void addServerListener(IServerListener paramIServerListener);
  
  public abstract void addServerListener(IServerListener paramIServerListener, int paramInt);
  
  public abstract void removeServerListener(IServerListener paramIServerListener);
  
  public abstract void addPublishListener(IPublishListener paramIPublishListener);
  
  public abstract void removePublishListener(IPublishListener paramIPublishListener);
  
  public abstract IStatus canPublish();
  
  public abstract boolean shouldPublish();
  
  public abstract IStatus publish(int paramInt, IProgressMonitor paramIProgressMonitor);
  
  public abstract void publish(int paramInt, List<IModule[]> paramList, IAdaptable paramIAdaptable, IOperationListener paramIOperationListener);
  
  public abstract IStatus canStart(String paramString);
  
  public abstract void start(String paramString, IProgressMonitor paramIProgressMonitor)
    throws CoreException;
  
  public abstract void start(String paramString, IOperationListener paramIOperationListener);
  
  public abstract IStatus canRestart(String paramString);
  
  public abstract boolean shouldRestart();
  
  public abstract boolean getServerRestartState();
  
  public abstract void restart(String paramString, IProgressMonitor paramIProgressMonitor);
  
  public abstract void restart(String paramString, IOperationListener paramIOperationListener);
  
  public abstract IStatus canStop();
  
  public abstract void stop(boolean paramBoolean);
  
  public abstract void stop(boolean paramBoolean, IOperationListener paramIOperationListener);
  
  public abstract int getModuleState(IModule[] paramArrayOfIModule);
  
  public abstract int getModulePublishState(IModule[] paramArrayOfIModule);
  
  public abstract boolean getModuleRestartState(IModule[] paramArrayOfIModule);
  
  /**
   * @deprecated
   */
  public abstract IStatus canControlModule(IModule[] paramArrayOfIModule, IProgressMonitor paramIProgressMonitor);
  
  public abstract IStatus canRestartModule(IModule[] paramArrayOfIModule, IProgressMonitor paramIProgressMonitor);
  
  public abstract IStatus canPublishModule(IModule[] paramArrayOfIModule, IProgressMonitor paramIProgressMonitor);
  
  public abstract void startModule(IModule[] paramArrayOfIModule, IOperationListener paramIOperationListener);
  
  public abstract void stopModule(IModule[] paramArrayOfIModule, IOperationListener paramIOperationListener);
  
  public abstract void restartModule(IModule[] paramArrayOfIModule, IOperationListener paramIOperationListener);
  
  public abstract ILaunchConfiguration getLaunchConfiguration(boolean paramBoolean, IProgressMonitor paramIProgressMonitor)
    throws CoreException;
  
  public abstract ILaunch getLaunch();
  
  public abstract int getStartTimeout();
  
  public abstract int getStopTimeout();
  
  /**
   * @deprecated
   */
  public abstract void synchronousStart(String paramString, IProgressMonitor paramIProgressMonitor)
    throws CoreException;
  
  /**
   * @deprecated
   */
  public abstract void synchronousStop(boolean paramBoolean);
  
  /**
   * @deprecated
   */
  public abstract void synchronousRestart(String paramString, IProgressMonitor paramIProgressMonitor)
    throws CoreException;
  
  public static abstract interface IOperationListener
  {
    public abstract void done(IStatus paramIStatus);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IServer
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import java.util.List;
import java.util.Map;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;

public abstract interface IServerAttributes
  extends IAdaptable
{
  public abstract String getName();
  
  public abstract String getId();
  
  public abstract void delete()
    throws CoreException;
  
  public abstract boolean isReadOnly();
  
  public abstract boolean isWorkingCopy();
  
  public abstract Object getAdapter(Class paramClass);
  
  public abstract Object loadAdapter(Class paramClass, IProgressMonitor paramIProgressMonitor);
  
  public abstract String getHost();
  
  public abstract IRuntime getRuntime();
  
  public abstract IServerType getServerType();
  
  public abstract IFolder getServerConfiguration();
  
  public abstract IServerWorkingCopy createWorkingCopy();
  
  public abstract IModule[] getModules();
  
  public abstract IStatus canModifyModules(IModule[] paramArrayOfIModule1, IModule[] paramArrayOfIModule2, IProgressMonitor paramIProgressMonitor);
  
  public abstract int getAttribute(String paramString, int paramInt);
  
  public abstract boolean getAttribute(String paramString, boolean paramBoolean);
  
  public abstract String getAttribute(String paramString1, String paramString2);
  
  public abstract List<String> getAttribute(String paramString, List<String> paramList);
  
  public abstract Map getAttribute(String paramString, Map paramMap);
  
  public abstract IModule[] getChildModules(IModule[] paramArrayOfIModule, IProgressMonitor paramIProgressMonitor);
  
  public abstract IModule[] getRootModules(IModule paramIModule, IProgressMonitor paramIProgressMonitor)
    throws CoreException;
  
  public abstract ServerPort[] getServerPorts(IProgressMonitor paramIProgressMonitor);
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IServerAttributes
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

public abstract interface IServerLifecycleListener
{
  public abstract void serverAdded(IServer paramIServer);
  
  public abstract void serverChanged(IServer paramIServer);
  
  public abstract void serverRemoved(IServer paramIServer);
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IServerLifecycleListener
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

public abstract interface IServerListener
{
  public abstract void serverChanged(ServerEvent paramServerEvent);
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IServerListener
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;

public abstract interface IServerType
{
  public abstract String getId();
  
  public abstract String getName();
  
  public abstract String getDescription();
  
  public abstract IRuntimeType getRuntimeType();
  
  public abstract boolean hasRuntime();
  
  public abstract boolean supportsLaunchMode(String paramString);
  
  public abstract boolean hasServerConfiguration();
  
  public abstract boolean supportsRemoteHosts();
  
  public abstract IServerWorkingCopy createServer(String paramString, IFile paramIFile, IRuntime paramIRuntime, IProgressMonitor paramIProgressMonitor)
    throws CoreException;
  
  public abstract IServerWorkingCopy createServer(String paramString, IFile paramIFile, IProgressMonitor paramIProgressMonitor)
    throws CoreException;
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IServerType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import java.beans.PropertyChangeListener;
import java.util.List;
import java.util.Map;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;

public abstract interface IServerWorkingCopy
  extends IServerAttributes
{
  public static final int SAVE_CONFLICT = 1;
  
  public abstract void setName(String paramString);
  
  public abstract void setReadOnly(boolean paramBoolean);
  
  public abstract boolean isDirty();
  
  public abstract void addPropertyChangeListener(PropertyChangeListener paramPropertyChangeListener);
  
  public abstract void removePropertyChangeListener(PropertyChangeListener paramPropertyChangeListener);
  
  public abstract void setServerConfiguration(IFolder paramIFolder);
  
  public abstract IServer getOriginal();
  
  public abstract IServer save(boolean paramBoolean, IProgressMonitor paramIProgressMonitor)
    throws CoreException;
  
  public abstract IServer saveAll(boolean paramBoolean, IProgressMonitor paramIProgressMonitor)
    throws CoreException;
  
  public abstract void setRuntime(IRuntime paramIRuntime);
  
  public abstract void setAttribute(String paramString, int paramInt);
  
  public abstract void setAttribute(String paramString, boolean paramBoolean);
  
  public abstract void setAttribute(String paramString1, String paramString2);
  
  public abstract void setAttribute(String paramString, List<String> paramList);
  
  public abstract void setAttribute(String paramString, Map paramMap);
  
  public abstract void setHost(String paramString);
  
  public abstract void modifyModules(IModule[] paramArrayOfIModule1, IModule[] paramArrayOfIModule2, IProgressMonitor paramIProgressMonitor)
    throws CoreException;
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.IServerWorkingCopy
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

class ServerCore$1
  implements IProjectProperties
{
  public IRuntime getRuntimeTarget()
  {
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.ServerCore.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import org.eclipse.core.runtime.IExtensionDelta;
import org.eclipse.core.runtime.IRegistryChangeEvent;
import org.eclipse.core.runtime.IRegistryChangeListener;

public class ServerCore$RegistryChangeListener
  implements IRegistryChangeListener
{
  public void registryChanged(IRegistryChangeEvent event)
  {
    IExtensionDelta[] deltas = event.getExtensionDeltas("org.eclipse.wst.server.core", "runtimeTypes");
    IExtensionDelta[] arrayOfIExtensionDelta1;
    int j;
    int i;
    if (deltas != null)
    {
      j = (arrayOfIExtensionDelta1 = deltas).length;
      for (i = 0; i < j; i++)
      {
        IExtensionDelta delta = arrayOfIExtensionDelta1[i];
        ServerCore.handleRuntimeTypeDelta(delta);
      }
    }
    deltas = event.getExtensionDeltas("org.eclipse.wst.server.core", "serverTypes");
    if (deltas != null)
    {
      j = (arrayOfIExtensionDelta1 = deltas).length;
      for (i = 0; i < j; i++)
      {
        IExtensionDelta delta = arrayOfIExtensionDelta1[i];
        ServerCore.handleServerTypeDelta(delta);
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.ServerCore.RegistryChangeListener
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionDelta;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IRegistryChangeEvent;
import org.eclipse.core.runtime.IRegistryChangeListener;
import org.eclipse.core.runtime.Platform;
import org.eclipse.wst.server.core.internal.ModuleProperties;
import org.eclipse.wst.server.core.internal.PublishController;
import org.eclipse.wst.server.core.internal.ResourceManager;
import org.eclipse.wst.server.core.internal.RuntimeType;
import org.eclipse.wst.server.core.internal.ServerPlugin;
import org.eclipse.wst.server.core.internal.ServerPreferences;
import org.eclipse.wst.server.core.internal.ServerType;
import org.eclipse.wst.server.core.internal.Trace;

public final class ServerCore
{
  private static final String EXTENSION_SERVER_TYPE = "serverTypes";
  private static final String EXTENSION_RUNTIME_TYPE = "runtimeTypes";
  private static List<IRuntimeType> runtimeTypes;
  private static List<IServerType> serverTypes;
  private static IRegistryChangeListener registryListener;
  
  protected static class RegistryChangeListener
    implements IRegistryChangeListener
  {
    public void registryChanged(IRegistryChangeEvent event)
    {
      IExtensionDelta[] deltas = event.getExtensionDeltas("org.eclipse.wst.server.core", "runtimeTypes");
      IExtensionDelta[] arrayOfIExtensionDelta1;
      int j;
      int i;
      if (deltas != null)
      {
        j = (arrayOfIExtensionDelta1 = deltas).length;
        for (i = 0; i < j; i++)
        {
          IExtensionDelta delta = arrayOfIExtensionDelta1[i];
          ServerCore.handleRuntimeTypeDelta(delta);
        }
      }
      deltas = event.getExtensionDeltas("org.eclipse.wst.server.core", "serverTypes");
      if (deltas != null)
      {
        j = (arrayOfIExtensionDelta1 = deltas).length;
        for (i = 0; i < j; i++)
        {
          IExtensionDelta delta = arrayOfIExtensionDelta1[i];
          ServerCore.handleServerTypeDelta(delta);
        }
      }
    }
  }
  
  private static final ResourceManager getResourceManager()
  {
    return ResourceManager.getInstance();
  }
  
  /**
   * @deprecated
   */
  public static IProjectProperties getProjectProperties(IProject project)
  {
    if (project == null) {
      throw new IllegalArgumentException();
    }
    new IProjectProperties()
    {
      public IRuntime getRuntimeTarget()
      {
        return null;
      }
    };
  }
  
  public static IRuntimeType[] getRuntimeTypes()
  {
    if (runtimeTypes == null) {
      loadRuntimeTypes();
    }
    IRuntimeType[] rt = new IRuntimeType[runtimeTypes.size()];
    runtimeTypes.toArray(rt);
    return rt;
  }
  
  public static IRuntimeType findRuntimeType(String id)
  {
    if (id == null) {
      throw new IllegalArgumentException();
    }
    if (runtimeTypes == null) {
      loadRuntimeTypes();
    }
    Iterator iterator = runtimeTypes.iterator();
    while (iterator.hasNext())
    {
      IRuntimeType runtimeType = (IRuntimeType)iterator.next();
      if (id.equals(runtimeType.getId())) {
        return runtimeType;
      }
    }
    return null;
  }
  
  public static IServerType[] getServerTypes()
  {
    if (serverTypes == null) {
      loadServerTypes();
    }
    IServerType[] st = new IServerType[serverTypes.size()];
    serverTypes.toArray(st);
    return st;
  }
  
  public static IServerType findServerType(String id)
  {
    if (id == null) {
      throw new IllegalArgumentException();
    }
    if (serverTypes == null) {
      loadServerTypes();
    }
    Iterator iterator = serverTypes.iterator();
    while (iterator.hasNext())
    {
      IServerType serverType = (IServerType)iterator.next();
      if (id.equals(serverType.getId())) {
        return serverType;
      }
    }
    return null;
  }
  
  private static synchronized void loadRuntimeTypes()
  {
    if (runtimeTypes != null) {
      return;
    }
    if (Trace.EXTENSION_POINT) {
      Trace.trace("/extension_point", "->- Loading .runtimeTypes extension point ->-");
    }
    IExtensionRegistry registry = Platform.getExtensionRegistry();
    IConfigurationElement[] cf = registry.getConfigurationElementsFor("org.eclipse.wst.server.core", "runtimeTypes");
    List<IRuntimeType> list = new ArrayList(cf.length);
    addRuntimeTypes(cf, list);
    addRegistryListener();
    runtimeTypes = list;
    if (Trace.EXTENSION_POINT) {
      Trace.trace("/extension_point", "-<- Done loading .runtimeTypes extension point -<-");
    }
  }
  
  private static synchronized void addRuntimeTypes(IConfigurationElement[] cf, List<IRuntimeType> list)
  {
    IConfigurationElement[] arrayOfIConfigurationElement = cf;int j = cf.length;
    for (int i = 0; i < j; i++)
    {
      IConfigurationElement ce = arrayOfIConfigurationElement[i];
      try
      {
        if (!ServerPlugin.contains(ServerPlugin.getExcludedServerAdapters(), ce.getAttribute("id"))) {
          list.add(new RuntimeType(ce));
        }
        if (Trace.EXTENSION_POINT) {
          Trace.trace("/extension_point", "  Loaded runtimeType: " + ce.getAttribute("id"));
        }
      }
      catch (Throwable t)
      {
        if (Trace.SEVERE) {
          Trace.trace("/severe", "  Could not load runtimeType: " + ce.getAttribute("id"), t);
        }
      }
    }
  }
  
  private static synchronized void loadServerTypes()
  {
    if (serverTypes != null) {
      return;
    }
    if (Trace.EXTENSION_POINT) {
      Trace.trace("/extension_point", "->- Loading .serverTypes extension point ->-");
    }
    IExtensionRegistry registry = Platform.getExtensionRegistry();
    IConfigurationElement[] cf = registry.getConfigurationElementsFor("org.eclipse.wst.server.core", "serverTypes");
    List<IServerType> list = new ArrayList(cf.length);
    addServerTypes(cf, list);
    addRegistryListener();
    serverTypes = list;
    if (Trace.EXTENSION_POINT) {
      Trace.trace("/extension_point", "-<- Done loading .serverTypes extension point -<-");
    }
  }
  
  private static synchronized void addServerTypes(IConfigurationElement[] cf, List<IServerType> list)
  {
    IConfigurationElement[] arrayOfIConfigurationElement = cf;int j = cf.length;
    for (int i = 0; i < j; i++)
    {
      IConfigurationElement ce = arrayOfIConfigurationElement[i];
      try
      {
        if (!ServerPlugin.contains(ServerPlugin.getExcludedServerAdapters(), ce.getAttribute("id"))) {
          list.add(new ServerType(ce));
        }
        if (Trace.EXTENSION_POINT) {
          Trace.trace("/extension_point", "  Loaded serverType: " + ce.getAttribute("id"));
        }
      }
      catch (Throwable t)
      {
        if (Trace.SEVERE) {
          Trace.trace("/severe", "  Could not load serverType: " + ce.getAttribute("id"), t);
        }
      }
    }
  }
  
  public static IRuntime findRuntime(String id)
  {
    return getResourceManager().getRuntime(id);
  }
  
  public static IRuntime[] getRuntimes()
  {
    return getResourceManager().getRuntimes();
  }
  
  public static IServer findServer(String id)
  {
    return getResourceManager().getServer(id);
  }
  
  public static IServer[] getServers()
  {
    return getResourceManager().getServers();
  }
  
  public static void addRuntimeLifecycleListener(IRuntimeLifecycleListener listener)
  {
    getResourceManager().addRuntimeLifecycleListener(listener);
  }
  
  public static void removeRuntimeLifecycleListener(IRuntimeLifecycleListener listener)
  {
    getResourceManager().removeRuntimeLifecycleListener(listener);
  }
  
  public static void addServerLifecycleListener(IServerLifecycleListener listener)
  {
    getResourceManager().addServerLifecycleListener(listener);
  }
  
  public static void removeServerLifecycleListener(IServerLifecycleListener listener)
  {
    getResourceManager().removeServerLifecycleListener(listener);
  }
  
  public static IServer getDefaultServer(IModule module)
  {
    return ModuleProperties.getInstance().getDefaultServer(module);
  }
  
  public static void setDefaultServer(IModule module, IServer server, IProgressMonitor monitor)
    throws CoreException
  {
    ModuleProperties.getInstance().setDefaultServer(module, server, monitor);
  }
  
  protected static void handleServerTypeDelta(IExtensionDelta delta)
  {
    if (serverTypes == null) {
      return;
    }
    IConfigurationElement[] cf = delta.getExtension().getConfigurationElements();
    
    List<IServerType> list = new ArrayList(serverTypes);
    if (delta.getKind() == 1)
    {
      addServerTypes(cf, list);
    }
    else
    {
      int size = list.size();
      ServerType[] st = new ServerType[size];
      list.toArray(st);
      int size2 = cf.length;
      for (int i = 0; i < size; i++) {
        for (int j = 0; j < size2; j++) {
          if (st[i].getId().equals(cf[j].getAttribute("id")))
          {
            st[i].dispose();
            list.remove(st[i]);
          }
        }
      }
    }
    serverTypes = list;
    getResourceManager().resolveServers();
  }
  
  protected static void handleRuntimeTypeDelta(IExtensionDelta delta)
  {
    if (runtimeTypes == null) {
      return;
    }
    IConfigurationElement[] cf = delta.getExtension().getConfigurationElements();
    
    List<IRuntimeType> list = new ArrayList(runtimeTypes);
    if (delta.getKind() == 1)
    {
      addRuntimeTypes(cf, list);
    }
    else
    {
      int size = list.size();
      RuntimeType[] rt = new RuntimeType[size];
      list.toArray(rt);
      int size2 = cf.length;
      for (int i = 0; i < size; i++) {
        for (int j = 0; j < size2; j++) {
          if (rt[i].getId().equals(cf[j].getAttribute("id")))
          {
            rt[i].dispose();
            list.remove(rt[i]);
          }
        }
      }
    }
    runtimeTypes = list;
    getResourceManager().resolveRuntimes();
    getResourceManager().resolveServers();
  }
  
  private static void addRegistryListener()
  {
    if (registryListener != null) {
      return;
    }
    registryListener = new RegistryChangeListener();
    IExtensionRegistry registry = Platform.getExtensionRegistry();
    registry.addRegistryChangeListener(registryListener, "org.eclipse.wst.server.core");
    ServerPlugin.setRegistryListener(registryListener);
  }
  
  public static boolean isAutoPublishing()
  {
    return ServerPreferences.getInstance().isAutoPublishing();
  }
  
  public static boolean isPublishRequired(IServer server, IResourceDelta delta2)
  {
    PublishController[] controllers = ServerPlugin.getPublishController();
    if (controllers.length > 0)
    {
      PublishController[] arrayOfPublishController1;
      int j = (arrayOfPublishController1 = controllers).length;
      for (int i = 0; i < j; i++)
      {
        PublishController controller = arrayOfPublishController1[i];
        if ((server.getServerType() != null) && (controller.supportsType(server.getServerType().getId()))) {
          return controller.isPublishRequired(server, delta2);
        }
      }
    }
    return true;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.ServerCore
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import org.eclipse.core.runtime.IStatus;

public class ServerEvent
{
  private IServer server;
  private int kind;
  private IModule[] moduleTree;
  private int state;
  private int publishState;
  private boolean restartState;
  private IStatus status;
  public static final int STATE_CHANGE = 1;
  public static final int PUBLISH_STATE_CHANGE = 2;
  public static final int RESTART_STATE_CHANGE = 4;
  public static final int STATUS_CHANGE = 8;
  public static final int SERVER_CHANGE = 16;
  public static final int MODULE_CHANGE = 32;
  
  public ServerEvent(int kind, IServer server, int state, int publishingState, boolean restartState)
  {
    this.kind = (kind |= 0x10);
    this.server = server;
    this.state = state;
    publishState = publishingState;
    this.restartState = restartState;
    if (server == null) {
      throw new IllegalArgumentException("Server parameter must not be null");
    }
    if ((kind & 0x20) != 0) {
      throw new IllegalArgumentException("Kind parameter invalid");
    }
    checkKind();
  }
  
  public ServerEvent(int kind, IServer server, int state, int publishingState, boolean restartState, IStatus status)
  {
    this.kind = (kind |= 0x10);
    this.server = server;
    this.state = state;
    publishState = publishingState;
    this.restartState = restartState;
    this.status = status;
    if (server == null) {
      throw new IllegalArgumentException("Server parameter must not be null");
    }
    if ((kind & 0x20) != 0) {
      throw new IllegalArgumentException("Kind parameter invalid");
    }
    checkKind();
  }
  
  public ServerEvent(int kind, IServer server, IModule[] module, int state, int publishingState, boolean restartState)
  {
    this.kind = (kind |= 0x20);
    this.server = server;
    moduleTree = module;
    this.state = state;
    publishState = publishingState;
    this.restartState = restartState;
    if ((moduleTree == null) || (moduleTree.length == 0)) {
      throw new IllegalArgumentException("Module parameter invalid");
    }
    if ((kind & 0x10) != 0) {
      throw new IllegalArgumentException("Kind parameter invalid");
    }
    checkKind();
  }
  
  public ServerEvent(int kind, IServer server, IModule[] module, int state, int publishingState, boolean restartState, IStatus status)
  {
    this.kind = (kind |= 0x20);
    this.server = server;
    moduleTree = module;
    this.state = state;
    publishState = publishingState;
    this.restartState = restartState;
    this.status = status;
    if ((moduleTree == null) || (moduleTree.length == 0)) {
      throw new IllegalArgumentException("Module parameter invalid");
    }
    if ((kind & 0x10) != 0) {
      throw new IllegalArgumentException("Kind parameter invalid");
    }
    checkKind();
  }
  
  private void checkKind()
  {
    int i = 0;
    if ((kind & 0x1) != 0) {
      i++;
    }
    if ((kind & 0x4) != 0) {
      i++;
    }
    if ((kind & 0x2) != 0) {
      i++;
    }
    if ((kind & 0x8) != 0) {
      i++;
    }
    if ((i != 0) && (i != 1)) {
      throw new IllegalArgumentException("Kind parameter invalid");
    }
  }
  
  public int getKind()
  {
    return kind;
  }
  
  public IModule[] getModule()
  {
    return moduleTree;
  }
  
  public int getPublishState()
  {
    return publishState;
  }
  
  public boolean getRestartState()
  {
    return restartState;
  }
  
  public int getState()
  {
    return state;
  }
  
  public IStatus getStatus()
  {
    return status;
  }
  
  public IServer getServer()
  {
    return server;
  }
  
  public String toString()
  {
    return 
    
      "<Server-Event id=" + hashCode() + " kind=" + getKind() + " server=" + getServer() + " module=" + getModule() + " state=" + getState() + " publishState=" + getPublishState() + " restartState=" + getRestartState() + " status=" + getStatus() + ">";
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.ServerEvent
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

public class ServerPort
{
  private String id;
  private String name;
  private int port;
  private String protocol;
  private String[] contentTypes;
  private boolean advanced;
  
  public ServerPort(String id, String name, int port, String protocol)
  {
    this(id, name, port, protocol, null, true);
  }
  
  public ServerPort(String id, String name, int port, String protocol, String[] contentTypes, boolean advanced)
  {
    this.id = id;
    this.name = name;
    this.port = port;
    this.protocol = protocol;
    this.contentTypes = contentTypes;
    this.advanced = advanced;
  }
  
  public String getId()
  {
    return id;
  }
  
  public String getName()
  {
    return name;
  }
  
  public int getPort()
  {
    return port;
  }
  
  public String getProtocol()
  {
    return protocol;
  }
  
  public String[] getContentTypes()
  {
    return contentTypes;
  }
  
  public boolean isAdvanced()
  {
    return advanced;
  }
  
  public boolean equals(Object obj)
  {
    if (!(obj instanceof ServerPort)) {
      return false;
    }
    ServerPort sp = (ServerPort)obj;
    return port == port;
  }
  
  public int hashCode()
  {
    return port;
  }
  
  public String toString()
  {
    return "ServerPort [" + getName() + ", " + getId() + ", " + getPort() + ", " + getProtocol() + "]";
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.ServerPort
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import org.eclipse.wst.server.core.internal.IModuleVisitor;

class ServerUtil$1
  implements IModuleVisitor
{
  ServerUtil$1(IModule paramIModule, boolean[] paramArrayOfBoolean) {}
  
  public boolean visit(IModule[] modules)
  {
    int size = modules.length;
    if (modules[(size - 1)].equals(val$module))
    {
      val$b[0] = true;
      return false;
    }
    return true;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.wst.server.core.ServerUtil.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.wst.server.core;

import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.server.core.internal.IModuleVisitor;
import org.eclipse.wst.server.core.internal.Messages;
import org.eclipse.wst.server.core.internal.ModuleFactory;
import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
import org.eclipse.wst.server.core.internal.Server;
import org.eclipse.wst.server.core.internal.ServerMonitorManager;
import org.eclipse.wst.server.core.internal.ServerPlugin;
import org.eclipse.wst.server.core.internal.Trace;

public class ServerUtil
{
  public static final Object SERVER_JOB_FAMILY = "org.eclipse.wst.server.core";
  
  public static IModule getModule(IProject project)
  {
    if (project == null) {
      throw new IllegalArgumentException();
    }
    IModule[] modules = getModules(project);
    if ((modules != null) && (modules.length > 0)) {
      return modules[0];
    }
    return null;
  }
  
  public static IModule[] getModules(IProject project)
  {
    if (project == null) {
      throw new IllegalArgumentException();
    }
    List<IModule> list = new ArrayList();
    
    ModuleFactory[] factories = ServerPlugin.getModuleFactories();
    if (factories != null)
    {
      ModuleFactory[] arrayOfModuleFactory1;
      int j = (arrayOfModuleFactory1 = factories).length;
      for (int i = 0; i < j; i++)
      {
        ModuleFactory factory = arrayOfModuleFactory1[i];
        if (factory.isEnabled(project, null))
        {
          IModule[] modules = factory.getModules(project, null);
          if (modules != null)
          {
            IModule[] arrayOfIModule1;
            int m = (arrayOfIModule1 = modules).length;
            for (int k = 0; k < m; k++)
            {
              IModule module = arrayOfIModule1[k];
              if (!list.contains(module)) {
                list.add(module);
              }
            }
          }
        }
      }
    }
    return (IModule[])list.toArray(new IModule[list.size()]);
  }
  
  public static IModule getModule(String moduleId)
  {
    if (moduleId == null) {
      throw new IllegalArgumentException();
    }
    int index = moduleId.indexOf(":");
    if (index <= 0) {
      return null;
    }
    String factoryId = moduleId.substring(0, index);
    ModuleFactory moduleFactory = ServerPlugin.findModuleFactory(factoryId);
    if (moduleFactory == null) {
      return null;
    }
    String moduleSubId = moduleId.substring(index + 1);
    return moduleFactory.findModule(moduleSubId, null);
  }
  
  public static IModule[] getModules(IModuleType[] moduleTypes)
  {
    List<IModule> list = new ArrayList();
    
    ModuleFactory[] factories = ServerPlugin.getModuleFactories();
    if (factories != null)
    {
      ModuleFactory[] arrayOfModuleFactory1;
      int j = (arrayOfModuleFactory1 = factories).length;
      for (int i = 0; i < j; i++)
      {
        ModuleFactory factory = arrayOfModuleFactory1[i];
        if (isSupportedModule(factory.getModuleTypes(), moduleTypes))
        {
          IModule[
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd