public final class ConfigWebUtil extends Object
Constructor and Description |
---|
ConfigWebUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
checkGeneralReadAccess(ConfigImpl config,
String password) |
static void |
checkGeneralWriteAccess(ConfigImpl config,
String password) |
static Password |
checkPassword(ConfigImpl config,
String type,
String password) |
static String |
createMD5FromResource(Resource resource) |
static String |
fixComponentPath(String path) |
static Mapping[] |
getAllMappings(Config c) |
static Mapping[] |
getAllMappings(PageContext pc) |
static CacheHandlerFactoryCollection |
getCacheHandlerFactories(ConfigWeb config) |
static Resource |
getExistingResource(javax.servlet.ServletContext sc,
String strDir,
String defaultDir,
Resource configDir,
short type,
Config config)
get only a existing file, dont create it
|
static Resource |
getFile(Config config,
Resource directory,
String path,
short type)
touch a file object by the string definition
|
static Resource |
getFile(Resource file,
short type) |
static Object |
getIdMapping(Mapping m) |
static boolean |
hasAccess(Config config,
int type)
has access checks if config object has access to given type
|
static String |
inspectTemplate(short s,
String defaultValue) |
static short |
inspectTemplate(String str,
short defaultValue) |
static boolean |
isDirectory(Resource directory)
checks if file is a directory or not, if directory doesn't exist, it will be created
|
static boolean |
isFile(Resource file)
checks if file is a file or not, if file doesn't exist, it will be created
|
static ApplicationListener |
loadListener(String type,
ApplicationListener defaultValue) |
static String |
replacePlaceholder(String str,
Config config) |
static int |
toListenerMode(String strListenerMode,
int defaultValue) |
static String |
toScopeCascading(short type,
String defaultValue) |
static short |
toScopeCascading(String type,
short defaultValue) |
static String |
translateOldPath(String path) |
public ConfigWebUtil()
public static Resource getFile(Config config, Resource directory, String path, short type)
config
- directory
- path
- type
- public static String replacePlaceholder(String str, Config config)
public static Resource getExistingResource(javax.servlet.ServletContext sc, String strDir, String defaultDir, Resource configDir, short type, Config config)
sc
- strDir
- defaultDir
- configDir
- type
- config
- public static Resource getFile(Resource file, short type)
file
- type
- (FileUtil.TYPE_X)public static boolean isDirectory(Resource directory)
directory
- public static boolean isFile(Resource file)
file
- public static boolean hasAccess(Config config, int type)
config
- type
- public static String translateOldPath(String path)
public static Object getIdMapping(Mapping m)
public static void checkGeneralReadAccess(ConfigImpl config, String password) throws SecurityException
SecurityException
public static void checkGeneralWriteAccess(ConfigImpl config, String password) throws SecurityException
SecurityException
public static Password checkPassword(ConfigImpl config, String type, String password) throws SecurityException
SecurityException
public static String createMD5FromResource(Resource resource) throws IOException
IOException
public static int toListenerMode(String strListenerMode, int defaultValue)
public static ApplicationListener loadListener(String type, ApplicationListener defaultValue)
public static short inspectTemplate(String str, short defaultValue)
public static String inspectTemplate(short s, String defaultValue)
public static short toScopeCascading(String type, short defaultValue)
public static String toScopeCascading(short type, String defaultValue)
public static Mapping[] getAllMappings(PageContext pc)
public static Mapping[] getAllMappings(Config c)
public static CacheHandlerFactoryCollection getCacheHandlerFactories(ConfigWeb config)
public static String fixComponentPath(String path)
Copyright © 2015 Lucee