本文整理了Java中com.sun.enterprise.util.io.FileUtils.makeFriendlyFilename()
方法的一些代码示例,展示了FileUtils.makeFriendlyFilename()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.makeFriendlyFilename()
方法的具体详情如下:
包路径:com.sun.enterprise.util.io.FileUtils
类名称:FileUtils
方法名:makeFriendlyFilename
暂无
代码示例来源:origin: org.glassfish.main.common/common-util
public static String makeFriendlyFilenameNoExtension(String filename) {
int index = filename.lastIndexOf('.');
if (index > 0)
filename = filename.substring(0, index);
return (makeFriendlyFilename(filename));
}
代码示例来源:origin: eclipse-ee4j/glassfish
public static String makeFriendlyFilenameNoExtension(String filename) {
int index = filename.lastIndexOf('.');
if (index > 0)
filename = filename.substring(0, index);
return (makeFriendlyFilename(filename));
}
代码示例来源:origin: org.glassfish.common/common-util
public static String makeFriendlyFilenameNoExtension(String filename) {
int index = filename.lastIndexOf('.');
if (index > 0)
filename = filename.substring(0, index);
return (makeFriendlyFilename(filename));
}
代码示例来源:origin: org.glassfish.deployment/dol
public String getUniqueFriendlyId() {
return FileUtils.makeFriendlyFilename(getModuleName());
}
代码示例来源:origin: org.glassfish.main.deployment/dol
public String getUniqueFriendlyId() {
return FileUtils.makeFriendlyFilename(getModuleName());
}
代码示例来源:origin: org.glassfish.web/web-glue
private String getWebDir(String baseDir) {
if (baseDir == null) {
return null;
}
StringBuilder dir = new StringBuilder(baseDir);
dir.append(File.separator);
com.sun.enterprise.deployment.Application app = _wbd.getApplication();
if (app != null && !app.isVirtual()) {
dir.append(FileUtils.makeFriendlyFilename(
app.getRegistrationName()));
dir.append(File.separator);
dir.append(FileUtils.makeFriendlyFilename(
_wbd.getModuleDescriptor().getArchiveUri()));
} else {
dir.append(FileUtils.makeLegalNoBlankFileName(
_wbd.getModuleID()));
}
return dir.toString();
}
}
代码示例来源:origin: org.glassfish.main.ejb/ejb-container
File out = new File(base, FileUtils.makeFriendlyFilename(name));
if (_logger.isLoggable(Level.FINE)) {
_logger.fine("[DeploymentElement] Exploding jar to: " + out);
代码示例来源:origin: org.glassfish.ejb/ejb-container
File out = new File(base, FileUtils.makeFriendlyFilename(name));
if (_logger.isLoggable(Level.FINE)) {
_logger.fine("[DeploymentElement] Exploding jar to: " + out);
代码示例来源:origin: org.glassfish.connectors/connectors-runtime
public void createActiveResourceAdapterForEmbeddedRar(String rarModuleName) throws ConnectorRuntimeException {
ConnectorDescriptor cdesc = loadConnectorDescriptorForEmbeddedRAR(rarModuleName);
String appName = ConnectorAdminServiceUtils.getApplicationName(rarModuleName);
String rarFileName = ConnectorAdminServiceUtils
.getConnectorModuleName(rarModuleName) + ".rar";
String loc = getResourcesUtil().getApplicationDeployLocation(appName);
loc = loc + File.separator + FileUtils.makeFriendlyFilename(rarFileName);
String path = null;
try {
URI uri = new URI(loc);
path = uri.getPath();
} catch (URISyntaxException use) {
ConnectorRuntimeException cre = new ConnectorRuntimeException("Invalid path [ "+use.getMessage()+" ]");
cre.setStackTrace(use.getStackTrace());
_logger.log(Level.WARNING, cre.getMessage(), cre);
throw cre;
}
// start RA
_runtime.createActiveResourceAdapter(cdesc, rarModuleName, path);
}
代码示例来源:origin: org.glassfish.main.ejb/ejb-container
private void registerEjbCacheProbeProvider() {
String appName = null;
String modName = null;
String ejbName = null;
try {
appName = (ejbDescriptor.getApplication().isVirtual()) ? null
: ejbDescriptor.getApplication().getRegistrationName();
if (appName == null) {
modName = ejbDescriptor.getApplication().getRegistrationName();
} else {
String archiveuri = ejbDescriptor.getEjbBundleDescriptor()
.getModuleDescriptor().getArchiveUri();
modName = com.sun.enterprise.util.io.FileUtils
.makeFriendlyFilename(archiveuri);
}
ejbName = ejbDescriptor.getName();
ProbeProviderFactory probeFactory = ejbContainerUtilImpl.getProbeProviderFactory();
String invokerId = EjbMonitoringUtils.getInvokerId(appName, modName, ejbName);
cacheProbeNotifier = probeFactory.getProbeProvider(EjbCacheProbeProvider.class, invokerId);
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "Got ProbeProvider: " + cacheProbeNotifier.getClass().getName());
}
} catch (Exception ex) {
cacheProbeNotifier = new EjbCacheProbeProvider();
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "Error getting the EjbCacheProbeProvider");
}
}
}
代码示例来源:origin: org.glassfish.main.ejb/ejb-container
CallFlowInfoImpl(BaseContainer container, EjbDescriptor descriptor,
ComponentType compType) {
this.container = container;
this.ejbDescriptor = descriptor;
this.appName = (ejbDescriptor.getApplication().isVirtual()) ? null
: ejbDescriptor.getApplication().getRegistrationName();
String archiveuri = ejbDescriptor.getEjbBundleDescriptor()
.getModuleDescriptor().getArchiveUri();
this.modName = com.sun.enterprise.util.io.FileUtils
.makeFriendlyFilename(archiveuri);
this.ejbName = ejbDescriptor.getName();
this.componentType = compType;
}
代码示例来源:origin: org.glassfish.ejb/ejb-container
CallFlowInfoImpl(BaseContainer container, EjbDescriptor descriptor,
ComponentType compType) {
this.container = container;
this.ejbDescriptor = descriptor;
this.appName = (ejbDescriptor.getApplication().isVirtual()) ? null
: ejbDescriptor.getApplication().getRegistrationName();
String archiveuri = ejbDescriptor.getEjbBundleDescriptor()
.getModuleDescriptor().getArchiveUri();
this.modName = com.sun.enterprise.util.io.FileUtils
.makeFriendlyFilename(archiveuri);
this.ejbName = ejbDescriptor.getName();
this.componentType = compType;
}
代码示例来源:origin: org.glassfish.ejb/ejb-container
getModuleDescriptor().getArchiveUri();
modName =
com.sun.enterprise.util.io.FileUtils.makeFriendlyFilename(archiveuri);
代码示例来源:origin: org.glassfish.main.ejb/ejb-container
getModuleDescriptor().getArchiveUri();
modName =
com.sun.enterprise.util.io.FileUtils.makeFriendlyFilename(archiveuri);
代码示例来源:origin: org.glassfish.web/web-glue
if (wmName.equals(Constants.DEFAULT_WEB_MODULE_NAME)) {
workDir.append("-");
workDir.append(FileUtils.makeFriendlyFilename(vs.getID()));
内容来源于网络,如有侵权,请联系作者删除!