本文整理了Java中com.sun.enterprise.deployment.Application.setName()
方法的一些代码示例,展示了Application.setName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.setName()
方法的具体详情如下:
包路径:com.sun.enterprise.deployment.Application
类名称:Application
方法名:setName
[英]Reset the display name of this application.
[中]重置此应用程序的显示名称。
代码示例来源:origin: stackoverflow.com
newPack.setName(pack.applicationInfo.loadLabel(packageManager)
.toString());
newPack.setIcon(pack.applicationInfo.loadIcon(packageManager));
代码示例来源:origin: stackoverflow.com
public static Application createApplication(Habitat habitat, String name, ModuleDescriptor < BundleDescriptor > newModule) {
Application application = new Application(habitat);
application.setVirtual(true);
if ((name == null) && (newModule.getDescriptor() != null)) {
name = ((BundleDescriptor)newModule.getDescriptor()).getDisplayName();
}
String untaggedName = VersioningUtils.getUntaggedName(name);
if (name != null) {
application.setDisplayName(untaggedName);
application.setName(untaggedName);
application.setAppName(untaggedName);
}
newModule.setStandalone(true);
newModule.setArchiveUri(untaggedName);
if (newModule.getDescriptor() != null) {
((BundleDescriptor)newModule.getDescriptor()).setApplication(application);
}
application.addModule(newModule);
return application;
}
代码示例来源:origin: org.glassfish.security/security
public void postConstruct() {
//Generate Policy for the Dummy Module
WebBundleDescriptor wbd = new WebBundleDescriptor();
Application application = new Application(habitat);
application.setVirtual(true);
application.setName(DEFAULT_WEB_MODULE_NAME);
application.setRegistrationName(DEFAULT_WEB_MODULE_NAME);
wbd.setApplication(application);
generatePolicy(wbd);
}
private void generatePolicy(WebBundleDescriptor wbd) {
代码示例来源:origin: org.glassfish.deployment/dol
app.setName(appName);
代码示例来源:origin: org.glassfish.main.deployment/dol
app.setName(appName);
代码示例来源:origin: org.glassfish.deployment/dol
/**
* Creates a new application to hold a standalone module
*
* @param name the application name
* @param newModule the standalone module descriptor
* @return the application
*/
public static Application createApplication(Habitat habitat, String name, ModuleDescriptor<BundleDescriptor> newModule) {
// create a new empty application
Application application = new Application(habitat);
application.setVirtual(true);
if (name == null && newModule.getDescriptor() != null) {
name = newModule.getDescriptor().getDisplayName();
}
String untaggedName = VersioningUtils.getUntaggedName(name);
if (name != null) {
application.setDisplayName(untaggedName);
application.setName(untaggedName);
application.setAppName(untaggedName);
}
// add the module to it
newModule.setStandalone(true);
newModule.setArchiveUri(untaggedName);
if (newModule.getDescriptor() != null) {
newModule.getDescriptor().setApplication(application);
}
application.addModule(newModule);
return application;
}
代码示例来源:origin: org.glassfish.main.deployment/dol
if (name != null) {
application.setDisplayName(untaggedName);
application.setName(untaggedName);
application.setAppName(untaggedName);
代码示例来源:origin: org.glassfish.web/web-glue
Application application = new Application(Globals.getDefaultHabitat());
application.setVirtual(true);
application.setName(Constants.DEFAULT_WEB_MODULE_NAME);
wbd.setApplication(application);
内容来源于网络,如有侵权,请联系作者删除!