id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
30,400
lucee/Lucee
core/src/main/java/lucee/runtime/schedule/ScheduleTaskImpl.java
ScheduleTaskImpl.toURL
private static URL toURL(String url, int port) throws MalformedURLException { URL u = HTTPUtil.toURL(url, true); if (port == -1) return u; return new URL(u.getProtocol(), u.getHost(), port, u.getFile()); }
java
private static URL toURL(String url, int port) throws MalformedURLException { URL u = HTTPUtil.toURL(url, true); if (port == -1) return u; return new URL(u.getProtocol(), u.getHost(), port, u.getFile()); }
[ "private", "static", "URL", "toURL", "(", "String", "url", ",", "int", "port", ")", "throws", "MalformedURLException", "{", "URL", "u", "=", "HTTPUtil", ".", "toURL", "(", "url", ",", "true", ")", ";", "if", "(", "port", "==", "-", "1", ")", "return"...
translate a urlString and a port definition to a URL Object @param url URL String @param port URL Port Definition @return returns a URL Object @throws MalformedURLException
[ "translate", "a", "urlString", "and", "a", "port", "definition", "to", "a", "URL", "Object" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/ScheduleTaskImpl.java#L169-L173
30,401
lucee/Lucee
core/src/main/java/lucee/commons/io/res/type/ram/RamResourceProviderOld.java
RamResourceProviderOld.init
@Override public ResourceProvider init(String scheme, Map arguments) { if (!StringUtil.isEmpty(scheme)) this.scheme = scheme; if (arguments != null) { this.arguments = arguments; Object oCaseSensitive = arguments.get("case-sensitive"); if (oCaseSensitive != null) { caseSensitive = Caster.toBoole...
java
@Override public ResourceProvider init(String scheme, Map arguments) { if (!StringUtil.isEmpty(scheme)) this.scheme = scheme; if (arguments != null) { this.arguments = arguments; Object oCaseSensitive = arguments.get("case-sensitive"); if (oCaseSensitive != null) { caseSensitive = Caster.toBoole...
[ "@", "Override", "public", "ResourceProvider", "init", "(", "String", "scheme", ",", "Map", "arguments", ")", "{", "if", "(", "!", "StringUtil", ".", "isEmpty", "(", "scheme", ")", ")", "this", ".", "scheme", "=", "scheme", ";", "if", "(", "arguments", ...
initialize ram resource @param scheme @param arguments @return RamResource
[ "initialize", "ram", "resource" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/res/type/ram/RamResourceProviderOld.java#L55-L77
30,402
lucee/Lucee
core/src/main/java/lucee/runtime/type/scope/ScopeFactory.java
ScopeFactory.toStringScope
public static String toStringScope(int scope, String defaultValue) { switch (scope) { case Scope.SCOPE_APPLICATION: return "application"; case Scope.SCOPE_ARGUMENTS: return "arguments"; case Scope.SCOPE_CALLER: return "caller"; case Scope.SCOPE_CGI: return "cgi"; case Scope.SCOPE_CLIENT: ...
java
public static String toStringScope(int scope, String defaultValue) { switch (scope) { case Scope.SCOPE_APPLICATION: return "application"; case Scope.SCOPE_ARGUMENTS: return "arguments"; case Scope.SCOPE_CALLER: return "caller"; case Scope.SCOPE_CGI: return "cgi"; case Scope.SCOPE_CLIENT: ...
[ "public", "static", "String", "toStringScope", "(", "int", "scope", ",", "String", "defaultValue", ")", "{", "switch", "(", "scope", ")", "{", "case", "Scope", ".", "SCOPE_APPLICATION", ":", "return", "\"application\"", ";", "case", "Scope", ".", "SCOPE_ARGUME...
cast a int scope definition to a string definition @param scope @return
[ "cast", "a", "int", "scope", "definition", "to", "a", "string", "definition" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/scope/ScopeFactory.java#L82-L118
30,403
lucee/Lucee
core/src/main/java/lucee/commons/io/BodyContentStack.java
BodyContentStack.release
public void release() { this.base = null; current = root; current.body = null; current.after = null; current.before = null; }
java
public void release() { this.base = null; current = root; current.body = null; current.after = null; current.before = null; }
[ "public", "void", "release", "(", ")", "{", "this", ".", "base", "=", "null", ";", "current", "=", "root", ";", "current", ".", "body", "=", "null", ";", "current", ".", "after", "=", "null", ";", "current", ".", "before", "=", "null", ";", "}" ]
release the BodyContentStack
[ "release", "the", "BodyContentStack" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/BodyContentStack.java#L59-L65
30,404
lucee/Lucee
core/src/main/java/lucee/commons/io/BodyContentStack.java
BodyContentStack.push
public BodyContent push() { if (current.after == null) { current.after = new Entry(current, new BodyContentImpl(current.body == null ? (JspWriter) base : current.body)); } else { current.after.doDevNull = false; current.after.body.init(current.body == null ? (JspWriter) base : current.body); } curre...
java
public BodyContent push() { if (current.after == null) { current.after = new Entry(current, new BodyContentImpl(current.body == null ? (JspWriter) base : current.body)); } else { current.after.doDevNull = false; current.after.body.init(current.body == null ? (JspWriter) base : current.body); } curre...
[ "public", "BodyContent", "push", "(", ")", "{", "if", "(", "current", ".", "after", "==", "null", ")", "{", "current", ".", "after", "=", "new", "Entry", "(", "current", ",", "new", "BodyContentImpl", "(", "current", ".", "body", "==", "null", "?", "...
push a new BodyContent to Stack @return new BodyContent
[ "push", "a", "new", "BodyContent", "to", "Stack" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/BodyContentStack.java#L72-L82
30,405
lucee/Lucee
core/src/main/java/lucee/commons/color/ColorCaster.java
ColorCaster.contrast
public static int contrast(Color left, Color right) throws ServletException { return (Math.max(left.getRed(), right.getRed()) - Math.min(left.getRed(), right.getRed())) + (Math.max(left.getGreen(), right.getGreen()) - Math.min(left.getGreen(), right.getGreen())) + (Math.max(left.getBlue(), right.getBlue()) - Math....
java
public static int contrast(Color left, Color right) throws ServletException { return (Math.max(left.getRed(), right.getRed()) - Math.min(left.getRed(), right.getRed())) + (Math.max(left.getGreen(), right.getGreen()) - Math.min(left.getGreen(), right.getGreen())) + (Math.max(left.getBlue(), right.getBlue()) - Math....
[ "public", "static", "int", "contrast", "(", "Color", "left", ",", "Color", "right", ")", "throws", "ServletException", "{", "return", "(", "Math", ".", "max", "(", "left", ".", "getRed", "(", ")", ",", "right", ".", "getRed", "(", ")", ")", "-", "Mat...
calculate the contrast between 2 colors @param left @param right @return a int between 0 (badest) and 510 (best) @throws ServletException
[ "calculate", "the", "contrast", "between", "2", "colors" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/color/ColorCaster.java#L41-L45
30,406
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Registry.java
Registry.setAction
public void setAction(String action) throws ApplicationException { action = action.toLowerCase().trim(); if (action.equals("getall")) this.action = ACTION_GET_ALL; else if (action.equals("get")) this.action = ACTION_GET; else if (action.equals("set")) this.action = ACTION_SET; else if (action.equals("delete")) thi...
java
public void setAction(String action) throws ApplicationException { action = action.toLowerCase().trim(); if (action.equals("getall")) this.action = ACTION_GET_ALL; else if (action.equals("get")) this.action = ACTION_GET; else if (action.equals("set")) this.action = ACTION_SET; else if (action.equals("delete")) thi...
[ "public", "void", "setAction", "(", "String", "action", ")", "throws", "ApplicationException", "{", "action", "=", "action", ".", "toLowerCase", "(", ")", ".", "trim", "(", ")", ";", "if", "(", "action", ".", "equals", "(", "\"getall\"", ")", ")", "this"...
set the value action action to the registry @param action value to set @throws ApplicationException
[ "set", "the", "value", "action", "action", "to", "the", "registry" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Registry.java#L115-L122
30,407
lucee/Lucee
core/src/main/java/lucee/runtime/op/Elvis.java
Elvis.operate
public static boolean operate(PageContext pc, String[] varNames) { int scope = VariableInterpreter.scopeString2Int(pc.ignoreScopes(), varNames[0]); return _operate(pc, scope, KeyImpl.toKeyArray(varNames), scope == Scope.SCOPE_UNDEFINED ? 0 : 1); }
java
public static boolean operate(PageContext pc, String[] varNames) { int scope = VariableInterpreter.scopeString2Int(pc.ignoreScopes(), varNames[0]); return _operate(pc, scope, KeyImpl.toKeyArray(varNames), scope == Scope.SCOPE_UNDEFINED ? 0 : 1); }
[ "public", "static", "boolean", "operate", "(", "PageContext", "pc", ",", "String", "[", "]", "varNames", ")", "{", "int", "scope", "=", "VariableInterpreter", ".", "scopeString2Int", "(", "pc", ".", "ignoreScopes", "(", ")", ",", "varNames", "[", "0", "]",...
called by the Elvis operator from the interpreter @param pc @param scope @param varNames @return
[ "called", "by", "the", "Elvis", "operator", "from", "the", "interpreter" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Elvis.java#L63-L66
30,408
lucee/Lucee
core/src/main/java/lucee/runtime/config/ConfigImpl.java
ConfigImpl.setTldFile
protected void setTldFile(Resource fileTld, int dialect) throws TagLibException { if (dialect == CFMLEngine.DIALECT_BOTH) { setTldFile(fileTld, CFMLEngine.DIALECT_CFML); setTldFile(fileTld, CFMLEngine.DIALECT_LUCEE); return; } TagLib[] tlds = dialect == CFMLEngine.DIALECT_CFML ? cfmlTlds : luceeTlds;...
java
protected void setTldFile(Resource fileTld, int dialect) throws TagLibException { if (dialect == CFMLEngine.DIALECT_BOTH) { setTldFile(fileTld, CFMLEngine.DIALECT_CFML); setTldFile(fileTld, CFMLEngine.DIALECT_LUCEE); return; } TagLib[] tlds = dialect == CFMLEngine.DIALECT_CFML ? cfmlTlds : luceeTlds;...
[ "protected", "void", "setTldFile", "(", "Resource", "fileTld", ",", "int", "dialect", ")", "throws", "TagLibException", "{", "if", "(", "dialect", "==", "CFMLEngine", ".", "DIALECT_BOTH", ")", "{", "setTldFile", "(", "fileTld", ",", "CFMLEngine", ".", "DIALECT...
set the optional directory of the tag library deskriptors @param fileTld directory of the tag libray deskriptors @throws TagLibException
[ "set", "the", "optional", "directory", "of", "the", "tag", "library", "deskriptors" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/ConfigImpl.java#L1154-L1209
30,409
lucee/Lucee
core/src/main/java/lucee/runtime/config/ConfigImpl.java
ConfigImpl.setScheduler
protected void setScheduler(CFMLEngine engine, Resource scheduleDirectory) throws PageException { if (scheduleDirectory == null) { if (this.scheduler == null) this.scheduler = new SchedulerImpl(engine, "<?xml version=\"1.0\"?>\n<schedule></schedule>", this); return; } if (!isDirectory(scheduleDirectory)) ...
java
protected void setScheduler(CFMLEngine engine, Resource scheduleDirectory) throws PageException { if (scheduleDirectory == null) { if (this.scheduler == null) this.scheduler = new SchedulerImpl(engine, "<?xml version=\"1.0\"?>\n<schedule></schedule>", this); return; } if (!isDirectory(scheduleDirectory)) ...
[ "protected", "void", "setScheduler", "(", "CFMLEngine", "engine", ",", "Resource", "scheduleDirectory", ")", "throws", "PageException", "{", "if", "(", "scheduleDirectory", "==", "null", ")", "{", "if", "(", "this", ".", "scheduler", "==", "null", ")", "this",...
sets the Schedule Directory @param scheduleDirectory sets the schedule Directory @param logger @throws PageException
[ "sets", "the", "Schedule", "Directory" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/ConfigImpl.java#L1654-L1667
30,410
lucee/Lucee
core/src/main/java/lucee/runtime/config/ConfigImpl.java
ConfigImpl.setLocale
protected void setLocale(String strLocale) { if (strLocale == null) { this.locale = Locale.US; } else { try { this.locale = Caster.toLocale(strLocale); if (this.locale == null) this.locale = Locale.US; } catch (ExpressionException e) { this.locale = Locale.US; } } }
java
protected void setLocale(String strLocale) { if (strLocale == null) { this.locale = Locale.US; } else { try { this.locale = Caster.toLocale(strLocale); if (this.locale == null) this.locale = Locale.US; } catch (ExpressionException e) { this.locale = Locale.US; } } }
[ "protected", "void", "setLocale", "(", "String", "strLocale", ")", "{", "if", "(", "strLocale", "==", "null", ")", "{", "this", ".", "locale", "=", "Locale", ".", "US", ";", "}", "else", "{", "try", "{", "this", ".", "locale", "=", "Caster", ".", "...
sets the locale @param strLocale
[ "sets", "the", "locale" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/ConfigImpl.java#L1699-L1712
30,411
lucee/Lucee
core/src/main/java/lucee/runtime/config/ConfigImpl.java
ConfigImpl.isDirectory
protected boolean isDirectory(Resource directory) { if (directory.exists()) return directory.isDirectory(); try { directory.createDirectory(true); return true; } catch (IOException e) { e.printStackTrace(getErrWriter()); } return false; }
java
protected boolean isDirectory(Resource directory) { if (directory.exists()) return directory.isDirectory(); try { directory.createDirectory(true); return true; } catch (IOException e) { e.printStackTrace(getErrWriter()); } return false; }
[ "protected", "boolean", "isDirectory", "(", "Resource", "directory", ")", "{", "if", "(", "directory", ".", "exists", "(", ")", ")", "return", "directory", ".", "isDirectory", "(", ")", ";", "try", "{", "directory", ".", "createDirectory", "(", "true", ")"...
is file a directory or not, touch if not exist @param directory @return true if existing directory or has created new one
[ "is", "file", "a", "directory", "or", "not", "touch", "if", "not", "exist" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/ConfigImpl.java#L1762-L1772
30,412
lucee/Lucee
core/src/main/java/lucee/runtime/config/ConfigImpl.java
ConfigImpl.createRAMCache
public Cache createRAMCache(Struct arguments) throws IOException { RamCache rc = new RamCache(); if (arguments == null) arguments = new StructImpl(); rc.init(this, "" + CreateUniqueId.invoke(), arguments); return rc; }
java
public Cache createRAMCache(Struct arguments) throws IOException { RamCache rc = new RamCache(); if (arguments == null) arguments = new StructImpl(); rc.init(this, "" + CreateUniqueId.invoke(), arguments); return rc; }
[ "public", "Cache", "createRAMCache", "(", "Struct", "arguments", ")", "throws", "IOException", "{", "RamCache", "rc", "=", "new", "RamCache", "(", ")", ";", "if", "(", "arguments", "==", "null", ")", "arguments", "=", "new", "StructImpl", "(", ")", ";", ...
creates a new RamCache, please make sure to finalize. @param arguments possible arguments are "timeToLiveSeconds", "timeToIdleSeconds" and "controlInterval" @throws IOException
[ "creates", "a", "new", "RamCache", "please", "make", "sure", "to", "finalize", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/ConfigImpl.java#L2994-L2999
30,413
lucee/Lucee
core/src/main/java/lucee/runtime/ComponentImpl.java
ComponentImpl.duplicateDataMember
public static MapPro duplicateDataMember(ComponentImpl c, MapPro map, MapPro newMap, boolean deepCopy) { Iterator it = map.entrySet().iterator(); Map.Entry entry; Object value; while (it.hasNext()) { entry = (Entry) it.next(); value = entry.getValue(); if (!(value instanceof UDF)) { if (deepCopy) ...
java
public static MapPro duplicateDataMember(ComponentImpl c, MapPro map, MapPro newMap, boolean deepCopy) { Iterator it = map.entrySet().iterator(); Map.Entry entry; Object value; while (it.hasNext()) { entry = (Entry) it.next(); value = entry.getValue(); if (!(value instanceof UDF)) { if (deepCopy) ...
[ "public", "static", "MapPro", "duplicateDataMember", "(", "ComponentImpl", "c", ",", "MapPro", "map", ",", "MapPro", "newMap", ",", "boolean", "deepCopy", ")", "{", "Iterator", "it", "=", "map", ".", "entrySet", "(", ")", ".", "iterator", "(", ")", ";", ...
duplicate the datamember in the map, ignores the udfs @param c @param map @param newMap @param deepCopy @return
[ "duplicate", "the", "datamember", "in", "the", "map", "ignores", "the", "udfs" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/ComponentImpl.java#L326-L340
30,414
lucee/Lucee
core/src/main/java/lucee/runtime/ComponentImpl.java
ComponentImpl.init
public void init(PageContext pageContext, ComponentPageImpl componentPage, boolean executeConstr) throws PageException { this.pageSource = componentPage.getPageSource(); // extends if (!StringUtil.isEmpty(properties.extend)) { base = ComponentLoader.searchComponent(pageContext, componentPage.getPageSource(), p...
java
public void init(PageContext pageContext, ComponentPageImpl componentPage, boolean executeConstr) throws PageException { this.pageSource = componentPage.getPageSource(); // extends if (!StringUtil.isEmpty(properties.extend)) { base = ComponentLoader.searchComponent(pageContext, componentPage.getPageSource(), p...
[ "public", "void", "init", "(", "PageContext", "pageContext", ",", "ComponentPageImpl", "componentPage", ",", "boolean", "executeConstr", ")", "throws", "PageException", "{", "this", ".", "pageSource", "=", "componentPage", ".", "getPageSource", "(", ")", ";", "// ...
initalize the Component @param pageContext @param componentPage @throws PageException
[ "initalize", "the", "Component" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/ComponentImpl.java#L368-L435
30,415
lucee/Lucee
core/src/main/java/lucee/runtime/ComponentImpl.java
ComponentImpl.beforeCall
public Variables beforeCall(PageContext pc) { Variables parent = pc.variablesScope(); pc.setVariablesScope(scope); return parent; }
java
public Variables beforeCall(PageContext pc) { Variables parent = pc.variablesScope(); pc.setVariablesScope(scope); return parent; }
[ "public", "Variables", "beforeCall", "(", "PageContext", "pc", ")", "{", "Variables", "parent", "=", "pc", ".", "variablesScope", "(", ")", ";", "pc", ".", "setVariablesScope", "(", "scope", ")", ";", "return", "parent", ";", "}" ]
will be called before executing method or constructor @param pc @return the old scope map
[ "will", "be", "called", "before", "executing", "method", "or", "constructor" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/ComponentImpl.java#L709-L713
30,416
lucee/Lucee
core/src/main/java/lucee/runtime/ComponentImpl.java
ComponentImpl.keySet
public Set<Key> keySet(int access) { Set<Key> set = new LinkedHashSet<Key>(); Map.Entry<Key, Member> entry; Iterator<Entry<Key, Member>> it = _data.entrySet().iterator(); while (it.hasNext()) { entry = it.next(); if (entry.getValue().getAccess() <= access) set.add(entry.getKey()); } return set; }
java
public Set<Key> keySet(int access) { Set<Key> set = new LinkedHashSet<Key>(); Map.Entry<Key, Member> entry; Iterator<Entry<Key, Member>> it = _data.entrySet().iterator(); while (it.hasNext()) { entry = it.next(); if (entry.getValue().getAccess() <= access) set.add(entry.getKey()); } return set; }
[ "public", "Set", "<", "Key", ">", "keySet", "(", "int", "access", ")", "{", "Set", "<", "Key", ">", "set", "=", "new", "LinkedHashSet", "<", "Key", ">", "(", ")", ";", "Map", ".", "Entry", "<", "Key", ",", "Member", ">", "entry", ";", "Iterator",...
list of keys @param c @param access @param doBase @return key set
[ "list", "of", "keys" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/ComponentImpl.java#L771-L781
30,417
lucee/Lucee
core/src/main/java/lucee/runtime/ComponentImpl.java
ComponentImpl.getMember
protected Member getMember(PageContext pc, Collection.Key key, boolean dataMember, boolean superAccess) { // check super if (dataMember && key.equalsIgnoreCase(KeyConstants._super) && isPrivate(pc)) { Component ac = ComponentUtil.getActiveComponent(pc, this); return SuperComponent.superMember((ComponentImpl...
java
protected Member getMember(PageContext pc, Collection.Key key, boolean dataMember, boolean superAccess) { // check super if (dataMember && key.equalsIgnoreCase(KeyConstants._super) && isPrivate(pc)) { Component ac = ComponentUtil.getActiveComponent(pc, this); return SuperComponent.superMember((ComponentImpl...
[ "protected", "Member", "getMember", "(", "PageContext", "pc", ",", "Collection", ".", "Key", "key", ",", "boolean", "dataMember", ",", "boolean", "superAccess", ")", "{", "// check super", "if", "(", "dataMember", "&&", "key", ".", "equalsIgnoreCase", "(", "Ke...
get entry matching key @param access @param keyLowerCase key lower case (case sensitive) @param doBase do check also base component @param dataMember do also check if key super @return matching entry if exists otherwise null
[ "get", "entry", "matching", "key" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/ComponentImpl.java#L877-L889
30,418
lucee/Lucee
core/src/main/java/lucee/runtime/ComponentImpl.java
ComponentImpl.getAccess
private int getAccess(Collection.Key key) { Member member = getMember(ACCESS_PRIVATE, key, false, false); if (member == null) return Component.ACCESS_PRIVATE; return member.getAccess(); }
java
private int getAccess(Collection.Key key) { Member member = getMember(ACCESS_PRIVATE, key, false, false); if (member == null) return Component.ACCESS_PRIVATE; return member.getAccess(); }
[ "private", "int", "getAccess", "(", "Collection", ".", "Key", "key", ")", "{", "Member", "member", "=", "getMember", "(", "ACCESS_PRIVATE", ",", "key", ",", "false", ",", "false", ")", ";", "if", "(", "member", "==", "null", ")", "return", "Component", ...
return the access of a member @param key @return returns the access (Component.ACCESS_REMOTE, ACCESS_PUBLIC, ACCESS_PACKAGE,Component.ACCESS_PRIVATE)
[ "return", "the", "access", "of", "a", "member" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/ComponentImpl.java#L957-L961
30,419
lucee/Lucee
core/src/main/java/lucee/runtime/ComponentImpl.java
ComponentImpl.getAccess
int getAccess(PageContext pc) { if (pc == null) return ACCESS_PUBLIC; if (isPrivate(pc)) return ACCESS_PRIVATE; if (isPackage(pc)) return ACCESS_PACKAGE; return ACCESS_PUBLIC; }
java
int getAccess(PageContext pc) { if (pc == null) return ACCESS_PUBLIC; if (isPrivate(pc)) return ACCESS_PRIVATE; if (isPackage(pc)) return ACCESS_PACKAGE; return ACCESS_PUBLIC; }
[ "int", "getAccess", "(", "PageContext", "pc", ")", "{", "if", "(", "pc", "==", "null", ")", "return", "ACCESS_PUBLIC", ";", "if", "(", "isPrivate", "(", "pc", ")", ")", "return", "ACCESS_PRIVATE", ";", "if", "(", "isPackage", "(", "pc", ")", ")", "re...
returns current access to this component @param pc @return access
[ "returns", "current", "access", "to", "this", "component" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/ComponentImpl.java#L969-L975
30,420
lucee/Lucee
core/src/main/java/lucee/runtime/ComponentImpl.java
ComponentImpl._set
private Object _set(PageContext pc, Collection.Key key, Object value) throws ExpressionException { if (value instanceof Member) { Member m = (Member) value; if (m instanceof UDFPlus) { UDFPlus udf = (UDFPlus) m; if (udf.getAccess() > Component.ACCESS_PUBLIC) udf.setAccess(Component.ACCESS_PUBLIC); _dat...
java
private Object _set(PageContext pc, Collection.Key key, Object value) throws ExpressionException { if (value instanceof Member) { Member m = (Member) value; if (m instanceof UDFPlus) { UDFPlus udf = (UDFPlus) m; if (udf.getAccess() > Component.ACCESS_PUBLIC) udf.setAccess(Component.ACCESS_PUBLIC); _dat...
[ "private", "Object", "_set", "(", "PageContext", "pc", ",", "Collection", ".", "Key", "key", ",", "Object", "value", ")", "throws", "ExpressionException", "{", "if", "(", "value", "instanceof", "Member", ")", "{", "Member", "m", "=", "(", "Member", ")", ...
sets a value to the current Component, dont to base Component @param key @param value @return value set @throws ExpressionException
[ "sets", "a", "value", "to", "the", "current", "Component", "dont", "to", "base", "Component" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/ComponentImpl.java#L1634-L1655
30,421
lucee/Lucee
core/src/main/java/lucee/runtime/ComponentImpl.java
ComponentImpl.readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { boolean pcCreated = false; PageContext pc = ThreadLocalPageContext.get(); try { if (pc == null) { pcCreated = true; ConfigWeb config = (ConfigWeb) ThreadLocalPageContext.getConfig(); Pair[] parr = new Pair[0]; pc = Thr...
java
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { boolean pcCreated = false; PageContext pc = ThreadLocalPageContext.get(); try { if (pc == null) { pcCreated = true; ConfigWeb config = (ConfigWeb) ThreadLocalPageContext.getConfig(); Pair[] parr = new Pair[0]; pc = Thr...
[ "public", "void", "readExternal", "(", "ObjectInput", "in", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "boolean", "pcCreated", "=", "false", ";", "PageContext", "pc", "=", "ThreadLocalPageContext", ".", "get", "(", ")", ";", "try", "{", ...
MUST more native impl
[ "MUST", "more", "native", "impl" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/ComponentImpl.java#L2133-L2204
30,422
lucee/Lucee
core/src/main/java/lucee/transformer/cfml/evaluator/EvaluatorPool.java
EvaluatorPool.add
public void add(TagLibTag libTag, Tag tag, FunctionLib[] flibs, SourceCode cfml) { tags.add(new TagData(libTag, tag, flibs, cfml)); }
java
public void add(TagLibTag libTag, Tag tag, FunctionLib[] flibs, SourceCode cfml) { tags.add(new TagData(libTag, tag, flibs, cfml)); }
[ "public", "void", "add", "(", "TagLibTag", "libTag", ",", "Tag", "tag", ",", "FunctionLib", "[", "]", "flibs", ",", "SourceCode", "cfml", ")", "{", "tags", ".", "add", "(", "new", "TagData", "(", "libTag", ",", "tag", ",", "flibs", ",", "cfml", ")", ...
add a tag to the pool to evaluate at the end
[ "add", "a", "tag", "to", "the", "pool", "to", "evaluate", "at", "the", "end" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/cfml/evaluator/EvaluatorPool.java#L54-L56
30,423
lucee/Lucee
core/src/main/java/lucee/transformer/cfml/evaluator/EvaluatorPool.java
EvaluatorPool.run
public void run() throws TemplateException { { // tags Iterator<TagData> it = tags.iterator(); while (it.hasNext()) { TagData td = it.next(); SourceCode cfml = td.cfml; cfml.setPos(td.pos); try { if (td.libTag.getEvaluator() != null) td.libTag.getEvaluator().evaluate(td.tag, td.libTag, td....
java
public void run() throws TemplateException { { // tags Iterator<TagData> it = tags.iterator(); while (it.hasNext()) { TagData td = it.next(); SourceCode cfml = td.cfml; cfml.setPos(td.pos); try { if (td.libTag.getEvaluator() != null) td.libTag.getEvaluator().evaluate(td.tag, td.libTag, td....
[ "public", "void", "run", "(", ")", "throws", "TemplateException", "{", "{", "// tags", "Iterator", "<", "TagData", ">", "it", "=", "tags", ".", "iterator", "(", ")", ";", "while", "(", "it", ".", "hasNext", "(", ")", ")", "{", "TagData", "td", "=", ...
Die Methode run wird aufgerufen sobald, der CFML Transformer den uebersetzungsprozess angeschlossen hat. Die metode run rauft darauf alle Evaluatoren auf die intern gespeicher wurden und loescht den internen Speicher. @throws TemplateException
[ "Die", "Methode", "run", "wird", "aufgerufen", "sobald", "der", "CFML", "Transformer", "den", "uebersetzungsprozess", "angeschlossen", "hat", ".", "Die", "metode", "run", "rauft", "darauf", "alle", "Evaluatoren", "auf", "die", "intern", "gespeicher", "wurden", "un...
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/cfml/evaluator/EvaluatorPool.java#L70-L116
30,424
lucee/Lucee
core/src/main/java/lucee/runtime/interpreter/ref/util/RefUtil.java
RefUtil.getValue
public static Object[] getValue(PageContext pc, Ref[] refs) throws PageException { Object[] objs = new Object[refs.length]; for (int i = 0; i < refs.length; i++) { objs[i] = refs[i].getValue(pc); } return objs; }
java
public static Object[] getValue(PageContext pc, Ref[] refs) throws PageException { Object[] objs = new Object[refs.length]; for (int i = 0; i < refs.length; i++) { objs[i] = refs[i].getValue(pc); } return objs; }
[ "public", "static", "Object", "[", "]", "getValue", "(", "PageContext", "pc", ",", "Ref", "[", "]", "refs", ")", "throws", "PageException", "{", "Object", "[", "]", "objs", "=", "new", "Object", "[", "refs", ".", "length", "]", ";", "for", "(", "int"...
transalte a Ref array to a Object array @param refs @return objects @throws PageException
[ "transalte", "a", "Ref", "array", "to", "a", "Object", "array" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/interpreter/ref/util/RefUtil.java#L34-L40
30,425
lucee/Lucee
core/src/main/java/lucee/runtime/osgi/OSGiUtil.java
OSGiUtil.installBundle
public static Bundle installBundle(BundleContext context, Resource bundle, boolean checkExistence) throws IOException, BundleException { if (checkExistence) { BundleFile bf = new BundleFile(bundle); if (!bf.isBundle()) throw new BundleException(bundle + " is not a valid bundle!"); Bundle existing = loa...
java
public static Bundle installBundle(BundleContext context, Resource bundle, boolean checkExistence) throws IOException, BundleException { if (checkExistence) { BundleFile bf = new BundleFile(bundle); if (!bf.isBundle()) throw new BundleException(bundle + " is not a valid bundle!"); Bundle existing = loa...
[ "public", "static", "Bundle", "installBundle", "(", "BundleContext", "context", ",", "Resource", "bundle", ",", "boolean", "checkExistence", ")", "throws", "IOException", ",", "BundleException", "{", "if", "(", "checkExistence", ")", "{", "BundleFile", "bf", "=", ...
only installs a bundle, if the bundle does not already exist, if the bundle exists the existing bundle is unloaded first. @param factory @param context @param bundle @return @throws IOException @throws BundleException
[ "only", "installs", "a", "bundle", "if", "the", "bundle", "does", "not", "already", "exist", "if", "the", "bundle", "exists", "the", "existing", "bundle", "is", "unloaded", "first", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/osgi/OSGiUtil.java#L103-L113
30,426
lucee/Lucee
core/src/main/java/lucee/runtime/osgi/OSGiUtil.java
OSGiUtil._loadBundle
private static Bundle _loadBundle(BundleContext context, String path, InputStream is, boolean closeStream) throws BundleException { log(Log.LEVEL_INFO, "add bundle:" + path); try { // we make this very simply so an old loader that is calling this still works return context.installBundle(path, is); } fina...
java
private static Bundle _loadBundle(BundleContext context, String path, InputStream is, boolean closeStream) throws BundleException { log(Log.LEVEL_INFO, "add bundle:" + path); try { // we make this very simply so an old loader that is calling this still works return context.installBundle(path, is); } fina...
[ "private", "static", "Bundle", "_loadBundle", "(", "BundleContext", "context", ",", "String", "path", ",", "InputStream", "is", ",", "boolean", "closeStream", ")", "throws", "BundleException", "{", "log", "(", "Log", ".", "LEVEL_INFO", ",", "\"add bundle:\"", "+...
does not check if the bundle already exists! @param context @param path @param is @param closeStream @return @throws BundleException
[ "does", "not", "check", "if", "the", "bundle", "already", "exists!" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/osgi/OSGiUtil.java#L125-L143
30,427
lucee/Lucee
core/src/main/java/lucee/runtime/osgi/OSGiUtil.java
OSGiUtil.installBundle
public static Bundle installBundle(BundleContext context, InputStream bundleIS, boolean closeStream, boolean checkExistence) throws IOException, BundleException { // store locally to test the bundle String name = System.currentTimeMillis() + ".tmp"; Resource dir = SystemUtil.getTempDirectory(); Resource tmp = dir.g...
java
public static Bundle installBundle(BundleContext context, InputStream bundleIS, boolean closeStream, boolean checkExistence) throws IOException, BundleException { // store locally to test the bundle String name = System.currentTimeMillis() + ".tmp"; Resource dir = SystemUtil.getTempDirectory(); Resource tmp = dir.g...
[ "public", "static", "Bundle", "installBundle", "(", "BundleContext", "context", ",", "InputStream", "bundleIS", ",", "boolean", "closeStream", ",", "boolean", "checkExistence", ")", "throws", "IOException", ",", "BundleException", "{", "// store locally to test the bundle...
only installs a bundle, if the bundle does not already exist, if the bundle exists the existing bundle is unloaded first. the bundle is not stored physically on the system. @param factory @param context @param bundle @return @throws IOException @throws BundleException
[ "only", "installs", "a", "bundle", "if", "the", "bundle", "does", "not", "already", "exist", "if", "the", "bundle", "exists", "the", "existing", "bundle", "is", "unloaded", "first", ".", "the", "bundle", "is", "not", "stored", "physically", "on", "the", "s...
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/osgi/OSGiUtil.java#L156-L172
30,428
lucee/Lucee
core/src/main/java/lucee/runtime/osgi/OSGiUtil.java
OSGiUtil.loadClass
public static Class loadClass(String className, Class defaultValue) { className = className.trim(); CFMLEngine engine = CFMLEngineFactory.getInstance(); BundleCollection bc = engine.getBundleCollection(); // first we try to load the class from the Lucee core try { // load from core return bc.core.loadC...
java
public static Class loadClass(String className, Class defaultValue) { className = className.trim(); CFMLEngine engine = CFMLEngineFactory.getInstance(); BundleCollection bc = engine.getBundleCollection(); // first we try to load the class from the Lucee core try { // load from core return bc.core.loadC...
[ "public", "static", "Class", "loadClass", "(", "String", "className", ",", "Class", "defaultValue", ")", "{", "className", "=", "className", ".", "trim", "(", ")", ";", "CFMLEngine", "engine", "=", "CFMLEngineFactory", ".", "getInstance", "(", ")", ";", "Bun...
tries to load a class with ni bundle definition @param name @param version @param id @param startIfNecessary @return @throws BundleException
[ "tries", "to", "load", "a", "class", "with", "ni", "bundle", "definition" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/osgi/OSGiUtil.java#L269-L349
30,429
lucee/Lucee
core/src/main/java/lucee/runtime/osgi/OSGiUtil.java
OSGiUtil.removeLocalBundle
public static void removeLocalBundle(String name, Version version, boolean removePhysical, boolean doubleTap) throws BundleException { name = name.trim(); CFMLEngine engine = CFMLEngineFactory.getInstance(); CFMLEngineFactory factory = engine.getCFMLEngineFactory(); BundleFile bf = _getBundleFile(factory, name, ve...
java
public static void removeLocalBundle(String name, Version version, boolean removePhysical, boolean doubleTap) throws BundleException { name = name.trim(); CFMLEngine engine = CFMLEngineFactory.getInstance(); CFMLEngineFactory factory = engine.getCFMLEngineFactory(); BundleFile bf = _getBundleFile(factory, name, ve...
[ "public", "static", "void", "removeLocalBundle", "(", "String", "name", ",", "Version", "version", ",", "boolean", "removePhysical", ",", "boolean", "doubleTap", ")", "throws", "BundleException", "{", "name", "=", "name", ".", "trim", "(", ")", ";", "CFMLEngin...
get local bundle, but does not download from update provider! @param name @param version @return @throws BundleException
[ "get", "local", "bundle", "but", "does", "not", "download", "from", "update", "provider!" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/osgi/OSGiUtil.java#L1000-L1023
30,430
lucee/Lucee
core/src/main/java/lucee/runtime/extension/RHExtension.java
RHExtension.move
private void move(Resource ext) throws PageException { Resource trg; Resource trgDir; try { trg = getExtensionFile(config, ext, id, name, version); trgDir = trg.getParentResource(); trgDir.mkdirs(); if (!ext.getParentResource().equals(trgDir)) { if (trg.exists()) trg.delete(); ResourceUtil.mo...
java
private void move(Resource ext) throws PageException { Resource trg; Resource trgDir; try { trg = getExtensionFile(config, ext, id, name, version); trgDir = trg.getParentResource(); trgDir.mkdirs(); if (!ext.getParentResource().equals(trgDir)) { if (trg.exists()) trg.delete(); ResourceUtil.mo...
[ "private", "void", "move", "(", "Resource", "ext", ")", "throws", "PageException", "{", "Resource", "trg", ";", "Resource", "trgDir", ";", "try", "{", "trg", "=", "getExtensionFile", "(", "config", ",", "ext", ",", "id", ",", "name", ",", "version", ")",...
copy the file to extension dir if it is not already there
[ "copy", "the", "file", "to", "extension", "dir", "if", "it", "is", "not", "already", "there" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/extension/RHExtension.java#L237-L253
30,431
lucee/Lucee
core/src/main/java/lucee/commons/io/res/type/cache/CacheResourceCore.java
CacheResourceCore.setData
public void setData(byte[] data, boolean append) { lastModified = System.currentTimeMillis(); // set data if (append) { if (this.data != null && data != null) { byte[] newData = new byte[this.data.length + data.length]; int i = 0; for (; i < this.data.length; i++) { newData[i] = this.data[i]; } ...
java
public void setData(byte[] data, boolean append) { lastModified = System.currentTimeMillis(); // set data if (append) { if (this.data != null && data != null) { byte[] newData = new byte[this.data.length + data.length]; int i = 0; for (; i < this.data.length; i++) { newData[i] = this.data[i]; } ...
[ "public", "void", "setData", "(", "byte", "[", "]", "data", ",", "boolean", "append", ")", "{", "lastModified", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "// set data", "if", "(", "append", ")", "{", "if", "(", "this", ".", "data", "!=", ...
Setzt den Feldnamen data. @param data data @param append
[ "Setzt", "den", "Feldnamen", "data", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/res/type/cache/CacheResourceCore.java#L95-L122
30,432
lucee/Lucee
core/src/main/java/lucee/runtime/security/ScriptProtect.java
ScriptProtect.translate
public static void translate(Struct sct) { Iterator<Entry<Key, Object>> it = sct.entryIterator(); Entry<Key, Object> e; Object value; while (it.hasNext()) { e = it.next(); value = e.getValue(); if (value instanceof String) { sct.setEL(e.getKey(), translate((String) value)); } } }
java
public static void translate(Struct sct) { Iterator<Entry<Key, Object>> it = sct.entryIterator(); Entry<Key, Object> e; Object value; while (it.hasNext()) { e = it.next(); value = e.getValue(); if (value instanceof String) { sct.setEL(e.getKey(), translate((String) value)); } } }
[ "public", "static", "void", "translate", "(", "Struct", "sct", ")", "{", "Iterator", "<", "Entry", "<", "Key", ",", "Object", ">", ">", "it", "=", "sct", ".", "entryIterator", "(", ")", ";", "Entry", "<", "Key", ",", "Object", ">", "e", ";", "Objec...
translate all strig values of the struct i script-protected form @param sct Struct to translate its values
[ "translate", "all", "strig", "values", "of", "the", "struct", "i", "script", "-", "protected", "form" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/security/ScriptProtect.java#L39-L50
30,433
lucee/Lucee
core/src/main/java/lucee/runtime/security/ScriptProtect.java
ScriptProtect.translate
public static String translate(String str) { if (str == null) return ""; // TODO do-while machen int index, last = 0, endIndex; StringBuilder sb = null; String tagName; while ((index = str.indexOf('<', last)) != -1) { // read tagname int len = str.length(); char c; for (endIndex = index + 1; e...
java
public static String translate(String str) { if (str == null) return ""; // TODO do-while machen int index, last = 0, endIndex; StringBuilder sb = null; String tagName; while ((index = str.indexOf('<', last)) != -1) { // read tagname int len = str.length(); char c; for (endIndex = index + 1; e...
[ "public", "static", "String", "translate", "(", "String", "str", ")", "{", "if", "(", "str", "==", "null", ")", "return", "\"\"", ";", "// TODO do-while machen", "int", "index", ",", "last", "=", "0", ",", "endIndex", ";", "StringBuilder", "sb", "=", "nu...
translate string to script-protected form @param str @return translated String
[ "translate", "string", "to", "script", "-", "protected", "form" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/security/ScriptProtect.java#L58-L95
30,434
lucee/Lucee
core/src/main/java/lucee/runtime/listener/AppListenerUtil.java
AppListenerUtil.translateScriptProtect
public static String translateScriptProtect(int scriptProtect) { if (scriptProtect == ApplicationContext.SCRIPT_PROTECT_NONE) return "none"; if (scriptProtect == ApplicationContext.SCRIPT_PROTECT_ALL) return "all"; Array arr = new ArrayImpl(); if ((scriptProtect & ApplicationContext.SCRIPT_PROTECT_CGI) > 0) arr.ap...
java
public static String translateScriptProtect(int scriptProtect) { if (scriptProtect == ApplicationContext.SCRIPT_PROTECT_NONE) return "none"; if (scriptProtect == ApplicationContext.SCRIPT_PROTECT_ALL) return "all"; Array arr = new ArrayImpl(); if ((scriptProtect & ApplicationContext.SCRIPT_PROTECT_CGI) > 0) arr.ap...
[ "public", "static", "String", "translateScriptProtect", "(", "int", "scriptProtect", ")", "{", "if", "(", "scriptProtect", "==", "ApplicationContext", ".", "SCRIPT_PROTECT_NONE", ")", "return", "\"none\"", ";", "if", "(", "scriptProtect", "==", "ApplicationContext", ...
translate int definition of script protect to string definition @param scriptProtect @return
[ "translate", "int", "definition", "of", "script", "protect", "to", "string", "definition" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/listener/AppListenerUtil.java#L491-L507
30,435
lucee/Lucee
core/src/main/java/lucee/runtime/listener/AppListenerUtil.java
AppListenerUtil.translateScriptProtect
public static int translateScriptProtect(String strScriptProtect) { strScriptProtect = strScriptProtect.toLowerCase().trim(); if ("none".equals(strScriptProtect)) return ApplicationContext.SCRIPT_PROTECT_NONE; if ("no".equals(strScriptProtect)) return ApplicationContext.SCRIPT_PROTECT_NONE; if ("false".equals(strS...
java
public static int translateScriptProtect(String strScriptProtect) { strScriptProtect = strScriptProtect.toLowerCase().trim(); if ("none".equals(strScriptProtect)) return ApplicationContext.SCRIPT_PROTECT_NONE; if ("no".equals(strScriptProtect)) return ApplicationContext.SCRIPT_PROTECT_NONE; if ("false".equals(strS...
[ "public", "static", "int", "translateScriptProtect", "(", "String", "strScriptProtect", ")", "{", "strScriptProtect", "=", "strScriptProtect", ".", "toLowerCase", "(", ")", ".", "trim", "(", ")", ";", "if", "(", "\"none\"", ".", "equals", "(", "strScriptProtect"...
translate string definition of script protect to int definition @param strScriptProtect @return
[ "translate", "string", "definition", "of", "script", "protect", "to", "int", "definition" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/listener/AppListenerUtil.java#L515-L537
30,436
lucee/Lucee
loader/src/main/java/lucee/loader/engine/CFMLEngineFactory.java
CFMLEngineFactory.callListeners
private void callListeners(final CFMLEngine engine) { final Iterator<EngineChangeListener> it = listeners.iterator(); while (it.hasNext()) it.next().onUpdate(); }
java
private void callListeners(final CFMLEngine engine) { final Iterator<EngineChangeListener> it = listeners.iterator(); while (it.hasNext()) it.next().onUpdate(); }
[ "private", "void", "callListeners", "(", "final", "CFMLEngine", "engine", ")", "{", "final", "Iterator", "<", "EngineChangeListener", ">", "it", "=", "listeners", ".", "iterator", "(", ")", ";", "while", "(", "it", ".", "hasNext", "(", ")", ")", "it", "....
call all registered listener for update of the engine @param engine
[ "call", "all", "registered", "listener", "for", "update", "of", "the", "engine" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/loader/src/main/java/lucee/loader/engine/CFMLEngineFactory.java#L1126-L1130
30,437
lucee/Lucee
loader/src/main/java/lucee/loader/engine/CFMLEngineFactory.java
CFMLEngineFactory.getResourceRoot
public File getResourceRoot() throws IOException { if (resourceRoot == null) { resourceRoot = new File(_getResourceRoot(), "lucee-server"); if (!resourceRoot.exists()) resourceRoot.mkdirs(); } return resourceRoot; }
java
public File getResourceRoot() throws IOException { if (resourceRoot == null) { resourceRoot = new File(_getResourceRoot(), "lucee-server"); if (!resourceRoot.exists()) resourceRoot.mkdirs(); } return resourceRoot; }
[ "public", "File", "getResourceRoot", "(", ")", "throws", "IOException", "{", "if", "(", "resourceRoot", "==", "null", ")", "{", "resourceRoot", "=", "new", "File", "(", "_getResourceRoot", "(", ")", ",", "\"lucee-server\"", ")", ";", "if", "(", "!", "resou...
return directory to lucee resource root @return lucee root directory @throws IOException
[ "return", "directory", "to", "lucee", "resource", "root" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/loader/src/main/java/lucee/loader/engine/CFMLEngineFactory.java#L1163-L1169
30,438
lucee/Lucee
core/src/main/java/lucee/runtime/type/util/UDFUtil.java
UDFUtil.addFunctionDoc
public static void addFunctionDoc(PageExceptionImpl pe, FunctionLibFunction flf) { ArrayList<FunctionLibFunctionArg> args = flf.getArg(); Iterator<FunctionLibFunctionArg> it = args.iterator(); // Pattern StringBuilder pattern = new StringBuilder(flf.getName()); StringBuilder end = new StringBuilder(); pattern.ap...
java
public static void addFunctionDoc(PageExceptionImpl pe, FunctionLibFunction flf) { ArrayList<FunctionLibFunctionArg> args = flf.getArg(); Iterator<FunctionLibFunctionArg> it = args.iterator(); // Pattern StringBuilder pattern = new StringBuilder(flf.getName()); StringBuilder end = new StringBuilder(); pattern.ap...
[ "public", "static", "void", "addFunctionDoc", "(", "PageExceptionImpl", "pe", ",", "FunctionLibFunction", "flf", ")", "{", "ArrayList", "<", "FunctionLibFunctionArg", ">", "args", "=", "flf", ".", "getArg", "(", ")", ";", "Iterator", "<", "FunctionLibFunctionArg",...
add detailed function documentation to the exception @param pe @param flf
[ "add", "detailed", "function", "documentation", "to", "the", "exception" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/UDFUtil.java#L69-L123
30,439
lucee/Lucee
core/src/main/java/lucee/runtime/timer/Stopwatch.java
Stopwatch.stop
public long stop() { if (isRunning) { long time = _time() - start; total += time; count++; isRunning = false; return time; } return 0; }
java
public long stop() { if (isRunning) { long time = _time() - start; total += time; count++; isRunning = false; return time; } return 0; }
[ "public", "long", "stop", "(", ")", "{", "if", "(", "isRunning", ")", "{", "long", "time", "=", "_time", "(", ")", "-", "start", ";", "total", "+=", "time", ";", "count", "++", ";", "isRunning", "=", "false", ";", "return", "time", ";", "}", "ret...
stops the watch @return returns the current time or 0 if watch not was running
[ "stops", "the", "watch" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/timer/Stopwatch.java#L57-L67
30,440
lucee/Lucee
core/src/main/java/lucee/transformer/library/function/FunctionLibFunction.java
FunctionLibFunction.addArg
public void addArg(FunctionLibFunctionArg arg) { arg.setFunction(this); argument.add(arg); if (arg.getDefaultValue() != null) hasDefaultValues = true; }
java
public void addArg(FunctionLibFunctionArg arg) { arg.setFunction(this); argument.add(arg); if (arg.getDefaultValue() != null) hasDefaultValues = true; }
[ "public", "void", "addArg", "(", "FunctionLibFunctionArg", "arg", ")", "{", "arg", ".", "setFunction", "(", "this", ")", ";", "argument", ".", "add", "(", "arg", ")", ";", "if", "(", "arg", ".", "getDefaultValue", "(", ")", "!=", "null", ")", "hasDefau...
Fuegt der Funktion ein Argument hinzu. @param arg Argument zur Funktion.
[ "Fuegt", "der", "Funktion", "ein", "Argument", "hinzu", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/function/FunctionLibFunction.java#L224-L228
30,441
lucee/Lucee
core/src/main/java/lucee/transformer/library/function/FunctionLibFunction.java
FunctionLibFunction.setFunctionClass
public void setFunctionClass(String value, Identification id, Attributes attrs) { functionCD = ClassDefinitionImpl.toClassDefinition(value, id, attrs); }
java
public void setFunctionClass(String value, Identification id, Attributes attrs) { functionCD = ClassDefinitionImpl.toClassDefinition(value, id, attrs); }
[ "public", "void", "setFunctionClass", "(", "String", "value", ",", "Identification", "id", ",", "Attributes", "attrs", ")", "{", "functionCD", "=", "ClassDefinitionImpl", ".", "toClassDefinition", "(", "value", ",", "id", ",", "attrs", ")", ";", "}" ]
Setzt die Klassendefinition als Zeichenkette, welche diese Funktion implementiert. @param value Klassendefinition als Zeichenkette.
[ "Setzt", "die", "Klassendefinition", "als", "Zeichenkette", "welche", "diese", "Funktion", "implementiert", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/function/FunctionLibFunction.java#L271-L274
30,442
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster.toText
public static Text toText(Document doc, Object o) throws PageException { if (o instanceof Text) return (Text) o; else if (o instanceof CharacterData) return doc.createTextNode(((CharacterData) o).getData()); return doc.createTextNode(Caster.toString(o)); }
java
public static Text toText(Document doc, Object o) throws PageException { if (o instanceof Text) return (Text) o; else if (o instanceof CharacterData) return doc.createTextNode(((CharacterData) o).getData()); return doc.createTextNode(Caster.toString(o)); }
[ "public", "static", "Text", "toText", "(", "Document", "doc", ",", "Object", "o", ")", "throws", "PageException", "{", "if", "(", "o", "instanceof", "Text", ")", "return", "(", "Text", ")", "o", ";", "else", "if", "(", "o", "instanceof", "CharacterData",...
casts a value to a XML Text @param doc XML Document @param o Object to cast @return XML Text Object @throws PageException
[ "casts", "a", "value", "to", "a", "XML", "Text" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L86-L90
30,443
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster.toTextArray
public static Text[] toTextArray(Document doc, Object o) throws PageException { // Node[] if (o instanceof Node[]) { Node[] nodes = (Node[]) o; if (_isAllOfSameType(nodes, Node.TEXT_NODE)) return (Text[]) nodes; Text[] textes = new Text[nodes.length]; for (int i = 0; i < nodes.length; i++) { te...
java
public static Text[] toTextArray(Document doc, Object o) throws PageException { // Node[] if (o instanceof Node[]) { Node[] nodes = (Node[]) o; if (_isAllOfSameType(nodes, Node.TEXT_NODE)) return (Text[]) nodes; Text[] textes = new Text[nodes.length]; for (int i = 0; i < nodes.length; i++) { te...
[ "public", "static", "Text", "[", "]", "toTextArray", "(", "Document", "doc", ",", "Object", "o", ")", "throws", "PageException", "{", "// Node[]", "if", "(", "o", "instanceof", "Node", "[", "]", ")", "{", "Node", "[", "]", "nodes", "=", "(", "Node", ...
casts a value to a XML Text Array @param doc XML Document @param o Object to cast @return XML Text Array @throws PageException
[ "casts", "a", "value", "to", "a", "XML", "Text", "Array" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L106-L138
30,444
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster.toAttr
public static Attr toAttr(Document doc, Object o) throws PageException { if (o instanceof Attr) return (Attr) o; if (o instanceof Struct && ((Struct) o).size() == 1) { Struct sct = (Struct) o; Entry<Key, Object> e = sct.entryIterator().next(); Attr attr = doc.createAttribute(e.getKey().getString()); ...
java
public static Attr toAttr(Document doc, Object o) throws PageException { if (o instanceof Attr) return (Attr) o; if (o instanceof Struct && ((Struct) o).size() == 1) { Struct sct = (Struct) o; Entry<Key, Object> e = sct.entryIterator().next(); Attr attr = doc.createAttribute(e.getKey().getString()); ...
[ "public", "static", "Attr", "toAttr", "(", "Document", "doc", ",", "Object", "o", ")", "throws", "PageException", "{", "if", "(", "o", "instanceof", "Attr", ")", "return", "(", "Attr", ")", "o", ";", "if", "(", "o", "instanceof", "Struct", "&&", "(", ...
casts a value to a XML Attribute Object @param doc XML Document @param o Object to cast @return XML Comment Object @throws PageException
[ "casts", "a", "value", "to", "a", "XML", "Attribute", "Object" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L148-L159
30,445
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster.toAttrArray
public static Attr[] toAttrArray(Document doc, Object o) throws PageException { // Node[] if (o instanceof Node[]) { Node[] nodes = (Node[]) o; if (_isAllOfSameType(nodes, Node.ATTRIBUTE_NODE)) return (Attr[]) nodes; Attr[] attres = new Attr[nodes.length]; for (int i = 0; i < nodes.length; i++) {...
java
public static Attr[] toAttrArray(Document doc, Object o) throws PageException { // Node[] if (o instanceof Node[]) { Node[] nodes = (Node[]) o; if (_isAllOfSameType(nodes, Node.ATTRIBUTE_NODE)) return (Attr[]) nodes; Attr[] attres = new Attr[nodes.length]; for (int i = 0; i < nodes.length; i++) {...
[ "public", "static", "Attr", "[", "]", "toAttrArray", "(", "Document", "doc", ",", "Object", "o", ")", "throws", "PageException", "{", "// Node[]", "if", "(", "o", "instanceof", "Node", "[", "]", ")", "{", "Node", "[", "]", "nodes", "=", "(", "Node", ...
casts a value to a XML Attr Array @param doc XML Document @param o Object to cast @return XML Attr Array @throws PageException
[ "casts", "a", "value", "to", "a", "XML", "Attr", "Array" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L169-L208
30,446
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster.toComment
public static Comment toComment(Document doc, Object o) throws PageException { if (o instanceof Comment) return (Comment) o; else if (o instanceof CharacterData) return doc.createComment(((CharacterData) o).getData()); return doc.createComment(Caster.toString(o)); }
java
public static Comment toComment(Document doc, Object o) throws PageException { if (o instanceof Comment) return (Comment) o; else if (o instanceof CharacterData) return doc.createComment(((CharacterData) o).getData()); return doc.createComment(Caster.toString(o)); }
[ "public", "static", "Comment", "toComment", "(", "Document", "doc", ",", "Object", "o", ")", "throws", "PageException", "{", "if", "(", "o", "instanceof", "Comment", ")", "return", "(", "Comment", ")", "o", ";", "else", "if", "(", "o", "instanceof", "Cha...
casts a value to a XML Comment Object @param doc XML Document @param o Object to cast @return XML Comment Object @throws PageException
[ "casts", "a", "value", "to", "a", "XML", "Comment", "Object" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L218-L222
30,447
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster.toCommentArray
public static Comment[] toCommentArray(Document doc, Object o) throws PageException { // Node[] if (o instanceof Node[]) { Node[] nodes = (Node[]) o; if (_isAllOfSameType(nodes, Node.COMMENT_NODE)) return (Comment[]) nodes; Comment[] comments = new Comment[nodes.length]; for (int i = 0; i < nodes...
java
public static Comment[] toCommentArray(Document doc, Object o) throws PageException { // Node[] if (o instanceof Node[]) { Node[] nodes = (Node[]) o; if (_isAllOfSameType(nodes, Node.COMMENT_NODE)) return (Comment[]) nodes; Comment[] comments = new Comment[nodes.length]; for (int i = 0; i < nodes...
[ "public", "static", "Comment", "[", "]", "toCommentArray", "(", "Document", "doc", ",", "Object", "o", ")", "throws", "PageException", "{", "// Node[]", "if", "(", "o", "instanceof", "Node", "[", "]", ")", "{", "Node", "[", "]", "nodes", "=", "(", "Nod...
casts a value to a XML Comment Array @param doc XML Document @param o Object to cast @return XML Comment Array @throws PageException
[ "casts", "a", "value", "to", "a", "XML", "Comment", "Array" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L232-L264
30,448
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster.toElement
public static Element toElement(Document doc, Object o) throws PageException { if (o instanceof Element) return (Element) o; else if (o instanceof Node) throw new ExpressionException("Object " + Caster.toClassName(o) + " must be a XML Element"); return doc.createElement(Caster.toString(o)); }
java
public static Element toElement(Document doc, Object o) throws PageException { if (o instanceof Element) return (Element) o; else if (o instanceof Node) throw new ExpressionException("Object " + Caster.toClassName(o) + " must be a XML Element"); return doc.createElement(Caster.toString(o)); }
[ "public", "static", "Element", "toElement", "(", "Document", "doc", ",", "Object", "o", ")", "throws", "PageException", "{", "if", "(", "o", "instanceof", "Element", ")", "return", "(", "Element", ")", "o", ";", "else", "if", "(", "o", "instanceof", "Nod...
casts a value to a XML Element @param doc XML Document @param o Object to cast @return XML Element Object @throws PageException
[ "casts", "a", "value", "to", "a", "XML", "Element" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L274-L278
30,449
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster.toNode
@Deprecated public static Node toNode(Object o) throws PageException { if (o instanceof XMLStruct) return ((XMLStruct) o).toNode(); if (o instanceof Node) return (Node) o; throw new CasterException(o, "node"); }
java
@Deprecated public static Node toNode(Object o) throws PageException { if (o instanceof XMLStruct) return ((XMLStruct) o).toNode(); if (o instanceof Node) return (Node) o; throw new CasterException(o, "node"); }
[ "@", "Deprecated", "public", "static", "Node", "toNode", "(", "Object", "o", ")", "throws", "PageException", "{", "if", "(", "o", "instanceof", "XMLStruct", ")", "return", "(", "(", "XMLStruct", ")", "o", ")", ".", "toNode", "(", ")", ";", "if", "(", ...
casts a value to a XML Node @param doc XML Document @param o Object to cast @return XML Element Object @throws PageException @deprecated replaced with toRawNode
[ "casts", "a", "value", "to", "a", "XML", "Node" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L331-L336
30,450
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster.toNode
public static Node toNode(Document doc, Object o, short type) throws PageException { if (Node.TEXT_NODE == type) toText(doc, o); else if (Node.ATTRIBUTE_NODE == type) toAttr(doc, o); else if (Node.COMMENT_NODE == type) toComment(doc, o); else if (Node.ELEMENT_NODE == type) toElement(doc, o); throw new Expression...
java
public static Node toNode(Document doc, Object o, short type) throws PageException { if (Node.TEXT_NODE == type) toText(doc, o); else if (Node.ATTRIBUTE_NODE == type) toAttr(doc, o); else if (Node.COMMENT_NODE == type) toComment(doc, o); else if (Node.ELEMENT_NODE == type) toElement(doc, o); throw new Expression...
[ "public", "static", "Node", "toNode", "(", "Document", "doc", ",", "Object", "o", ",", "short", "type", ")", "throws", "PageException", "{", "if", "(", "Node", ".", "TEXT_NODE", "==", "type", ")", "toText", "(", "doc", ",", "o", ")", ";", "else", "if...
casts a value to a XML Object defined by type parameter @param doc XML Document @param o Object to cast @param type type to cast to @return XML Text Object @throws PageException
[ "casts", "a", "value", "to", "a", "XML", "Object", "defined", "by", "type", "parameter" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L406-L414
30,451
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster.toNodeArray
public static Node[] toNodeArray(Document doc, Object o, short type) throws PageException { if (Node.TEXT_NODE == type) toTextArray(doc, o); else if (Node.ATTRIBUTE_NODE == type) toAttrArray(doc, o); else if (Node.COMMENT_NODE == type) toCommentArray(doc, o); else if (Node.ELEMENT_NODE == type) toElementArray(doc,...
java
public static Node[] toNodeArray(Document doc, Object o, short type) throws PageException { if (Node.TEXT_NODE == type) toTextArray(doc, o); else if (Node.ATTRIBUTE_NODE == type) toAttrArray(doc, o); else if (Node.COMMENT_NODE == type) toCommentArray(doc, o); else if (Node.ELEMENT_NODE == type) toElementArray(doc,...
[ "public", "static", "Node", "[", "]", "toNodeArray", "(", "Document", "doc", ",", "Object", "o", ",", "short", "type", ")", "throws", "PageException", "{", "if", "(", "Node", ".", "TEXT_NODE", "==", "type", ")", "toTextArray", "(", "doc", ",", "o", ")"...
casts a value to a XML Object Array defined by type parameter @param doc XML Document @param o Object to cast @param type type to cast to @return XML Node Array Object @throws PageException
[ "casts", "a", "value", "to", "a", "XML", "Object", "Array", "defined", "by", "type", "parameter" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L425-L433
30,452
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster.writeTo
public static void writeTo(Node node, Resource file) throws PageException { OutputStream os = null; try { os = IOUtil.toBufferedOutputStream(file.getOutputStream()); writeTo(node, new StreamResult(os), false, false, null, null, null); } catch (IOException ioe) { throw Caster.toPageException(ioe); } ...
java
public static void writeTo(Node node, Resource file) throws PageException { OutputStream os = null; try { os = IOUtil.toBufferedOutputStream(file.getOutputStream()); writeTo(node, new StreamResult(os), false, false, null, null, null); } catch (IOException ioe) { throw Caster.toPageException(ioe); } ...
[ "public", "static", "void", "writeTo", "(", "Node", "node", ",", "Resource", "file", ")", "throws", "PageException", "{", "OutputStream", "os", "=", "null", ";", "try", "{", "os", "=", "IOUtil", ".", "toBufferedOutputStream", "(", "file", ".", "getOutputStre...
write a xml Dom to a file @param node @param file @throws PageException
[ "write", "a", "xml", "Dom", "to", "a", "file" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L518-L530
30,453
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster._toNodeArray
private static Node[] _toNodeArray(Document doc, Object o) { if (o instanceof Node) return new Node[] { (Node) o }; // Node[] if (o instanceof Node[]) return ((Node[]) o); // NamedNodeMap else if (o instanceof NamedNodeMap) { NamedNodeMap map = (NamedNodeMap) o; int len = map.getLength(); Node[] nod...
java
private static Node[] _toNodeArray(Document doc, Object o) { if (o instanceof Node) return new Node[] { (Node) o }; // Node[] if (o instanceof Node[]) return ((Node[]) o); // NamedNodeMap else if (o instanceof NamedNodeMap) { NamedNodeMap map = (NamedNodeMap) o; int len = map.getLength(); Node[] nod...
[ "private", "static", "Node", "[", "]", "_toNodeArray", "(", "Document", "doc", ",", "Object", "o", ")", "{", "if", "(", "o", "instanceof", "Node", ")", "return", "new", "Node", "[", "]", "{", "(", "Node", ")", "o", "}", ";", "// Node[]", "if", "(",...
casts a value to a XML named Node Map @param doc XML Document @param o Object to cast @return XML named Node Map Object
[ "casts", "a", "value", "to", "a", "XML", "named", "Node", "Map" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L692-L721
30,454
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster._isAllOfSameType
private static boolean _isAllOfSameType(Node[] nodes, short type) { for (int i = 0; i < nodes.length; i++) { if (nodes[i].getNodeType() != type) return false; } return true; }
java
private static boolean _isAllOfSameType(Node[] nodes, short type) { for (int i = 0; i < nodes.length; i++) { if (nodes[i].getNodeType() != type) return false; } return true; }
[ "private", "static", "boolean", "_isAllOfSameType", "(", "Node", "[", "]", "nodes", ",", "short", "type", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nodes", ".", "length", ";", "i", "++", ")", "{", "if", "(", "nodes", "[", "i", ...
Check if all Node are of the type defnined by para,meter @param nodes nodes to check @param type to compare @return are all of the same type
[ "Check", "if", "all", "Node", "are", "of", "the", "type", "defnined", "by", "para", "meter" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L730-L735
30,455
lucee/Lucee
core/src/main/java/lucee/transformer/library/function/FunctionLibFunctionArg.java
FunctionLibFunctionArg.setRequired
public void setRequired(String value) { value = value.toLowerCase().trim(); required = (value.equals("yes") || value.equals("true")); }
java
public void setRequired(String value) { value = value.toLowerCase().trim(); required = (value.equals("yes") || value.equals("true")); }
[ "public", "void", "setRequired", "(", "String", "value", ")", "{", "value", "=", "value", ".", "toLowerCase", "(", ")", ".", "trim", "(", ")", ";", "required", "=", "(", "value", ".", "equals", "(", "\"yes\"", ")", "||", "value", ".", "equals", "(", ...
Setzt, ob das Argument Pflicht ist oder nicht. @param value Ist das Argument Pflicht.
[ "Setzt", "ob", "das", "Argument", "Pflicht", "ist", "oder", "nicht", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/function/FunctionLibFunctionArg.java#L152-L155
30,456
lucee/Lucee
core/src/main/java/lucee/runtime/net/rpc/server/WSUtil.java
WSUtil.invoke
public static Object invoke(String name, Object[] args) throws PageException { return invoke(null, name, args); }
java
public static Object invoke(String name, Object[] args) throws PageException { return invoke(null, name, args); }
[ "public", "static", "Object", "invoke", "(", "String", "name", ",", "Object", "[", "]", "args", ")", "throws", "PageException", "{", "return", "invoke", "(", "null", ",", "name", ",", "args", ")", ";", "}" ]
used by genertaed bytecode
[ "used", "by", "genertaed", "bytecode" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/rpc/server/WSUtil.java#L12-L14
30,457
lucee/Lucee
core/src/main/java/lucee/commons/sql/SQLUtil.java
SQLUtil.toBlob
public static Blob toBlob(Connection conn, Object value) throws PageException, SQLException { if (value instanceof Blob) return (Blob) value; // Java >= 1.6 if (SystemUtil.JAVA_VERSION >= SystemUtil.JAVA_VERSION_6) { try { Blob blob = conn.createBlob(); blob.setBytes(1, Caster.toBinary(value)); return bl...
java
public static Blob toBlob(Connection conn, Object value) throws PageException, SQLException { if (value instanceof Blob) return (Blob) value; // Java >= 1.6 if (SystemUtil.JAVA_VERSION >= SystemUtil.JAVA_VERSION_6) { try { Blob blob = conn.createBlob(); blob.setBytes(1, Caster.toBinary(value)); return bl...
[ "public", "static", "Blob", "toBlob", "(", "Connection", "conn", ",", "Object", "value", ")", "throws", "PageException", ",", "SQLException", "{", "if", "(", "value", "instanceof", "Blob", ")", "return", "(", "Blob", ")", "value", ";", "// Java >= 1.6", "if"...
create a blog Object @param conn @param value @return @throws PageException @throws SQLException
[ "create", "a", "blog", "Object" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/sql/SQLUtil.java#L124-L146
30,458
lucee/Lucee
core/src/main/java/lucee/commons/sql/SQLUtil.java
SQLUtil.toClob
public static Clob toClob(Connection conn, Object value) throws PageException, SQLException { if (value instanceof Clob) return (Clob) value; // Java >= 1.6 if (SystemUtil.JAVA_VERSION >= SystemUtil.JAVA_VERSION_6) { Clob clob = conn.createClob(); clob.setString(1, Caster.toString(value)); return clob...
java
public static Clob toClob(Connection conn, Object value) throws PageException, SQLException { if (value instanceof Clob) return (Clob) value; // Java >= 1.6 if (SystemUtil.JAVA_VERSION >= SystemUtil.JAVA_VERSION_6) { Clob clob = conn.createClob(); clob.setString(1, Caster.toString(value)); return clob...
[ "public", "static", "Clob", "toClob", "(", "Connection", "conn", ",", "Object", "value", ")", "throws", "PageException", ",", "SQLException", "{", "if", "(", "value", "instanceof", "Clob", ")", "return", "(", "Clob", ")", "value", ";", "// Java >= 1.6", "if"...
create a clob Object @param conn @param value @return @throws PageException @throws SQLException
[ "create", "a", "clob", "Object" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/sql/SQLUtil.java#L157-L172
30,459
lucee/Lucee
core/src/main/java/lucee/commons/date/DateTimeUtil.java
DateTimeUtil.toDateTime
public DateTime toDateTime(double days) { long utc = Math.round(days * DAY_MILLIS); utc -= CF_UNIX_OFFSET; utc -= getLocalTimeZoneOffset(utc); return new DateTimeImpl(utc, false); }
java
public DateTime toDateTime(double days) { long utc = Math.round(days * DAY_MILLIS); utc -= CF_UNIX_OFFSET; utc -= getLocalTimeZoneOffset(utc); return new DateTimeImpl(utc, false); }
[ "public", "DateTime", "toDateTime", "(", "double", "days", ")", "{", "long", "utc", "=", "Math", ".", "round", "(", "days", "*", "DAY_MILLIS", ")", ";", "utc", "-=", "CF_UNIX_OFFSET", ";", "utc", "-=", "getLocalTimeZoneOffset", "(", "utc", ")", ";", "ret...
returns a date time instance by a number, the conversion from the double to date is o the base of the CFML rules. @param days double value to convert to a number @return DateTime Instance
[ "returns", "a", "date", "time", "instance", "by", "a", "number", "the", "conversion", "from", "the", "double", "to", "date", "is", "o", "the", "base", "of", "the", "CFML", "rules", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/date/DateTimeUtil.java#L91-L96
30,460
lucee/Lucee
core/src/main/java/lucee/commons/date/DateTimeUtil.java
DateTimeUtil.toHTTPTimeString
public static String toHTTPTimeString(Date date, boolean oldFormat) { if (oldFormat) { synchronized (HTTP_TIME_STRING_FORMAT_OLD) { return StringUtil.replace(HTTP_TIME_STRING_FORMAT_OLD.format(date), "+00:00", "", true); } } synchronized (HTTP_TIME_STRING_FORMAT) { return StringUtil.replace(HTTP_TIM...
java
public static String toHTTPTimeString(Date date, boolean oldFormat) { if (oldFormat) { synchronized (HTTP_TIME_STRING_FORMAT_OLD) { return StringUtil.replace(HTTP_TIME_STRING_FORMAT_OLD.format(date), "+00:00", "", true); } } synchronized (HTTP_TIME_STRING_FORMAT) { return StringUtil.replace(HTTP_TIM...
[ "public", "static", "String", "toHTTPTimeString", "(", "Date", "date", ",", "boolean", "oldFormat", ")", "{", "if", "(", "oldFormat", ")", "{", "synchronized", "(", "HTTP_TIME_STRING_FORMAT_OLD", ")", "{", "return", "StringUtil", ".", "replace", "(", "HTTP_TIME_...
converts a date to a http time String @param date date to convert @param oldFormat "old" in that context means the format support the existing functionality in CFML like the function getHTTPTimeString, in that format the date parts are separated by a space (like "EE, dd MMM yyyy HH:mm:ss zz"), in the "new" format, the...
[ "converts", "a", "date", "to", "a", "http", "time", "String" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/date/DateTimeUtil.java#L279-L288
30,461
lucee/Lucee
core/src/main/java/lucee/commons/io/res/util/ResourceClassLoader.java
ResourceClassLoader.doURLs
public static URL[] doURLs(Resource[] reses) throws IOException { List<URL> list = new ArrayList<URL>(); for (int i = 0; i < reses.length; i++) { if (reses[i].isDirectory() || "jar".equalsIgnoreCase(ResourceUtil.getExtension(reses[i], null))) list.add(doURL(reses[i])); } return list.toArray(new URL[list.size()...
java
public static URL[] doURLs(Resource[] reses) throws IOException { List<URL> list = new ArrayList<URL>(); for (int i = 0; i < reses.length; i++) { if (reses[i].isDirectory() || "jar".equalsIgnoreCase(ResourceUtil.getExtension(reses[i], null))) list.add(doURL(reses[i])); } return list.toArray(new URL[list.size()...
[ "public", "static", "URL", "[", "]", "doURLs", "(", "Resource", "[", "]", "reses", ")", "throws", "IOException", "{", "List", "<", "URL", ">", "list", "=", "new", "ArrayList", "<", "URL", ">", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";",...
translate resources to url Objects @param reses @return @throws PageException
[ "translate", "resources", "to", "url", "Objects" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/res/util/ResourceClassLoader.java#L82-L89
30,462
lucee/Lucee
core/src/main/java/lucee/runtime/schedule/SchedulerImpl.java
SchedulerImpl.readInAllTasks
private ScheduleTaskImpl[] readInAllTasks() throws PageException { Element root = doc.getDocumentElement(); NodeList children = root.getChildNodes(); ArrayList<ScheduleTaskImpl> list = new ArrayList<ScheduleTaskImpl>(); int len = children.getLength(); for (int i = 0; i < len; i++) { Node n = children.item(i)...
java
private ScheduleTaskImpl[] readInAllTasks() throws PageException { Element root = doc.getDocumentElement(); NodeList children = root.getChildNodes(); ArrayList<ScheduleTaskImpl> list = new ArrayList<ScheduleTaskImpl>(); int len = children.getLength(); for (int i = 0; i < len; i++) { Node n = children.item(i)...
[ "private", "ScheduleTaskImpl", "[", "]", "readInAllTasks", "(", ")", "throws", "PageException", "{", "Element", "root", "=", "doc", ".", "getDocumentElement", "(", ")", ";", "NodeList", "children", "=", "root", ".", "getChildNodes", "(", ")", ";", "ArrayList",...
read in all schedule tasks @return all schedule tasks @throws PageException
[ "read", "in", "all", "schedule", "tasks" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/SchedulerImpl.java#L162-L175
30,463
lucee/Lucee
core/src/main/java/lucee/runtime/schedule/SchedulerImpl.java
SchedulerImpl.readInTask
private ScheduleTaskImpl readInTask(Element el) throws PageException { long timeout = su.toLong(el, "timeout"); if (timeout > 0 && timeout < 1000) timeout *= 1000; if (timeout < 0) timeout = 600000; try { ScheduleTaskImpl st = new ScheduleTaskImpl(this, su.toString(el, "name").trim(), su.toResource(config, el,...
java
private ScheduleTaskImpl readInTask(Element el) throws PageException { long timeout = su.toLong(el, "timeout"); if (timeout > 0 && timeout < 1000) timeout *= 1000; if (timeout < 0) timeout = 600000; try { ScheduleTaskImpl st = new ScheduleTaskImpl(this, su.toString(el, "name").trim(), su.toResource(config, el,...
[ "private", "ScheduleTaskImpl", "readInTask", "(", "Element", "el", ")", "throws", "PageException", "{", "long", "timeout", "=", "su", ".", "toLong", "(", "el", ",", "\"timeout\"", ")", ";", "if", "(", "timeout", ">", "0", "&&", "timeout", "<", "1000", ")...
read in a single task element @param el @return matching task to Element @throws PageException
[ "read", "in", "a", "single", "task", "element" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/SchedulerImpl.java#L184-L201
30,464
lucee/Lucee
core/src/main/java/lucee/runtime/schedule/SchedulerImpl.java
SchedulerImpl.setAttributes
private void setAttributes(Element el, ScheduleTask task) { if (el == null) return; NamedNodeMap atts = el.getAttributes(); for (int i = atts.getLength() - 1; i >= 0; i--) { Attr att = (Attr) atts.item(i); el.removeAttribute(att.getName()); } su.setString(el, "name", task.getTask()); su.setFile(el, "f...
java
private void setAttributes(Element el, ScheduleTask task) { if (el == null) return; NamedNodeMap atts = el.getAttributes(); for (int i = atts.getLength() - 1; i >= 0; i--) { Attr att = (Attr) atts.item(i); el.removeAttribute(att.getName()); } su.setString(el, "name", task.getTask()); su.setFile(el, "f...
[ "private", "void", "setAttributes", "(", "Element", "el", ",", "ScheduleTask", "task", ")", "{", "if", "(", "el", "==", "null", ")", "return", ";", "NamedNodeMap", "atts", "=", "el", ".", "getAttributes", "(", ")", ";", "for", "(", "int", "i", "=", "...
sets all attributes in XML Element from Schedule Task @param el @param task
[ "sets", "all", "attributes", "in", "XML", "Element", "from", "Schedule", "Task" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/SchedulerImpl.java#L229-L259
30,465
lucee/Lucee
core/src/main/java/lucee/runtime/schedule/SchedulerImpl.java
SchedulerImpl.toElement
private Element toElement(ScheduleTask task) { Element el = doc.createElement("task"); setAttributes(el, task); return el; }
java
private Element toElement(ScheduleTask task) { Element el = doc.createElement("task"); setAttributes(el, task); return el; }
[ "private", "Element", "toElement", "(", "ScheduleTask", "task", ")", "{", "Element", "el", "=", "doc", ".", "createElement", "(", "\"task\"", ")", ";", "setAttributes", "(", "el", ",", "task", ")", ";", "return", "el", ";", "}" ]
translate a schedule task object to a XML Element @param task schedule task to translate @return XML Element
[ "translate", "a", "schedule", "task", "object", "to", "a", "XML", "Element" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/SchedulerImpl.java#L267-L271
30,466
lucee/Lucee
core/src/main/java/lucee/commons/io/log/log4j/appender/RollingResourceAppender.java
RollingResourceAppender.rollOver
public void rollOver() { Resource target; Resource file; if (qw != null) { long size = ((CountingQuietWriter) qw).getCount(); LogLog.debug("rolling over count=" + size); // if operation fails, do not roll again until // maxFileSize more bytes are written nextRollover = size + maxFileSize; ...
java
public void rollOver() { Resource target; Resource file; if (qw != null) { long size = ((CountingQuietWriter) qw).getCount(); LogLog.debug("rolling over count=" + size); // if operation fails, do not roll again until // maxFileSize more bytes are written nextRollover = size + maxFileSize; ...
[ "public", "void", "rollOver", "(", ")", "{", "Resource", "target", ";", "Resource", "file", ";", "if", "(", "qw", "!=", "null", ")", "{", "long", "size", "=", "(", "(", "CountingQuietWriter", ")", "qw", ")", ".", "getCount", "(", ")", ";", "LogLog", ...
Implements the usual roll over behavior. <p> If <code>MaxBackupIndex</code> is positive, then files {<code>File.1</code>, ..., <code>File.MaxBackupIndex -1</code>} are renamed to {<code>File.2</code>, ..., <code>File.MaxBackupIndex</code>}. Moreover, <code>File</code> is renamed <code>File.1</code> and closed. A new <...
[ "Implements", "the", "usual", "roll", "over", "behavior", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/log/log4j/appender/RollingResourceAppender.java#L112-L181
30,467
lucee/Lucee
core/src/main/java/lucee/commons/io/log/log4j/appender/RollingResourceAppender.java
RollingResourceAppender.subAppend
@Override protected void subAppend(LoggingEvent event) { super.subAppend(event); if (res != null && qw != null) { long size = ((CountingQuietWriter) qw).getCount(); if (size >= maxFileSize && size >= nextRollover) { rollOver(); } } }
java
@Override protected void subAppend(LoggingEvent event) { super.subAppend(event); if (res != null && qw != null) { long size = ((CountingQuietWriter) qw).getCount(); if (size >= maxFileSize && size >= nextRollover) { rollOver(); } } }
[ "@", "Override", "protected", "void", "subAppend", "(", "LoggingEvent", "event", ")", "{", "super", ".", "subAppend", "(", "event", ")", ";", "if", "(", "res", "!=", "null", "&&", "qw", "!=", "null", ")", "{", "long", "size", "=", "(", "(", "Counting...
This method differentiates RollingFileAppender from its super class. @since 0.9.0
[ "This", "method", "differentiates", "RollingFileAppender", "from", "its", "super", "class", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/log/log4j/appender/RollingResourceAppender.java#L214-L223
30,468
lucee/Lucee
core/src/main/java/lucee/runtime/err/ErrorPagePool.java
ErrorPagePool.getErrorPage
public ErrorPage getErrorPage(PageException pe, short type) { for (int i = pages.size() - 1; i >= 0; i--) { ErrorPageImpl ep = (ErrorPageImpl) pages.get(i); if (ep.getType() == type) { if (type == ErrorPage.TYPE_EXCEPTION) { if (pe.typeEqual(ep.getTypeAsString())) return ep; } else return ep; ...
java
public ErrorPage getErrorPage(PageException pe, short type) { for (int i = pages.size() - 1; i >= 0; i--) { ErrorPageImpl ep = (ErrorPageImpl) pages.get(i); if (ep.getType() == type) { if (type == ErrorPage.TYPE_EXCEPTION) { if (pe.typeEqual(ep.getTypeAsString())) return ep; } else return ep; ...
[ "public", "ErrorPage", "getErrorPage", "(", "PageException", "pe", ",", "short", "type", ")", "{", "for", "(", "int", "i", "=", "pages", ".", "size", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "ErrorPageImpl", "ep", "=", "...
returns the error page @param pe Page Exception @return
[ "returns", "the", "error", "page" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/err/ErrorPagePool.java#L49-L61
30,469
lucee/Lucee
core/src/main/java/lucee/runtime/err/ErrorPagePool.java
ErrorPagePool.removeErrorPage
public void removeErrorPage(PageException pe) { // exception ErrorPage ep = getErrorPage(pe, ErrorPage.TYPE_EXCEPTION); if (ep != null) { pages.remove(ep); hasChanged = true; } // request ep = getErrorPage(pe, ErrorPage.TYPE_REQUEST); if (ep != null) { pages.remove(ep); hasChanged = true; } ...
java
public void removeErrorPage(PageException pe) { // exception ErrorPage ep = getErrorPage(pe, ErrorPage.TYPE_EXCEPTION); if (ep != null) { pages.remove(ep); hasChanged = true; } // request ep = getErrorPage(pe, ErrorPage.TYPE_REQUEST); if (ep != null) { pages.remove(ep); hasChanged = true; } ...
[ "public", "void", "removeErrorPage", "(", "PageException", "pe", ")", "{", "// exception", "ErrorPage", "ep", "=", "getErrorPage", "(", "pe", ",", "ErrorPage", ".", "TYPE_EXCEPTION", ")", ";", "if", "(", "ep", "!=", "null", ")", "{", "pages", ".", "remove"...
remove this error page @param type
[ "remove", "this", "error", "page" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/err/ErrorPagePool.java#L78-L98
30,470
lucee/Lucee
core/src/main/java/lucee/commons/lang/HTMLEntities.java
HTMLEntities.escapeHTML
public static String escapeHTML(String str, short version) { String[][] data; int[] offset; StringBuilder rtn = new StringBuilder(str.length()); char[] chars = str.toCharArray(); if (version == HTMLV20) { data = HTML20_DATA; offset = HTML20_OFFSET; } else if (version == HTMLV32) { data = HTML32_D...
java
public static String escapeHTML(String str, short version) { String[][] data; int[] offset; StringBuilder rtn = new StringBuilder(str.length()); char[] chars = str.toCharArray(); if (version == HTMLV20) { data = HTML20_DATA; offset = HTML20_OFFSET; } else if (version == HTMLV32) { data = HTML32_D...
[ "public", "static", "String", "escapeHTML", "(", "String", "str", ",", "short", "version", ")", "{", "String", "[", "]", "[", "]", "data", ";", "int", "[", "]", "offset", ";", "StringBuilder", "rtn", "=", "new", "StringBuilder", "(", "str", ".", "lengt...
escapes html character inside a string @param str html code to escape @param version HTML Version () @return escaped html code
[ "escapes", "html", "character", "inside", "a", "string" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/HTMLEntities.java#L357-L394
30,471
lucee/Lucee
core/src/main/java/lucee/commons/lang/HTMLEntities.java
HTMLEntities.unescapeHTML
public static String unescapeHTML(String str) { StringBuilder rtn = new StringBuilder(); int posStart = -1; int posFinish = -1; while ((posStart = str.indexOf('&', posStart)) != -1) { int last = posFinish + 1; posFinish = str.indexOf(';', posStart); if (posFinish == -1) break; rtn.append(str.s...
java
public static String unescapeHTML(String str) { StringBuilder rtn = new StringBuilder(); int posStart = -1; int posFinish = -1; while ((posStart = str.indexOf('&', posStart)) != -1) { int last = posFinish + 1; posFinish = str.indexOf(';', posStart); if (posFinish == -1) break; rtn.append(str.s...
[ "public", "static", "String", "unescapeHTML", "(", "String", "str", ")", "{", "StringBuilder", "rtn", "=", "new", "StringBuilder", "(", ")", ";", "int", "posStart", "=", "-", "1", ";", "int", "posFinish", "=", "-", "1", ";", "while", "(", "(", "posStar...
unescapes html character inside a string @param str html code to unescape @return unescaped html code
[ "unescapes", "html", "character", "inside", "a", "string" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/HTMLEntities.java#L402-L424
30,472
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.getClasses
public static Class[] getClasses(Object[] objs) { Class[] cls = new Class[objs.length]; for (int i = 0; i < objs.length; i++) { if (objs[i] == null) cls[i] = Object.class; else cls[i] = objs[i].getClass(); } return cls; }
java
public static Class[] getClasses(Object[] objs) { Class[] cls = new Class[objs.length]; for (int i = 0; i < objs.length; i++) { if (objs[i] == null) cls[i] = Object.class; else cls[i] = objs[i].getClass(); } return cls; }
[ "public", "static", "Class", "[", "]", "getClasses", "(", "Object", "[", "]", "objs", ")", "{", "Class", "[", "]", "cls", "=", "new", "Class", "[", "objs", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "objs", ".", ...
get all Classes from a Object Array @param objs Objects to get @return classes from Objects
[ "get", "all", "Classes", "from", "a", "Object", "Array" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L207-L214
30,473
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.getDspMethods
public static String getDspMethods(Class... clazzArgs) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < clazzArgs.length; i++) { if (i > 0) sb.append(", "); sb.append(Caster.toTypeName(clazzArgs[i])); } return sb.toString(); }
java
public static String getDspMethods(Class... clazzArgs) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < clazzArgs.length; i++) { if (i > 0) sb.append(", "); sb.append(Caster.toTypeName(clazzArgs[i])); } return sb.toString(); }
[ "public", "static", "String", "getDspMethods", "(", "Class", "...", "clazzArgs", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "clazzArgs", ".", "length", ";", "i", "++", "...
creates a string list with class arguments in a displable form @param clazzArgs arguments to display @return list
[ "creates", "a", "string", "list", "with", "class", "arguments", "in", "a", "displable", "form" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L242-L249
30,474
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.like
public static boolean like(Class src, Class trg) { if (src == trg) return true; return isInstaneOf(src, trg); }
java
public static boolean like(Class src, Class trg) { if (src == trg) return true; return isInstaneOf(src, trg); }
[ "public", "static", "boolean", "like", "(", "Class", "src", ",", "Class", "trg", ")", "{", "if", "(", "src", "==", "trg", ")", "return", "true", ";", "return", "isInstaneOf", "(", "src", ",", "trg", ")", ";", "}" ]
checks if src Class is "like" trg class @param src Source Class @param trg Target Class @return is similar
[ "checks", "if", "src", "Class", "is", "like", "trg", "class" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L258-L261
30,475
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.convert
public static Object convert(Object src, Class trgClass, RefInteger rating) throws PageException { if (rating != null) { Object trg = _convert(src, trgClass); if (src == trg) { rating.plus(10); return trg; } if (src == null || trg == null) { rating.plus(0); return trg; } if (isIns...
java
public static Object convert(Object src, Class trgClass, RefInteger rating) throws PageException { if (rating != null) { Object trg = _convert(src, trgClass); if (src == trg) { rating.plus(10); return trg; } if (src == null || trg == null) { rating.plus(0); return trg; } if (isIns...
[ "public", "static", "Object", "convert", "(", "Object", "src", ",", "Class", "trgClass", ",", "RefInteger", "rating", ")", "throws", "PageException", "{", "if", "(", "rating", "!=", "null", ")", "{", "Object", "trg", "=", "_convert", "(", "src", ",", "tr...
convert Object from src to trg Type, if possible @param src Object to convert @param srcClass Source Class @param trgClass Target Class @return converted Object @throws PageException
[ "convert", "Object", "from", "src", "to", "trg", "Type", "if", "possible" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L272-L334
30,476
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.getConstructorInstance
public static ConstructorInstance getConstructorInstance(Class clazz, Object[] args) throws NoSuchMethodException { ConstructorInstance ci = getConstructorInstance(clazz, args, null); if (ci != null) return ci; throw new NoSuchMethodException("No matching Constructor for " + clazz.getName() + "(" + getDspMethods(get...
java
public static ConstructorInstance getConstructorInstance(Class clazz, Object[] args) throws NoSuchMethodException { ConstructorInstance ci = getConstructorInstance(clazz, args, null); if (ci != null) return ci; throw new NoSuchMethodException("No matching Constructor for " + clazz.getName() + "(" + getDspMethods(get...
[ "public", "static", "ConstructorInstance", "getConstructorInstance", "(", "Class", "clazz", ",", "Object", "[", "]", "args", ")", "throws", "NoSuchMethodException", "{", "ConstructorInstance", "ci", "=", "getConstructorInstance", "(", "clazz", ",", "args", ",", "nul...
gets Constructor Instance matching given parameter @param clazz Clazz to Invoke @param args Matching args @return Matching ConstructorInstance @throws NoSuchMethodException @throws PageException
[ "gets", "Constructor", "Instance", "matching", "given", "parameter" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L420-L424
30,477
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.callConstructor
public static Object callConstructor(Class clazz, Object[] args) throws PageException { args = cleanArgs(args); try { return getConstructorInstance(clazz, args).invoke(); } catch (InvocationTargetException e) { Throwable target = e.getTargetException(); if (target instanceof PageException) throw (Pag...
java
public static Object callConstructor(Class clazz, Object[] args) throws PageException { args = cleanArgs(args); try { return getConstructorInstance(clazz, args).invoke(); } catch (InvocationTargetException e) { Throwable target = e.getTargetException(); if (target instanceof PageException) throw (Pag...
[ "public", "static", "Object", "callConstructor", "(", "Class", "clazz", ",", "Object", "[", "]", "args", ")", "throws", "PageException", "{", "args", "=", "cleanArgs", "(", "args", ")", ";", "try", "{", "return", "getConstructorInstance", "(", "clazz", ",", ...
call constructor of a class with matching arguments @param clazz Class to get Instance @param args Arguments for the Class @return invoked Instance @throws PageException
[ "call", "constructor", "of", "a", "class", "with", "matching", "arguments" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L803-L816
30,478
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.callMethod
public static Object callMethod(Object obj, String methodName, Object[] args) throws PageException { return callMethod(obj, KeyImpl.getInstance(methodName), args); }
java
public static Object callMethod(Object obj, String methodName, Object[] args) throws PageException { return callMethod(obj, KeyImpl.getInstance(methodName), args); }
[ "public", "static", "Object", "callMethod", "(", "Object", "obj", ",", "String", "methodName", ",", "Object", "[", "]", "args", ")", "throws", "PageException", "{", "return", "callMethod", "(", "obj", ",", "KeyImpl", ".", "getInstance", "(", "methodName", ")...
calls a Method of a Objct @param obj Object to call Method on it @param methodName Name of the Method to get @param args Arguments of the Method to get @return return return value of the called Method @throws PageException
[ "calls", "a", "Method", "of", "a", "Objct" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L840-L842
30,479
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.callStaticMethod
public static Object callStaticMethod(Class clazz, String methodName, Object[] args) throws PageException { try { return getMethodInstance(null, clazz, methodName, args).invoke(null); } catch (InvocationTargetException e) { Throwable target = e.getTargetException(); if (target instanceof PageException...
java
public static Object callStaticMethod(Class clazz, String methodName, Object[] args) throws PageException { try { return getMethodInstance(null, clazz, methodName, args).invoke(null); } catch (InvocationTargetException e) { Throwable target = e.getTargetException(); if (target instanceof PageException...
[ "public", "static", "Object", "callStaticMethod", "(", "Class", "clazz", ",", "String", "methodName", ",", "Object", "[", "]", "args", ")", "throws", "PageException", "{", "try", "{", "return", "getMethodInstance", "(", "null", ",", "clazz", ",", "methodName",...
calls a Static Method on the given CLass @param clazz Class to call Method on it @param methodName Name of the Method to get @param args Arguments of the Method to get @return return return value of the called Method @throws PageException
[ "calls", "a", "Static", "Method", "on", "the", "given", "CLass" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L923-L935
30,480
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.callSetterEL
public static void callSetterEL(Object obj, String prop, Object value) throws PageException { try { MethodInstance setter = getSetter(obj, prop, value, null); if (setter != null) setter.invoke(obj); } catch (InvocationTargetException e) { Throwable target = e.getTargetException(); if (target inst...
java
public static void callSetterEL(Object obj, String prop, Object value) throws PageException { try { MethodInstance setter = getSetter(obj, prop, value, null); if (setter != null) setter.invoke(obj); } catch (InvocationTargetException e) { Throwable target = e.getTargetException(); if (target inst...
[ "public", "static", "void", "callSetterEL", "(", "Object", "obj", ",", "String", "prop", ",", "Object", "value", ")", "throws", "PageException", "{", "try", "{", "MethodInstance", "setter", "=", "getSetter", "(", "obj", ",", "prop", ",", "value", ",", "nul...
do nothing when not exist @param obj @param prop @param value @throws PageException
[ "do", "nothing", "when", "not", "exist" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L1096-L1109
30,481
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.getField
public static Object getField(Object obj, String prop) throws PageException { try { return getFieldsIgnoreCase(obj.getClass(), prop)[0].get(obj); } catch (Throwable e) { ExceptionUtil.rethrowIfNecessary(e); throw Caster.toPageException(e); } }
java
public static Object getField(Object obj, String prop) throws PageException { try { return getFieldsIgnoreCase(obj.getClass(), prop)[0].get(obj); } catch (Throwable e) { ExceptionUtil.rethrowIfNecessary(e); throw Caster.toPageException(e); } }
[ "public", "static", "Object", "getField", "(", "Object", "obj", ",", "String", "prop", ")", "throws", "PageException", "{", "try", "{", "return", "getFieldsIgnoreCase", "(", "obj", ".", "getClass", "(", ")", ",", "prop", ")", "[", "0", "]", ".", "get", ...
to get a visible Field of a object @param obj Object to invoke @param prop property to call @return property value @throws PageException
[ "to", "get", "a", "visible", "Field", "of", "a", "object" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L1119-L1127
30,482
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.setField
public static boolean setField(Object obj, String prop, Object value) throws PageException { Class clazz = value.getClass(); try { Field[] fields = getFieldsIgnoreCase(obj.getClass(), prop); // exact comparsion for (int i = 0; i < fields.length; i++) { if (toReferenceClass(fields[i].getType()) == cla...
java
public static boolean setField(Object obj, String prop, Object value) throws PageException { Class clazz = value.getClass(); try { Field[] fields = getFieldsIgnoreCase(obj.getClass(), prop); // exact comparsion for (int i = 0; i < fields.length; i++) { if (toReferenceClass(fields[i].getType()) == cla...
[ "public", "static", "boolean", "setField", "(", "Object", "obj", ",", "String", "prop", ",", "Object", "value", ")", "throws", "PageException", "{", "Class", "clazz", "=", "value", ".", "getClass", "(", ")", ";", "try", "{", "Field", "[", "]", "fields", ...
assign a value to a visible Field of a object @param obj Object to assign value to his property @param prop name of property @param value Value to assign @throws PageException
[ "assign", "a", "value", "to", "a", "visible", "Field", "of", "a", "object" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L1156-L1187
30,483
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.canConvert
public static boolean canConvert(Class from, Class to) { // Identity Conversions if (from == to) return true; // Widening Primitive Conversion if (from == byte.class) { return to == short.class || to == int.class || to == long.class || to == float.class || to == double.class; } if (from == short.class) { ...
java
public static boolean canConvert(Class from, Class to) { // Identity Conversions if (from == to) return true; // Widening Primitive Conversion if (from == byte.class) { return to == short.class || to == int.class || to == long.class || to == float.class || to == double.class; } if (from == short.class) { ...
[ "public", "static", "boolean", "canConvert", "(", "Class", "from", ",", "Class", "to", ")", "{", "// Identity Conversions", "if", "(", "from", "==", "to", ")", "return", "true", ";", "// Widening Primitive Conversion", "if", "(", "from", "==", "byte", ".", "...
check if given class "from" can be converted to class "to" without explicit casting @param from source class @param to target class @return is it possible to convert from "from" to "to"
[ "check", "if", "given", "class", "from", "can", "be", "converted", "to", "class", "to", "without", "explicit", "casting" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L1462-L1486
30,484
lucee/Lucee
core/src/main/java/lucee/runtime/exp/DatabaseException.java
DatabaseException.getCatchBlock
@Override public CatchBlock getCatchBlock(Config config) { String strSQL = sql == null ? "" : sql.toString(); if (StringUtil.isEmpty(strSQL)) strSQL = Caster.toString(getAdditional().get("SQL", ""), ""); String datasourceName = datasource == null ? "" : datasource.getName(); if (StringUtil.isEmpty(datasourceNa...
java
@Override public CatchBlock getCatchBlock(Config config) { String strSQL = sql == null ? "" : sql.toString(); if (StringUtil.isEmpty(strSQL)) strSQL = Caster.toString(getAdditional().get("SQL", ""), ""); String datasourceName = datasource == null ? "" : datasource.getName(); if (StringUtil.isEmpty(datasourceNa...
[ "@", "Override", "public", "CatchBlock", "getCatchBlock", "(", "Config", "config", ")", "{", "String", "strSQL", "=", "sql", "==", "null", "?", "\"\"", ":", "sql", ".", "toString", "(", ")", ";", "if", "(", "StringUtil", ".", "isEmpty", "(", "strSQL", ...
Constructor of the class @param sqle
[ "Constructor", "of", "the", "class" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/exp/DatabaseException.java#L154-L170
30,485
lucee/Lucee
core/src/main/java/lucee/runtime/helpers/XMLEventParser.java
XMLEventParser.start
public void start(Resource xmlFile) throws PageException { InputStream is = null; try { XMLReader xmlReader = XMLUtil.createXMLReader(); xmlReader.setContentHandler(this); xmlReader.setErrorHandler(this); xmlReader.parse(new InputSource(is = IOUtil.toBufferedInputStream(xmlFile.getInputStream())))...
java
public void start(Resource xmlFile) throws PageException { InputStream is = null; try { XMLReader xmlReader = XMLUtil.createXMLReader(); xmlReader.setContentHandler(this); xmlReader.setErrorHandler(this); xmlReader.parse(new InputSource(is = IOUtil.toBufferedInputStream(xmlFile.getInputStream())))...
[ "public", "void", "start", "(", "Resource", "xmlFile", ")", "throws", "PageException", "{", "InputStream", "is", "=", "null", ";", "try", "{", "XMLReader", "xmlReader", "=", "XMLUtil", ".", "createXMLReader", "(", ")", ";", "xmlReader", ".", "setContentHandler...
start execution of the parser @param xmlFile @param saxParserCass @throws PageException
[ "start", "execution", "of", "the", "parser" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/helpers/XMLEventParser.java#L95-L110
30,486
lucee/Lucee
core/src/main/java/lucee/runtime/helpers/XMLEventParser.java
XMLEventParser.call
private void call(UDF udf, Object[] arguments) { try { udf.call(pc, arguments, false); } catch (PageException pe) { error(pe); } }
java
private void call(UDF udf, Object[] arguments) { try { udf.call(pc, arguments, false); } catch (PageException pe) { error(pe); } }
[ "private", "void", "call", "(", "UDF", "udf", ",", "Object", "[", "]", "arguments", ")", "{", "try", "{", "udf", ".", "call", "(", "pc", ",", "arguments", ",", "false", ")", ";", "}", "catch", "(", "PageException", "pe", ")", "{", "error", "(", "...
call a user defined function @param udf @param arguments
[ "call", "a", "user", "defined", "function" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/helpers/XMLEventParser.java#L156-L163
30,487
lucee/Lucee
core/src/main/java/lucee/runtime/helpers/XMLEventParser.java
XMLEventParser.error
private void error(PageException pe) { if (error == null) throw new PageRuntimeException(pe); try { pc = ThreadLocalPageContext.get(pc); error.call(pc, new Object[] { pe.getCatchBlock(pc.getConfig()) }, false); } catch (PageException e) {} }
java
private void error(PageException pe) { if (error == null) throw new PageRuntimeException(pe); try { pc = ThreadLocalPageContext.get(pc); error.call(pc, new Object[] { pe.getCatchBlock(pc.getConfig()) }, false); } catch (PageException e) {} }
[ "private", "void", "error", "(", "PageException", "pe", ")", "{", "if", "(", "error", "==", "null", ")", "throw", "new", "PageRuntimeException", "(", "pe", ")", ";", "try", "{", "pc", "=", "ThreadLocalPageContext", ".", "get", "(", "pc", ")", ";", "err...
call back error function if a error occour @param pe
[ "call", "back", "error", "function", "if", "a", "error", "occour" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/helpers/XMLEventParser.java#L170-L177
30,488
lucee/Lucee
core/src/main/java/lucee/runtime/helpers/XMLEventParser.java
XMLEventParser.toStruct
private Struct toStruct(Attributes att) { int len = att.getLength(); Struct sct = new StructImpl(); for (int i = 0; i < len; i++) { sct.setEL(att.getQName(i), att.getValue(i)); } return sct; }
java
private Struct toStruct(Attributes att) { int len = att.getLength(); Struct sct = new StructImpl(); for (int i = 0; i < len; i++) { sct.setEL(att.getQName(i), att.getValue(i)); } return sct; }
[ "private", "Struct", "toStruct", "(", "Attributes", "att", ")", "{", "int", "len", "=", "att", ".", "getLength", "(", ")", ";", "Struct", "sct", "=", "new", "StructImpl", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "len", ";",...
cast a Attributes object to a Struct @param att @return Attributes as Struct
[ "cast", "a", "Attributes", "object", "to", "a", "Struct" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/helpers/XMLEventParser.java#L185-L192
30,489
lucee/Lucee
core/src/main/java/lucee/runtime/net/http/HttpUtil.java
HttpUtil.cloneHeaders
public static Pair<String, String>[] cloneHeaders(HttpServletRequest req) { List<Pair<String, String>> headers = new ArrayList<Pair<String, String>>(); Enumeration<String> e = req.getHeaderNames(), ee; String name; while (e.hasMoreElements()) { name = e.nextElement(); ee = req.getHeaders(name); while...
java
public static Pair<String, String>[] cloneHeaders(HttpServletRequest req) { List<Pair<String, String>> headers = new ArrayList<Pair<String, String>>(); Enumeration<String> e = req.getHeaderNames(), ee; String name; while (e.hasMoreElements()) { name = e.nextElement(); ee = req.getHeaders(name); while...
[ "public", "static", "Pair", "<", "String", ",", "String", ">", "[", "]", "cloneHeaders", "(", "HttpServletRequest", "req", ")", "{", "List", "<", "Pair", "<", "String", ",", "String", ">", ">", "headers", "=", "new", "ArrayList", "<", "Pair", "<", "Str...
read all headers from request and return it @param req @return
[ "read", "all", "headers", "from", "request", "and", "return", "it" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/http/HttpUtil.java#L44-L56
30,490
lucee/Lucee
core/src/main/java/lucee/runtime/config/XMLConfigWebFactory.java
XMLConfigWebFactory.loadExtensionBundles
private static void loadExtensionBundles(ConfigServerImpl cs, ConfigImpl config, Document doc, Log log) { try { Element parent = getChildByName(doc.getDocumentElement(), "extensions"); Element[] children = getChildren(parent, "rhextension"); String strBundles; List<RHExtension> extensions = new Arr...
java
private static void loadExtensionBundles(ConfigServerImpl cs, ConfigImpl config, Document doc, Log log) { try { Element parent = getChildByName(doc.getDocumentElement(), "extensions"); Element[] children = getChildren(parent, "rhextension"); String strBundles; List<RHExtension> extensions = new Arr...
[ "private", "static", "void", "loadExtensionBundles", "(", "ConfigServerImpl", "cs", ",", "ConfigImpl", "config", ",", "Document", "doc", ",", "Log", "log", ")", "{", "try", "{", "Element", "parent", "=", "getChildByName", "(", "doc", ".", "getDocumentElement", ...
loads the bundles defined in the extensions @param cs @param config @param doc @param log
[ "loads", "the", "bundles", "defined", "in", "the", "extensions" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/XMLConfigWebFactory.java#L4229-L4255
30,491
lucee/Lucee
core/src/main/java/lucee/runtime/config/XMLConfigWebFactory.java
XMLConfigWebFactory.toBoolean
private static boolean toBoolean(String value, boolean defaultValue) { if (value == null || value.trim().length() == 0) return defaultValue; try { return Caster.toBooleanValue(value.trim()); } catch (PageException e) { return defaultValue; } }
java
private static boolean toBoolean(String value, boolean defaultValue) { if (value == null || value.trim().length() == 0) return defaultValue; try { return Caster.toBooleanValue(value.trim()); } catch (PageException e) { return defaultValue; } }
[ "private", "static", "boolean", "toBoolean", "(", "String", "value", ",", "boolean", "defaultValue", ")", "{", "if", "(", "value", "==", "null", "||", "value", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "return", "defaultValue", ";...
cast a string value to a boolean @param value String value represent a booolean ("yes", "no","true" aso.) @param defaultValue if can't cast to a boolean is value will be returned @return boolean value
[ "cast", "a", "string", "value", "to", "a", "boolean" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/XMLConfigWebFactory.java#L4891-L4901
30,492
lucee/Lucee
core/src/main/java/lucee/runtime/config/XMLConfigWebFactory.java
XMLConfigWebFactory.getAttr
public static String getAttr(Element el, String name) { String v = el.getAttribute(name); return replaceConfigPlaceHolder(v); }
java
public static String getAttr(Element el, String name) { String v = el.getAttribute(name); return replaceConfigPlaceHolder(v); }
[ "public", "static", "String", "getAttr", "(", "Element", "el", ",", "String", "name", ")", "{", "String", "v", "=", "el", ".", "getAttribute", "(", "name", ")", ";", "return", "replaceConfigPlaceHolder", "(", "v", ")", ";", "}" ]
reads an attribute from a xml Element and parses placeholders @param el @param name @return
[ "reads", "an", "attribute", "from", "a", "xml", "Element", "and", "parses", "placeholders" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/XMLConfigWebFactory.java#L4918-L4921
30,493
lucee/Lucee
core/src/main/java/lucee/runtime/tag/FileTag.java
FileTag.setAction
public void setAction(String strAction) throws ApplicationException { strAction = strAction.toLowerCase(); if (strAction.equals("move") || strAction.equals("rename")) action = ACTION_MOVE; else if (strAction.equals("copy")) action = ACTION_COPY; else if (strAction.equals("delete")) action = ACTION_DELETE; else if ...
java
public void setAction(String strAction) throws ApplicationException { strAction = strAction.toLowerCase(); if (strAction.equals("move") || strAction.equals("rename")) action = ACTION_MOVE; else if (strAction.equals("copy")) action = ACTION_COPY; else if (strAction.equals("delete")) action = ACTION_DELETE; else if ...
[ "public", "void", "setAction", "(", "String", "strAction", ")", "throws", "ApplicationException", "{", "strAction", "=", "strAction", ".", "toLowerCase", "(", ")", ";", "if", "(", "strAction", ".", "equals", "(", "\"move\"", ")", "||", "strAction", ".", "equ...
set the value action Type of file manipulation that the tag performs. @param strAction value to set
[ "set", "the", "value", "action", "Type", "of", "file", "manipulation", "that", "the", "tag", "performs", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/FileTag.java#L203-L218
30,494
lucee/Lucee
core/src/main/java/lucee/runtime/tag/FileTag.java
FileTag.setCharset
public void setCharset(String charset) { if (StringUtil.isEmpty(charset)) return; this.charset = CharsetUtil.toCharSet(charset.trim()); }
java
public void setCharset(String charset) { if (StringUtil.isEmpty(charset)) return; this.charset = CharsetUtil.toCharSet(charset.trim()); }
[ "public", "void", "setCharset", "(", "String", "charset", ")", "{", "if", "(", "StringUtil", ".", "isEmpty", "(", "charset", ")", ")", "return", ";", "this", ".", "charset", "=", "CharsetUtil", ".", "toCharSet", "(", "charset", ".", "trim", "(", ")", "...
set the value charset Character set name for the file contents. @param charset value to set
[ "set", "the", "value", "charset", "Character", "set", "name", "for", "the", "file", "contents", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/FileTag.java#L293-L296
30,495
lucee/Lucee
core/src/main/java/lucee/runtime/tag/FileTag.java
FileTag.actionMove
public static void actionMove(PageContext pageContext, lucee.runtime.security.SecurityManager securityManager, Resource source, String strDestination, int nameconflict, String serverPassword, Object acl, int mode, String attributes) throws PageException { if (nameconflict == NAMECONFLICT_UNDEFINED) nameconflict =...
java
public static void actionMove(PageContext pageContext, lucee.runtime.security.SecurityManager securityManager, Resource source, String strDestination, int nameconflict, String serverPassword, Object acl, int mode, String attributes) throws PageException { if (nameconflict == NAMECONFLICT_UNDEFINED) nameconflict =...
[ "public", "static", "void", "actionMove", "(", "PageContext", "pageContext", ",", "lucee", ".", "runtime", ".", "security", ".", "SecurityManager", "securityManager", ",", "Resource", "source", ",", "String", "strDestination", ",", "int", "nameconflict", ",", "Str...
move source file to destination path or file @throws PageException
[ "move", "source", "file", "to", "destination", "path", "or", "file" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/FileTag.java#L468-L511
30,496
lucee/Lucee
core/src/main/java/lucee/runtime/tag/FileTag.java
FileTag.actionAppend
private void actionAppend() throws PageException { if (output == null) throw new ApplicationException("attribute output is not defined for tag file"); checkFile(pageContext, securityManager, file, serverPassword, createPath, true, false, true); setACL(pageContext, file, acl); try { if (!file.exists()) file.cr...
java
private void actionAppend() throws PageException { if (output == null) throw new ApplicationException("attribute output is not defined for tag file"); checkFile(pageContext, securityManager, file, serverPassword, createPath, true, false, true); setACL(pageContext, file, acl); try { if (!file.exists()) file.cr...
[ "private", "void", "actionAppend", "(", ")", "throws", "PageException", "{", "if", "(", "output", "==", "null", ")", "throw", "new", "ApplicationException", "(", "\"attribute output is not defined for tag file\"", ")", ";", "checkFile", "(", "pageContext", ",", "sec...
append data to source file @throws PageException
[ "append", "data", "to", "source", "file" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/FileTag.java#L745-L766
30,497
lucee/Lucee
core/src/main/java/lucee/runtime/tag/FileTag.java
FileTag.checkContentType
private static void checkContentType(String contentType, String accept, String ext, boolean strict) throws PageException { if (!StringUtil.isEmpty(ext, true)) { ext = ext.trim().toLowerCase(); if (ext.startsWith("*.")) ext = ext.substring(2); if (ext.startsWith(".")) ext = ext.substring(1); String b...
java
private static void checkContentType(String contentType, String accept, String ext, boolean strict) throws PageException { if (!StringUtil.isEmpty(ext, true)) { ext = ext.trim().toLowerCase(); if (ext.startsWith("*.")) ext = ext.substring(2); if (ext.startsWith(".")) ext = ext.substring(1); String b...
[ "private", "static", "void", "checkContentType", "(", "String", "contentType", ",", "String", "accept", ",", "String", "ext", ",", "boolean", "strict", ")", "throws", "PageException", "{", "if", "(", "!", "StringUtil", ".", "isEmpty", "(", "ext", ",", "true"...
check if the content type is permitted @param contentType @throws PageException
[ "check", "if", "the", "content", "type", "is", "permitted" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/FileTag.java#L1009-L1059
30,498
lucee/Lucee
core/src/main/java/lucee/runtime/tag/FileTag.java
FileTag.getFormItem
private static FormItem getFormItem(PageContext pageContext, String filefield) throws PageException { // check filefield if (StringUtil.isEmpty(filefield)) { FormItem[] items = getFormItems(pageContext); if (ArrayUtil.isEmpty(items)) throw new ApplicationException("no file send with this form"); return...
java
private static FormItem getFormItem(PageContext pageContext, String filefield) throws PageException { // check filefield if (StringUtil.isEmpty(filefield)) { FormItem[] items = getFormItems(pageContext); if (ArrayUtil.isEmpty(items)) throw new ApplicationException("no file send with this form"); return...
[ "private", "static", "FormItem", "getFormItem", "(", "PageContext", "pageContext", ",", "String", "filefield", ")", "throws", "PageException", "{", "// check filefield", "if", "(", "StringUtil", ".", "isEmpty", "(", "filefield", ")", ")", "{", "FormItem", "[", "...
rreturn fileItem matching to filefiled definition or throw a exception @return FileItem @throws ApplicationException
[ "rreturn", "fileItem", "matching", "to", "filefiled", "definition", "or", "throw", "a", "exception" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/FileTag.java#L1067-L1094
30,499
lucee/Lucee
core/src/main/java/lucee/runtime/tag/FileTag.java
FileTag.getFileName
private static String getFileName(Resource file) { String name = file.getName(); int pos = name.lastIndexOf("."); if (pos == -1) return name; return name.substring(0, pos); }
java
private static String getFileName(Resource file) { String name = file.getName(); int pos = name.lastIndexOf("."); if (pos == -1) return name; return name.substring(0, pos); }
[ "private", "static", "String", "getFileName", "(", "Resource", "file", ")", "{", "String", "name", "=", "file", ".", "getName", "(", ")", ";", "int", "pos", "=", "name", ".", "lastIndexOf", "(", "\".\"", ")", ";", "if", "(", "pos", "==", "-", "1", ...
get file name of a file object without extension @param file file object @return name of the file
[ "get", "file", "name", "of", "a", "file", "object", "without", "extension" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/FileTag.java#L1130-L1136