|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.wst.server.core.ServerUtil
Server utility methods. These static methods can be used to perform common operations on server artifacts.
| Method Summary | |
static boolean |
containsModule(IServer server,
IModule module,
org.eclipse.core.runtime.IProgressMonitor monitor)
Returns true if the given server currently contains the given module. |
static IServer[] |
getAvailableServersForModule(IModule module,
boolean includeErrors,
org.eclipse.core.runtime.IProgressMonitor monitor)
Returns a list of all servers that this deployable is not currently configured on, but could be added to. |
static IModule |
getModule(java.lang.String moduleId)
Returns a module from the given moduleId. |
static IModule[] |
getModules(IModuleType[] moduleTypes)
Return all the available modules from all factories whose type matches the given module types. |
static IModule[] |
getModules(org.eclipse.core.resources.IProject project)
Returns the project modules attached to a project. |
static IModule[] |
getModules(java.lang.String type)
Return all the available modules from all factories whose type matches the given module type id. |
static IRuntime[] |
getRuntimes(java.lang.String type,
java.lang.String version)
Return a list of all runtime targets that match the given type and version. |
static IRuntimeType[] |
getRuntimeTypes(java.lang.String type,
java.lang.String version)
Return a list of all runtime types that match the given type and version. |
static IRuntimeType[] |
getRuntimeTypes(java.lang.String type,
java.lang.String version,
java.lang.String runtimeTypeId)
Return a list of all runtime types that match the given type, version, and partial runtime type id. |
static IServer |
getServer(ILaunchConfiguration configuration)
Returns the server associated with the given launch configuration. |
static IServer[] |
getServersByModule(IModule module,
org.eclipse.core.runtime.IProgressMonitor monitor)
Returns a list of all servers that this module is configured on. |
static org.eclipse.core.resources.IFile |
getUnusedServerFile(org.eclipse.core.resources.IProject project,
IServerType type)
Returns an unused file in the given project. |
static boolean |
isSupportedModule(IModuleType[] moduleTypes,
IModuleType mt)
Returns true if any of the given moduleTypes match the given
module type. |
static boolean |
isSupportedModule(IModuleType[] moduleTypes,
java.lang.String typeId,
java.lang.String versionId)
Returns true if any of the given moduleTypes have the given
module type id and version id. |
static boolean |
isSupportedModule(IModuleType moduleType,
IModuleType mt)
Returns true if the two given module types are compatible. |
static void |
modifyModules(IServerWorkingCopy server,
IModule[] add,
IModule[] remove,
org.eclipse.core.runtime.IProgressMonitor monitor)
Adds or removes modules from a server. |
static void |
setRuntimeDefaultName(IRuntimeWorkingCopy runtime)
Sets a default name on the given runtime. |
static void |
setServerDefaultName(IServerWorkingCopy server)
Sets a default name on the given server. |
static org.eclipse.core.runtime.IStatus |
validateEdit(java.lang.Object context,
IServer server)
Validates whether this server can be editted. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static IModule[] getModules(org.eclipse.core.resources.IProject project)
project - a project
public static IModule getModule(java.lang.String moduleId)
moduleId - a module id
null if the module could not be foundpublic static IModule[] getModules(IModuleType[] moduleTypes)
moduleTypes - an array of module types
public static IModule[] getModules(java.lang.String type)
type - a module type
public static boolean isSupportedModule(IModuleType[] moduleTypes,
java.lang.String typeId,
java.lang.String versionId)
true if any of the given moduleTypes have the given
module type id and version id.
moduleTypes - an array of module typestypeId - a module typeversionId - a module version
true if the module type is supported, and
false otherwise
public static boolean isSupportedModule(IModuleType[] moduleTypes,
IModuleType mt)
true if any of the given moduleTypes match the given
module type.
moduleTypes - an array of modules typesmt - a module type
true if the module type is supported, and
false otherwise
public static boolean isSupportedModule(IModuleType moduleType,
IModuleType mt)
moduleType - a module typemt - a module type
true if the module type is supported, and
false otherwise
public static void modifyModules(IServerWorkingCopy server,
IModule[] add,
IModule[] remove,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
server - a serveradd - an array of modules to add, or null to not add anyremove - an array of modules to remove, or null to not remove anymonitor - a progress monitor, or null if progress
reporting and cancellation are not desired
org.eclipse.core.runtime.CoreExceptionpublic static void setRuntimeDefaultName(IRuntimeWorkingCopy runtime)
runtime - a runtimepublic static void setServerDefaultName(IServerWorkingCopy server)
server - a server
public static org.eclipse.core.resources.IFile getUnusedServerFile(org.eclipse.core.resources.IProject project,
IServerType type)
project - a projecttype - a server type
public static IRuntime[] getRuntimes(java.lang.String type,
java.lang.String version)
type - a module typeversion - a module version
IRuntime
public static IRuntimeType[] getRuntimeTypes(java.lang.String type,
java.lang.String version)
type - a module typeversion - a module version
IRuntimeType
public static IRuntimeType[] getRuntimeTypes(java.lang.String type,
java.lang.String version,
java.lang.String runtimeTypeId)
type - a module typeversion - a module versionruntimeTypeId - the id of a runtime type
IRuntimeType
public static IServer[] getAvailableServersForModule(IModule module,
boolean includeErrors,
org.eclipse.core.runtime.IProgressMonitor monitor)
module - a moduleincludeErrors - true to include servers that returned
errors when trying to add the module, and false otherwisemonitor - a progress monitor, or null if progress
reporting and cancellation are not desired
public static IServer[] getServersByModule(IModule module,
org.eclipse.core.runtime.IProgressMonitor monitor)
module - a modulemonitor - a progress monitor, or null if progress
reporting and cancellation are not desired
IServer
public static boolean containsModule(IServer server,
IModule module,
org.eclipse.core.runtime.IProgressMonitor monitor)
server - a servermodule - a modulemonitor - a progress monitor, or null if progress
reporting and cancellation are not desired
true if the module is contained on the server,
or false otherwise
public static IServer getServer(ILaunchConfiguration configuration)
throws org.eclipse.core.runtime.CoreException
configuration - a launch configuration
null if no server could be found
org.eclipse.core.runtime.CoreException - if there is a problem getting the attribute from
the launch configuration
public static org.eclipse.core.runtime.IStatus validateEdit(java.lang.Object context,
IServer server)
context - the context (Shell)server - the server
IStatus.OK if the server
can be edited, otherwise a status object indicating what when wrong
with the checkout
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||