本文整理汇总了Java中org.eclipse.wst.server.core.IServer.PUBLISH_STATE_NONE属性的典型用法代码示例。如果您正苦于以下问题:Java IServer.PUBLISH_STATE_NONE属性的具体用法?Java IServer.PUBLISH_STATE_NONE怎么用?Java IServer.PUBLISH_STATE_NONE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.wst.server.core.IServer
的用法示例。
在下文中一共展示了IServer.PUBLISH_STATE_NONE属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isChildModuleChanged
private boolean isChildModuleChanged(IModule[] module, IProgressMonitor monitor) {
if (module == null || module.length == 0) {
return false;
}
IServer myserver = this.getServer();
IModule[] childModules = myserver.getChildModules(module, monitor);
if (childModules != null && childModules.length > 0) {
// Compose the full structure of the child module
IModule[] currentChild = new IModule[module.length + 1];
for (int i = 0; i < module.length; i++) {
currentChild[i] = module[i];
}
for (IModule child : childModules) {
currentChild[module.length] = child;
if (myserver.getModulePublishState(currentChild) != IServer.PUBLISH_STATE_NONE
|| isChildModuleChanged(currentChild, monitor)) {
return true;
}
}
}
return false;
}
示例2: publishFinish
@Override
protected void publishFinish(IProgressMonitor monitor) throws CoreException {
boolean allPublished = true;
IServer server = getServer();
IModule[] modules = server.getModules();
for (IModule module : modules) {
if (server.getModulePublishState(new IModule[] {module}) != IServer.PUBLISH_STATE_NONE) {
allPublished = false;
}
}
if (allPublished) {
setServerPublishState(IServer.PUBLISH_STATE_NONE);
}
}
示例3: prepareForDeployment
@Override
protected DeploymentConfiguration prepareForDeployment(CloudFoundryApplicationModule appModule,
IProgressMonitor monitor) throws CoreException {
// If the app is already published, just refresh the application
// mapping.
int moduleState = getBehaviour().getServer()
.getModulePublishState(new IModule[] { appModule.getLocalModule() });
if (appModule.isDeployed() && moduleState == IServer.PUBLISH_STATE_NONE) {
getBehaviour().printlnToConsole(appModule, Messages.CONSOLE_APP_FOUND);
getBehaviour().printlnToConsole(appModule,
NLS.bind(Messages.CONSOLE_APP_MAPPING_STARTED, appModule.getDeployedApplicationName()));
try {
getBehaviour().updateModuleWithBasicCloudInfo(appModule.getDeployedApplicationName(), monitor);
getBehaviour().printlnToConsole(appModule,
NLS.bind(Messages.CONSOLE_APP_MAPPING_COMPLETED, appModule.getDeployedApplicationName()));
}
catch (CoreException e) {
// For diagnostic purposes, log as info only.
CloudFoundryPlugin.log(new Status(Status.INFO, CloudFoundryPlugin.PLUGIN_ID,
"CoreException thrown during deployment.", e)); // $NON-NLS-1$
// Do not throw the error. The application may not exist
// anymore. If it is a network error, it will become evident
// in further steps
}
}
else {
CloudFoundryServer cloudServer = getBehaviour().getCloudFoundryServer();
// prompt user for missing details
return CloudFoundryPlugin.getCallback().prepareForDeployment(cloudServer, appModule, monitor);
}
return null;
}
示例4: cleanModuleStates
/**
* Resets the module state of the module and all its children
*/
public void cleanModuleStates(IModule[] modules, IProgressMonitor monitor) {
IServer iServer = this.getServer();
if (iServer != null && iServer instanceof Server) {
Server server = (Server) iServer;
final ServerPublishInfo info = server.getServerPublishInfo();
info.startCaching();
info.clearCache();
info.fill(modules);
// The visit below will iterate through all children modules
final List<IModule[]> modules2 = new ArrayList<IModule[]>();
server.visit(new IModuleVisitor() {
public boolean visit(IModule[] module) {
info.fill(module);
modules2.add(module);
return true;
}
}, monitor);
info.removeDeletedModulePublishInfo(server, modules2);
info.save();
super.setModulePublishState(modules, IServer.PUBLISH_STATE_NONE);
}
}
示例5: getPublishState
public int getPublishState() {
// if (isExternal()) {
return IServer.PUBLISH_STATE_NONE;
// }
// return IServer.PUBLISH_STATE_UNKNOWN;
}
示例6: prepareForDeployment
@Override
protected DeploymentConfiguration prepareForDeployment(DockerFoundryApplicationModule appModule,
IProgressMonitor monitor) throws CoreException {
// If the app is already published, just refresh the application
// mapping.
int moduleState = getBehaviour().getServer()
.getModulePublishState(new IModule[] { appModule.getLocalModule() });
if (appModule.isDeployed() && moduleState == IServer.PUBLISH_STATE_NONE) {
getBehaviour().printlnToConsole(appModule, Messages.CONSOLE_APP_FOUND);
getBehaviour().printlnToConsole(appModule,
NLS.bind(Messages.CONSOLE_APP_MAPPING_STARTED, appModule.getDeployedApplicationName()));
try {
getBehaviour().updateCloudModule(appModule.getDeployedApplicationName(), monitor);
getBehaviour().printlnToConsole(appModule,
NLS.bind(Messages.CONSOLE_APP_MAPPING_COMPLETED, appModule.getDeployedApplicationName()));
}
catch (CoreException e) {
// Do not log the error. The application may not exist
// anymore. If it is a network error, it will become evident
// in further steps
}
}
else {
try {
DockerFoundryServer cloudServer = getBehaviour().getCloudFoundryServer();
// prompt user for missing details
return DockerFoundryPlugin.getCallback().prepareForDeployment(cloudServer, appModule, monitor);
}
catch (OperationCanceledException oce) {
// Prepare for deployment prompts the user for missing
// information for a non-published app. If a user
// cancels
// delete the application module
getBehaviour().getCloudFoundryServer().doDeleteModules(Arrays.asList(getModules()));
throw oce;
}
}
return null;
}