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
134,100
libgdx/box2dlights
src/box2dLight/PointLight.java
PointLight.setDistance
@Override public void setDistance(float dist) { dist *= RayHandler.gammaCorrectionParameter; this.distance = dist < 0.01f ? 0.01f : dist; dirty = true; }
java
@Override public void setDistance(float dist) { dist *= RayHandler.gammaCorrectionParameter; this.distance = dist < 0.01f ? 0.01f : dist; dirty = true; }
[ "@", "Override", "public", "void", "setDistance", "(", "float", "dist", ")", "{", "dist", "*=", "RayHandler", ".", "gammaCorrectionParameter", ";", "this", ".", "distance", "=", "dist", "<", "0.01f", "?", "0.01f", ":", "dist", ";", "dirty", "=", "true", ...
Sets light distance <p>MIN value capped to 0.1f meter <p>Actual recalculations will be done only on {@link #update()} call
[ "Sets", "light", "distance" ]
08cf93a41464f71d32475aaa2fe280dc6af78ff3
https://github.com/libgdx/box2dlights/blob/08cf93a41464f71d32475aaa2fe280dc6af78ff3/src/box2dLight/PointLight.java#L69-L74
134,101
libgdx/box2dlights
src/box2dLight/Light.java
Light.add
public void add(RayHandler rayHandler) { this.rayHandler = rayHandler; if (active) { rayHandler.lightList.add(this); } else { rayHandler.disabledLights.add(this); } }
java
public void add(RayHandler rayHandler) { this.rayHandler = rayHandler; if (active) { rayHandler.lightList.add(this); } else { rayHandler.disabledLights.add(this); } }
[ "public", "void", "add", "(", "RayHandler", "rayHandler", ")", "{", "this", ".", "rayHandler", "=", "rayHandler", ";", "if", "(", "active", ")", "{", "rayHandler", ".", "lightList", ".", "add", "(", "this", ")", ";", "}", "else", "{", "rayHandler", "."...
Adds light to specified RayHandler
[ "Adds", "light", "to", "specified", "RayHandler" ]
08cf93a41464f71d32475aaa2fe280dc6af78ff3
https://github.com/libgdx/box2dlights/blob/08cf93a41464f71d32475aaa2fe280dc6af78ff3/src/box2dLight/Light.java#L200-L207
134,102
libgdx/box2dlights
src/box2dLight/Light.java
Light.remove
public void remove(boolean doDispose) { if (active) { rayHandler.lightList.removeValue(this, false); } else { rayHandler.disabledLights.removeValue(this, false); } rayHandler = null; if (doDispose) dispose(); }
java
public void remove(boolean doDispose) { if (active) { rayHandler.lightList.removeValue(this, false); } else { rayHandler.disabledLights.removeValue(this, false); } rayHandler = null; if (doDispose) dispose(); }
[ "public", "void", "remove", "(", "boolean", "doDispose", ")", "{", "if", "(", "active", ")", "{", "rayHandler", ".", "lightList", ".", "removeValue", "(", "this", ",", "false", ")", ";", "}", "else", "{", "rayHandler", ".", "disabledLights", ".", "remove...
Removes light from specified RayHandler and disposes it if requested
[ "Removes", "light", "from", "specified", "RayHandler", "and", "disposes", "it", "if", "requested" ]
08cf93a41464f71d32475aaa2fe280dc6af78ff3
https://github.com/libgdx/box2dlights/blob/08cf93a41464f71d32475aaa2fe280dc6af78ff3/src/box2dLight/Light.java#L219-L227
134,103
libgdx/box2dlights
src/box2dLight/Light.java
Light.setRayNum
void setRayNum(int rays) { if (rays < MIN_RAYS) rays = MIN_RAYS; rayNum = rays; vertexNum = rays + 1; segments = new float[vertexNum * 8]; mx = new float[vertexNum]; my = new float[vertexNum]; f = new float[vertexNum]; }
java
void setRayNum(int rays) { if (rays < MIN_RAYS) rays = MIN_RAYS; rayNum = rays; vertexNum = rays + 1; segments = new float[vertexNum * 8]; mx = new float[vertexNum]; my = new float[vertexNum]; f = new float[vertexNum]; }
[ "void", "setRayNum", "(", "int", "rays", ")", "{", "if", "(", "rays", "<", "MIN_RAYS", ")", "rays", "=", "MIN_RAYS", ";", "rayNum", "=", "rays", ";", "vertexNum", "=", "rays", "+", "1", ";", "segments", "=", "new", "float", "[", "vertexNum", "*", "...
Internal method for mesh update depending on ray number
[ "Internal", "method", "for", "mesh", "update", "depending", "on", "ray", "number" ]
08cf93a41464f71d32475aaa2fe280dc6af78ff3
https://github.com/libgdx/box2dlights/blob/08cf93a41464f71d32475aaa2fe280dc6af78ff3/src/box2dLight/Light.java#L395-L406
134,104
libgdx/box2dlights
src/box2dLight/Light.java
Light.setContactFilter
public void setContactFilter(short categoryBits, short groupIndex, short maskBits) { filterA = new Filter(); filterA.categoryBits = categoryBits; filterA.groupIndex = groupIndex; filterA.maskBits = maskBits; }
java
public void setContactFilter(short categoryBits, short groupIndex, short maskBits) { filterA = new Filter(); filterA.categoryBits = categoryBits; filterA.groupIndex = groupIndex; filterA.maskBits = maskBits; }
[ "public", "void", "setContactFilter", "(", "short", "categoryBits", ",", "short", "groupIndex", ",", "short", "maskBits", ")", "{", "filterA", "=", "new", "Filter", "(", ")", ";", "filterA", ".", "categoryBits", "=", "categoryBits", ";", "filterA", ".", "gro...
Creates new contact filter for this light with given parameters @param categoryBits - see {@link Filter#categoryBits} @param groupIndex - see {@link Filter#groupIndex} @param maskBits - see {@link Filter#maskBits}
[ "Creates", "new", "contact", "filter", "for", "this", "light", "with", "given", "parameters" ]
08cf93a41464f71d32475aaa2fe280dc6af78ff3
https://github.com/libgdx/box2dlights/blob/08cf93a41464f71d32475aaa2fe280dc6af78ff3/src/box2dLight/Light.java#L470-L476
134,105
libgdx/box2dlights
src/box2dLight/Light.java
Light.setGlobalContactFilter
static public void setGlobalContactFilter(short categoryBits, short groupIndex, short maskBits) { globalFilterA = new Filter(); globalFilterA.categoryBits = categoryBits; globalFilterA.groupIndex = groupIndex; globalFilterA.maskBits = maskBits; }
java
static public void setGlobalContactFilter(short categoryBits, short groupIndex, short maskBits) { globalFilterA = new Filter(); globalFilterA.categoryBits = categoryBits; globalFilterA.groupIndex = groupIndex; globalFilterA.maskBits = maskBits; }
[ "static", "public", "void", "setGlobalContactFilter", "(", "short", "categoryBits", ",", "short", "groupIndex", ",", "short", "maskBits", ")", "{", "globalFilterA", "=", "new", "Filter", "(", ")", ";", "globalFilterA", ".", "categoryBits", "=", "categoryBits", "...
Creates new contact filter for ALL LIGHTS with give parameters @param categoryBits - see {@link Filter#categoryBits} @param groupIndex - see {@link Filter#groupIndex} @param maskBits - see {@link Filter#maskBits}
[ "Creates", "new", "contact", "filter", "for", "ALL", "LIGHTS", "with", "give", "parameters" ]
08cf93a41464f71d32475aaa2fe280dc6af78ff3
https://github.com/libgdx/box2dlights/blob/08cf93a41464f71d32475aaa2fe280dc6af78ff3/src/box2dLight/Light.java#L503-L509
134,106
libgdx/box2dlights
src/box2dLight/ChainLight.java
ChainLight.debugRender
public void debugRender(ShapeRenderer shapeRenderer) { shapeRenderer.setColor(Color.YELLOW); FloatArray vertices = Pools.obtain(FloatArray.class); vertices.clear(); for (int i = 0; i < rayNum; i++) { vertices.addAll(mx[i], my[i]); } for (int i = rayNum - 1; i > -1; i--) { vertices.addAll(startX[i], st...
java
public void debugRender(ShapeRenderer shapeRenderer) { shapeRenderer.setColor(Color.YELLOW); FloatArray vertices = Pools.obtain(FloatArray.class); vertices.clear(); for (int i = 0; i < rayNum; i++) { vertices.addAll(mx[i], my[i]); } for (int i = rayNum - 1; i > -1; i--) { vertices.addAll(startX[i], st...
[ "public", "void", "debugRender", "(", "ShapeRenderer", "shapeRenderer", ")", "{", "shapeRenderer", ".", "setColor", "(", "Color", ".", "YELLOW", ")", ";", "FloatArray", "vertices", "=", "Pools", ".", "obtain", "(", "FloatArray", ".", "class", ")", ";", "vert...
Draws a polygon, using ray start and end points as vertices
[ "Draws", "a", "polygon", "using", "ray", "start", "and", "end", "points", "as", "vertices" ]
08cf93a41464f71d32475aaa2fe280dc6af78ff3
https://github.com/libgdx/box2dlights/blob/08cf93a41464f71d32475aaa2fe280dc6af78ff3/src/box2dLight/ChainLight.java#L165-L177
134,107
libgdx/box2dlights
src/box2dLight/ChainLight.java
ChainLight.attachToBody
public void attachToBody(Body body, float degrees) { this.body = body; this.bodyPosition.set(body.getPosition()); bodyAngleOffset = MathUtils.degreesToRadians * degrees; bodyAngle = body.getAngle(); applyAttachment(); if (staticLight) dirty = true; }
java
public void attachToBody(Body body, float degrees) { this.body = body; this.bodyPosition.set(body.getPosition()); bodyAngleOffset = MathUtils.degreesToRadians * degrees; bodyAngle = body.getAngle(); applyAttachment(); if (staticLight) dirty = true; }
[ "public", "void", "attachToBody", "(", "Body", "body", ",", "float", "degrees", ")", "{", "this", ".", "body", "=", "body", ";", "this", ".", "bodyPosition", ".", "set", "(", "body", ".", "getPosition", "(", ")", ")", ";", "bodyAngleOffset", "=", "Math...
Attaches light to specified body with relative direction offset @param body that will be automatically followed, note that the body rotation angle is taken into account for the light offset and direction calculations @param degrees directional relative offset in degrees
[ "Attaches", "light", "to", "specified", "body", "with", "relative", "direction", "offset" ]
08cf93a41464f71d32475aaa2fe280dc6af78ff3
https://github.com/libgdx/box2dlights/blob/08cf93a41464f71d32475aaa2fe280dc6af78ff3/src/box2dLight/ChainLight.java#L194-L201
134,108
libgdx/box2dlights
src/box2dLight/ChainLight.java
ChainLight.applyAttachment
void applyAttachment() { if (body == null || staticLight) return; restorePosition.setToTranslation(bodyPosition); rotateAroundZero.setToRotationRad(bodyAngle + bodyAngleOffset); for (int i = 0; i < rayNum; i++) { tmpVec.set(startX[i], startY[i]).mul(rotateAroundZero).mul(restorePosition); startX[i] = t...
java
void applyAttachment() { if (body == null || staticLight) return; restorePosition.setToTranslation(bodyPosition); rotateAroundZero.setToRotationRad(bodyAngle + bodyAngleOffset); for (int i = 0; i < rayNum; i++) { tmpVec.set(startX[i], startY[i]).mul(rotateAroundZero).mul(restorePosition); startX[i] = t...
[ "void", "applyAttachment", "(", ")", "{", "if", "(", "body", "==", "null", "||", "staticLight", ")", "return", ";", "restorePosition", ".", "setToTranslation", "(", "bodyPosition", ")", ";", "rotateAroundZero", ".", "setToRotationRad", "(", "bodyAngle", "+", "...
Applies attached body initial transform to all lights rays
[ "Applies", "attached", "body", "initial", "transform", "to", "all", "lights", "rays" ]
08cf93a41464f71d32475aaa2fe280dc6af78ff3
https://github.com/libgdx/box2dlights/blob/08cf93a41464f71d32475aaa2fe280dc6af78ff3/src/box2dLight/ChainLight.java#L390-L403
134,109
libgdx/box2dlights
src/box2dLight/PositionalLight.java
PositionalLight.attachToBody
public void attachToBody(Body body, float offsetX, float offSetY, float degrees) { this.body = body; bodyOffsetX = offsetX; bodyOffsetY = offSetY; bodyAngleOffset = degrees; if (staticLight) dirty = true; }
java
public void attachToBody(Body body, float offsetX, float offSetY, float degrees) { this.body = body; bodyOffsetX = offsetX; bodyOffsetY = offSetY; bodyAngleOffset = degrees; if (staticLight) dirty = true; }
[ "public", "void", "attachToBody", "(", "Body", "body", ",", "float", "offsetX", ",", "float", "offSetY", ",", "float", "degrees", ")", "{", "this", ".", "body", "=", "body", ";", "bodyOffsetX", "=", "offsetX", ";", "bodyOffsetY", "=", "offSetY", ";", "bo...
Attaches light to specified body with relative offset and direction @param body that will be automatically followed, note that the body rotation angle is taken into account for the light offset and direction calculations @param offsetX horizontal relative offset in world coordinates @param offsetY vertical relative of...
[ "Attaches", "light", "to", "specified", "body", "with", "relative", "offset", "and", "direction" ]
08cf93a41464f71d32475aaa2fe280dc6af78ff3
https://github.com/libgdx/box2dlights/blob/08cf93a41464f71d32475aaa2fe280dc6af78ff3/src/box2dLight/PositionalLight.java#L135-L141
134,110
bit3/jsass
src/main/java/io/bit3/jsass/type/SassString.java
SassString.escape
public static String escape(String value, char quote) { Map<CharSequence, CharSequence> lookupMap = new HashMap<>(); lookupMap.put(Character.toString(quote), "\\" + quote); lookupMap.put("\\", "\\\\"); final CharSequenceTranslator escape = new LookupTranslator(lookupMap) .with(n...
java
public static String escape(String value, char quote) { Map<CharSequence, CharSequence> lookupMap = new HashMap<>(); lookupMap.put(Character.toString(quote), "\\" + quote); lookupMap.put("\\", "\\\\"); final CharSequenceTranslator escape = new LookupTranslator(lookupMap) .with(n...
[ "public", "static", "String", "escape", "(", "String", "value", ",", "char", "quote", ")", "{", "Map", "<", "CharSequence", ",", "CharSequence", ">", "lookupMap", "=", "new", "HashMap", "<>", "(", ")", ";", "lookupMap", ".", "put", "(", "Character", ".",...
Escape the string with given quote character.
[ "Escape", "the", "string", "with", "given", "quote", "character", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/type/SassString.java#L136-L147
134,111
bit3/jsass
src/main/java/io/bit3/jsass/function/FunctionWrapperFactory.java
FunctionWrapperFactory.compileFunctions
public List<FunctionWrapper> compileFunctions( ImportStack importStack, Context context, List<?> objects ) { List<FunctionWrapper> callbacks = new LinkedList<>(); for (Object object : objects) { List<FunctionWrapper> objectCallbacks = compileFunctions(importStack, context, object); callbac...
java
public List<FunctionWrapper> compileFunctions( ImportStack importStack, Context context, List<?> objects ) { List<FunctionWrapper> callbacks = new LinkedList<>(); for (Object object : objects) { List<FunctionWrapper> objectCallbacks = compileFunctions(importStack, context, object); callbac...
[ "public", "List", "<", "FunctionWrapper", ">", "compileFunctions", "(", "ImportStack", "importStack", ",", "Context", "context", ",", "List", "<", "?", ">", "objects", ")", "{", "List", "<", "FunctionWrapper", ">", "callbacks", "=", "new", "LinkedList", "<>", ...
Compile methods from all objects into libsass functions. @param importStack The import stack. @param objects A list of "function provider" objects. @return The newly created list of libsass callbacks.
[ "Compile", "methods", "from", "all", "objects", "into", "libsass", "functions", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/function/FunctionWrapperFactory.java#L73-L85
134,112
bit3/jsass
src/main/java/io/bit3/jsass/function/FunctionWrapperFactory.java
FunctionWrapperFactory.compileFunctions
public List<FunctionWrapper> compileFunctions( ImportStack importStack, Context context, Object object ) { Class<?> functionClass = object.getClass(); Method[] methods = functionClass.getDeclaredMethods(); List<FunctionDeclaration> declarations = new LinkedList<>(); for (Method method : methods...
java
public List<FunctionWrapper> compileFunctions( ImportStack importStack, Context context, Object object ) { Class<?> functionClass = object.getClass(); Method[] methods = functionClass.getDeclaredMethods(); List<FunctionDeclaration> declarations = new LinkedList<>(); for (Method method : methods...
[ "public", "List", "<", "FunctionWrapper", ">", "compileFunctions", "(", "ImportStack", "importStack", ",", "Context", "context", ",", "Object", "object", ")", "{", "Class", "<", "?", ">", "functionClass", "=", "object", ".", "getClass", "(", ")", ";", "Metho...
Compile methods from an object into libsass functions. @param importStack The import stack. @param object The "function provider" object. @return The newly created list of libsass callbacks.
[ "Compile", "methods", "from", "an", "object", "into", "libsass", "functions", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/function/FunctionWrapperFactory.java#L94-L113
134,113
bit3/jsass
src/main/java/io/bit3/jsass/function/FunctionWrapperFactory.java
FunctionWrapperFactory.createDeclaration
public FunctionDeclaration createDeclaration( ImportStack importStack, Context context, Object object, Method method ) { StringBuilder signature = new StringBuilder(); Parameter[] parameters = method.getParameters(); List<ArgumentConverter> argumentConverters = new ArrayList<>(method.getParameterCo...
java
public FunctionDeclaration createDeclaration( ImportStack importStack, Context context, Object object, Method method ) { StringBuilder signature = new StringBuilder(); Parameter[] parameters = method.getParameters(); List<ArgumentConverter> argumentConverters = new ArrayList<>(method.getParameterCo...
[ "public", "FunctionDeclaration", "createDeclaration", "(", "ImportStack", "importStack", ",", "Context", "context", ",", "Object", "object", ",", "Method", "method", ")", "{", "StringBuilder", "signature", "=", "new", "StringBuilder", "(", ")", ";", "Parameter", "...
Create a function declaration from an object method. @param importStack The import stack. @param object The object. @param method The method. @return The newly created function declaration.
[ "Create", "a", "function", "declaration", "from", "an", "object", "method", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/function/FunctionWrapperFactory.java#L123-L185
134,114
bit3/jsass
src/main/java/io/bit3/jsass/function/FunctionWrapperFactory.java
FunctionWrapperFactory.formatDefaultValue
private String formatDefaultValue(Object value) { if (value instanceof Boolean) { return ((Boolean) value) ? "true" : "false"; } if (value instanceof Number) { return value.toString(); } if (value instanceof Collection) { return formatCollectionValue((Collection) value); } ...
java
private String formatDefaultValue(Object value) { if (value instanceof Boolean) { return ((Boolean) value) ? "true" : "false"; } if (value instanceof Number) { return value.toString(); } if (value instanceof Collection) { return formatCollectionValue((Collection) value); } ...
[ "private", "String", "formatDefaultValue", "(", "Object", "value", ")", "{", "if", "(", "value", "instanceof", "Boolean", ")", "{", "return", "(", "(", "Boolean", ")", "value", ")", "?", "\"true\"", ":", "\"false\"", ";", "}", "if", "(", "value", "instan...
Format a default value for libsass function signature. @param value The default value. @return The formated default value.
[ "Format", "a", "default", "value", "for", "libsass", "function", "signature", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/function/FunctionWrapperFactory.java#L193-L213
134,115
bit3/jsass
src/main/java/io/bit3/jsass/function/FunctionDeclaration.java
FunctionDeclaration.invoke
public SassValue invoke(List<?> arguments) { try { ArrayList<Object> values = new ArrayList<>(argumentConverters.size()); for (ArgumentConverter argumentConverter : argumentConverters) { Object value = argumentConverter.convert(arguments, importStack, context); values.add(value); ...
java
public SassValue invoke(List<?> arguments) { try { ArrayList<Object> values = new ArrayList<>(argumentConverters.size()); for (ArgumentConverter argumentConverter : argumentConverters) { Object value = argumentConverter.convert(arguments, importStack, context); values.add(value); ...
[ "public", "SassValue", "invoke", "(", "List", "<", "?", ">", "arguments", ")", "{", "try", "{", "ArrayList", "<", "Object", ">", "values", "=", "new", "ArrayList", "<>", "(", "argumentConverters", ".", "size", "(", ")", ")", ";", "for", "(", "ArgumentC...
Invoke the method with the given list of arguments. <p>This will convert the libsass arguments into java value.</p> @param arguments List of libsass arguments. @return The method result.
[ "Invoke", "the", "method", "with", "the", "given", "list", "of", "arguments", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/function/FunctionDeclaration.java#L115-L139
134,116
bit3/jsass
src/main/java/io/bit3/jsass/Compiler.java
Compiler.compileFile
public Output compileFile(URI inputPath, URI outputPath, Options options) throws CompilationException { FileContext context = new FileContext(inputPath, outputPath, options); return compile(context); }
java
public Output compileFile(URI inputPath, URI outputPath, Options options) throws CompilationException { FileContext context = new FileContext(inputPath, outputPath, options); return compile(context); }
[ "public", "Output", "compileFile", "(", "URI", "inputPath", ",", "URI", "outputPath", ",", "Options", "options", ")", "throws", "CompilationException", "{", "FileContext", "context", "=", "new", "FileContext", "(", "inputPath", ",", "outputPath", ",", "options", ...
Compile file. @param inputPath The input path. @param outputPath The output path. @param options The compile options. @return The compilation output. @throws CompilationException If the compilation failed.
[ "Compile", "file", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/Compiler.java#L76-L80
134,117
bit3/jsass
src/main/java/io/bit3/jsass/Compiler.java
Compiler.compile
public Output compile(Context context) throws CompilationException { Objects.requireNonNull(context, "Parameter context must not be null"); if (context instanceof FileContext) { return compile((FileContext) context); } if (context instanceof StringContext) { return compile((StringContext) ...
java
public Output compile(Context context) throws CompilationException { Objects.requireNonNull(context, "Parameter context must not be null"); if (context instanceof FileContext) { return compile((FileContext) context); } if (context instanceof StringContext) { return compile((StringContext) ...
[ "public", "Output", "compile", "(", "Context", "context", ")", "throws", "CompilationException", "{", "Objects", ".", "requireNonNull", "(", "context", ",", "\"Parameter context must not be null\"", ")", ";", "if", "(", "context", "instanceof", "FileContext", ")", "...
Compile context. @param context The context. @return The compilation output. @throws UnsupportedContextException If the given context is not supported. @throws CompilationException If the compilation failed.
[ "Compile", "context", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/Compiler.java#L90-L102
134,118
bit3/jsass
src/main/java/io/bit3/jsass/function/FunctionArgumentSignatureFactory.java
FunctionArgumentSignatureFactory.createDefaultArgumentSignature
public List<FunctionArgumentSignature> createDefaultArgumentSignature(Parameter parameter) { List<FunctionArgumentSignature> list = new LinkedList<>(); String name = getParameterName(parameter); Object defaultValue = getDefaultValue(parameter); list.add(new FunctionArgumentSignature(name, defaultValue)...
java
public List<FunctionArgumentSignature> createDefaultArgumentSignature(Parameter parameter) { List<FunctionArgumentSignature> list = new LinkedList<>(); String name = getParameterName(parameter); Object defaultValue = getDefaultValue(parameter); list.add(new FunctionArgumentSignature(name, defaultValue)...
[ "public", "List", "<", "FunctionArgumentSignature", ">", "createDefaultArgumentSignature", "(", "Parameter", "parameter", ")", "{", "List", "<", "FunctionArgumentSignature", ">", "list", "=", "new", "LinkedList", "<>", "(", ")", ";", "String", "name", "=", "getPar...
Create a new factory.
[ "Create", "a", "new", "factory", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/function/FunctionArgumentSignatureFactory.java#L24-L32
134,119
bit3/jsass
src/main/java/io/bit3/jsass/function/FunctionArgumentSignatureFactory.java
FunctionArgumentSignatureFactory.getParameterName
public String getParameterName(Parameter parameter) { Name annotation = parameter.getAnnotation(Name.class); if (null == annotation) { return parameter.getName(); } return annotation.value(); }
java
public String getParameterName(Parameter parameter) { Name annotation = parameter.getAnnotation(Name.class); if (null == annotation) { return parameter.getName(); } return annotation.value(); }
[ "public", "String", "getParameterName", "(", "Parameter", "parameter", ")", "{", "Name", "annotation", "=", "parameter", ".", "getAnnotation", "(", "Name", ".", "class", ")", ";", "if", "(", "null", "==", "annotation", ")", "{", "return", "parameter", ".", ...
Determine annotated name of a method parameter. @param parameter The method parameter. @return The parameters name.
[ "Determine", "annotated", "name", "of", "a", "method", "parameter", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/function/FunctionArgumentSignatureFactory.java#L40-L48
134,120
bit3/jsass
src/main/java/io/bit3/jsass/function/FunctionArgumentSignatureFactory.java
FunctionArgumentSignatureFactory.getDefaultValue
public Object getDefaultValue(Parameter parameter) { Class<?> type = parameter.getType(); if (TypeUtils.isaString(type)) { return getStringDefaultValue(parameter); } if (TypeUtils.isaByte(type)) { return getByteDefaultValue(parameter); } if (TypeUtils.isaShort(type)) { retur...
java
public Object getDefaultValue(Parameter parameter) { Class<?> type = parameter.getType(); if (TypeUtils.isaString(type)) { return getStringDefaultValue(parameter); } if (TypeUtils.isaByte(type)) { return getByteDefaultValue(parameter); } if (TypeUtils.isaShort(type)) { retur...
[ "public", "Object", "getDefaultValue", "(", "Parameter", "parameter", ")", "{", "Class", "<", "?", ">", "type", "=", "parameter", ".", "getType", "(", ")", ";", "if", "(", "TypeUtils", ".", "isaString", "(", "type", ")", ")", "{", "return", "getStringDef...
Determine annotated default parameter value. @param parameter The method parameter. @return The parameters default value.
[ "Determine", "annotated", "default", "parameter", "value", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/function/FunctionArgumentSignatureFactory.java#L56-L96
134,121
bit3/jsass
src/main/java/io/bit3/jsass/context/ImportStack.java
ImportStack.register
public int register(Import importSource) { int id = registry.size() + 1; registry.put(id, importSource); return id; }
java
public int register(Import importSource) { int id = registry.size() + 1; registry.put(id, importSource); return id; }
[ "public", "int", "register", "(", "Import", "importSource", ")", "{", "int", "id", "=", "registry", ".", "size", "(", ")", "+", "1", ";", "registry", ".", "put", "(", "id", ",", "importSource", ")", ";", "return", "id", ";", "}" ]
Register a new import, return the registration ID.
[ "Register", "a", "new", "import", "return", "the", "registration", "ID", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/context/ImportStack.java#L28-L32
134,122
bit3/jsass
src/main/java/io/bit3/jsass/type/TypeUtils.java
TypeUtils.convertToSassValue
public static SassValue convertToSassValue(Object value) { if (null == value) { return SassNull.SINGLETON; } if (value instanceof SassValue) { return (SassValue) value; } Class cls = value.getClass(); if (isaBoolean(cls)) { return new SassBoolean((Boolean) value); } ...
java
public static SassValue convertToSassValue(Object value) { if (null == value) { return SassNull.SINGLETON; } if (value instanceof SassValue) { return (SassValue) value; } Class cls = value.getClass(); if (isaBoolean(cls)) { return new SassBoolean((Boolean) value); } ...
[ "public", "static", "SassValue", "convertToSassValue", "(", "Object", "value", ")", "{", "if", "(", "null", "==", "value", ")", "{", "return", "SassNull", ".", "SINGLETON", ";", "}", "if", "(", "value", "instanceof", "SassValue", ")", "{", "return", "(", ...
Try to convert "any" java object into a responsible sass value.
[ "Try", "to", "convert", "any", "java", "object", "into", "a", "responsible", "sass", "value", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/type/TypeUtils.java#L21-L84
134,123
bit3/jsass
example/webapp/src/main/java/io/bit3/jsass/example/webapp/JsassServlet.java
JsassServlet.resolveImport
private Collection<Import> resolveImport(Path path) throws IOException, URISyntaxException { URL resource = resolveResource(path); if (null == resource) { return null; } // calculate a webapp absolute URI final URI uri = new URI( Paths.get("/").resolve( Paths.get(getServletContext().getResource("/...
java
private Collection<Import> resolveImport(Path path) throws IOException, URISyntaxException { URL resource = resolveResource(path); if (null == resource) { return null; } // calculate a webapp absolute URI final URI uri = new URI( Paths.get("/").resolve( Paths.get(getServletContext().getResource("/...
[ "private", "Collection", "<", "Import", ">", "resolveImport", "(", "Path", "path", ")", "throws", "IOException", ",", "URISyntaxException", "{", "URL", "resource", "=", "resolveResource", "(", "path", ")", ";", "if", "(", "null", "==", "resource", ")", "{", ...
Try to determine the import object for a given path. @param path The path to resolve. @return The import object or {@code null} if the file was not found.
[ "Try", "to", "determine", "the", "import", "object", "for", "a", "given", "path", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/example/webapp/src/main/java/io/bit3/jsass/example/webapp/JsassServlet.java#L139-L156
134,124
bit3/jsass
example/webapp/src/main/java/io/bit3/jsass/example/webapp/JsassServlet.java
JsassServlet.resolveResource
private URL resolveResource(Path path) throws MalformedURLException { final Path dir = path.getParent(); final String basename = path.getFileName().toString(); for (String prefix : new String[]{"_", ""}) { for (String suffix : new String[]{".scss", ".css", ""}) { final Path target = dir.resolve(prefix + b...
java
private URL resolveResource(Path path) throws MalformedURLException { final Path dir = path.getParent(); final String basename = path.getFileName().toString(); for (String prefix : new String[]{"_", ""}) { for (String suffix : new String[]{".scss", ".css", ""}) { final Path target = dir.resolve(prefix + b...
[ "private", "URL", "resolveResource", "(", "Path", "path", ")", "throws", "MalformedURLException", "{", "final", "Path", "dir", "=", "path", ".", "getParent", "(", ")", ";", "final", "String", "basename", "=", "path", ".", "getFileName", "(", ")", ".", "toS...
Try to find a resource for this path. <p>A sass import like {@code @import "foo"} does not contain the partial prefix (underscore) or file extension. This method will try the following namings to find the import file {@code foo}:</p> <ul> <li>_foo.scss</li> <li>_foo.css</li> <li>_foo</li> <li>foo.scss</li> <li>foo.css...
[ "Try", "to", "find", "a", "resource", "for", "this", "path", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/example/webapp/src/main/java/io/bit3/jsass/example/webapp/JsassServlet.java#L176-L192
134,125
bit3/jsass
src/main/java/io/bit3/jsass/function/FunctionWrapper.java
FunctionWrapper.apply
public SassValue apply(SassValue value) { SassList sassList; if (value instanceof SassList) { sassList = (SassList) value; } else { sassList = new SassList(); sassList.add(value); } return declaration.invoke(sassList); }
java
public SassValue apply(SassValue value) { SassList sassList; if (value instanceof SassList) { sassList = (SassList) value; } else { sassList = new SassList(); sassList.add(value); } return declaration.invoke(sassList); }
[ "public", "SassValue", "apply", "(", "SassValue", "value", ")", "{", "SassList", "sassList", ";", "if", "(", "value", "instanceof", "SassList", ")", "{", "sassList", "=", "(", "SassList", ")", "value", ";", "}", "else", "{", "sassList", "=", "new", "Sass...
Call the function.
[ "Call", "the", "function", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/function/FunctionWrapper.java#L32-L43
134,126
bit3/jsass
src/main/java/io/bit3/jsass/adapter/NativeLoader.java
NativeLoader.loadLibrary
static void loadLibrary() { try { File dir = Files.createTempDirectory("libjsass-").toFile(); dir.deleteOnExit(); if (System.getProperty("os.name").toLowerCase().startsWith("win")) { System.load(saveLibrary(dir, "sass")); } System.load(saveLibrary(dir, "jsass")); } catch ...
java
static void loadLibrary() { try { File dir = Files.createTempDirectory("libjsass-").toFile(); dir.deleteOnExit(); if (System.getProperty("os.name").toLowerCase().startsWith("win")) { System.load(saveLibrary(dir, "sass")); } System.load(saveLibrary(dir, "jsass")); } catch ...
[ "static", "void", "loadLibrary", "(", ")", "{", "try", "{", "File", "dir", "=", "Files", ".", "createTempDirectory", "(", "\"libjsass-\"", ")", ".", "toFile", "(", ")", ";", "dir", ".", "deleteOnExit", "(", ")", ";", "if", "(", "System", ".", "getPrope...
Load the shared libraries.
[ "Load", "the", "shared", "libraries", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/adapter/NativeLoader.java#L39-L53
134,127
bit3/jsass
src/main/java/io/bit3/jsass/adapter/NativeLoader.java
NativeLoader.findLibraryResource
private static URL findLibraryResource(final String libraryFileName) { String osName = System.getProperty("os.name").toLowerCase(); String osArch = System.getProperty("os.arch").toLowerCase(); String resourceName = null; LOG.trace("Load library \"{}\" for os {}:{}", libraryFileName, osName, osArch); ...
java
private static URL findLibraryResource(final String libraryFileName) { String osName = System.getProperty("os.name").toLowerCase(); String osArch = System.getProperty("os.arch").toLowerCase(); String resourceName = null; LOG.trace("Load library \"{}\" for os {}:{}", libraryFileName, osName, osArch); ...
[ "private", "static", "URL", "findLibraryResource", "(", "final", "String", "libraryFileName", ")", "{", "String", "osName", "=", "System", ".", "getProperty", "(", "\"os.name\"", ")", ".", "toLowerCase", "(", ")", ";", "String", "osArch", "=", "System", ".", ...
Find the right shared library, depending on the operating system and architecture. @throws UnsupportedOperationException Throw an exception if no native library for this platform was found.
[ "Find", "the", "right", "shared", "library", "depending", "on", "the", "operating", "system", "and", "architecture", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/adapter/NativeLoader.java#L61-L87
134,128
bit3/jsass
src/main/java/io/bit3/jsass/adapter/NativeLoader.java
NativeLoader.determineWindowsLibrary
private static String determineWindowsLibrary( final String library, final String osName, final String osArch ) { String resourceName; String platform; String fileExtension = "dll"; switch (osArch) { case ARCH_AMD64: case ARCH_X86_64: platform = "windows-x64"; ...
java
private static String determineWindowsLibrary( final String library, final String osName, final String osArch ) { String resourceName; String platform; String fileExtension = "dll"; switch (osArch) { case ARCH_AMD64: case ARCH_X86_64: platform = "windows-x64"; ...
[ "private", "static", "String", "determineWindowsLibrary", "(", "final", "String", "library", ",", "final", "String", "osName", ",", "final", "String", "osArch", ")", "{", "String", "resourceName", ";", "String", "platform", ";", "String", "fileExtension", "=", "...
Determine the right windows library depending on the architecture. @param library The library name. @param osName The operating system name. @param osArch The system architecture. @return The library resource. @throws UnsupportedOperationException Throw an exception if no native library for this platform was found.
[ "Determine", "the", "right", "windows", "library", "depending", "on", "the", "architecture", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/adapter/NativeLoader.java#L99-L122
134,129
bit3/jsass
src/main/java/io/bit3/jsass/adapter/NativeLoader.java
NativeLoader.determineLinuxLibrary
private static String determineLinuxLibrary( final String library, final String osName, final String osArch ) { String resourceName; String platform = null; String fileExtension = "so"; switch (osArch) { case ARCH_AMD64: case ARCH_X86_64: platform = "linux-x64"; ...
java
private static String determineLinuxLibrary( final String library, final String osName, final String osArch ) { String resourceName; String platform = null; String fileExtension = "so"; switch (osArch) { case ARCH_AMD64: case ARCH_X86_64: platform = "linux-x64"; ...
[ "private", "static", "String", "determineLinuxLibrary", "(", "final", "String", "library", ",", "final", "String", "osName", ",", "final", "String", "osArch", ")", "{", "String", "resourceName", ";", "String", "platform", "=", "null", ";", "String", "fileExtensi...
Determine the right linux library depending on the architecture. @param library The library name. @param osName The operating system name. @param osArch The system architecture. @return The library resource. @throws UnsupportedOperationException Throw an exception if no native library for this platform was found.
[ "Determine", "the", "right", "linux", "library", "depending", "on", "the", "architecture", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/adapter/NativeLoader.java#L134-L163
134,130
bit3/jsass
src/main/java/io/bit3/jsass/adapter/NativeLoader.java
NativeLoader.determineFreebsdLibrary
private static String determineFreebsdLibrary( final String library, final String osName, final String osArch ) { String resourceName; String platform = null; String fileExtension = "so"; switch (osArch) { case ARCH_AMD64: case ARCH_X86_64: platform = "freebsd-x6...
java
private static String determineFreebsdLibrary( final String library, final String osName, final String osArch ) { String resourceName; String platform = null; String fileExtension = "so"; switch (osArch) { case ARCH_AMD64: case ARCH_X86_64: platform = "freebsd-x6...
[ "private", "static", "String", "determineFreebsdLibrary", "(", "final", "String", "library", ",", "final", "String", "osName", ",", "final", "String", "osArch", ")", "{", "String", "resourceName", ";", "String", "platform", "=", "null", ";", "String", "fileExten...
Determine the right FreeBSD library depending on the architecture. @param library The library name. @param osName The operating system name. @param osArch The system architecture. @return The library resource. @throws UnsupportedOperationException Throw an exception if no native library for this platform was found.
[ "Determine", "the", "right", "FreeBSD", "library", "depending", "on", "the", "architecture", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/adapter/NativeLoader.java#L175-L196
134,131
bit3/jsass
src/main/java/io/bit3/jsass/adapter/NativeLoader.java
NativeLoader.determineMacLibrary
private static String determineMacLibrary(final String library) { String resourceName; String platform = "darwin"; String fileExtension = "dylib"; resourceName = "/" + platform + "/" + library + "." + fileExtension; return resourceName; }
java
private static String determineMacLibrary(final String library) { String resourceName; String platform = "darwin"; String fileExtension = "dylib"; resourceName = "/" + platform + "/" + library + "." + fileExtension; return resourceName; }
[ "private", "static", "String", "determineMacLibrary", "(", "final", "String", "library", ")", "{", "String", "resourceName", ";", "String", "platform", "=", "\"darwin\"", ";", "String", "fileExtension", "=", "\"dylib\"", ";", "resourceName", "=", "\"/\"", "+", "...
Determine the right mac library depending on the architecture. @param library The library name. @return The library resource.
[ "Determine", "the", "right", "mac", "library", "depending", "on", "the", "architecture", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/adapter/NativeLoader.java#L204-L210
134,132
bit3/jsass
src/main/java/io/bit3/jsass/adapter/NativeLoader.java
NativeLoader.saveLibrary
static String saveLibrary(final File dir, final String libraryName) throws IOException { String libraryFileName = "lib" + libraryName; URL libraryResource = findLibraryResource(libraryFileName); String basename = FilenameUtils.getName(libraryResource.getPath()); File file = new File(dir, basename); ...
java
static String saveLibrary(final File dir, final String libraryName) throws IOException { String libraryFileName = "lib" + libraryName; URL libraryResource = findLibraryResource(libraryFileName); String basename = FilenameUtils.getName(libraryResource.getPath()); File file = new File(dir, basename); ...
[ "static", "String", "saveLibrary", "(", "final", "File", "dir", ",", "final", "String", "libraryName", ")", "throws", "IOException", "{", "String", "libraryFileName", "=", "\"lib\"", "+", "libraryName", ";", "URL", "libraryResource", "=", "findLibraryResource", "(...
Save the shared library in the given temporary directory.
[ "Save", "the", "shared", "library", "in", "the", "given", "temporary", "directory", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/adapter/NativeLoader.java#L215-L234
134,133
bit3/jsass
src/main/java/io/bit3/jsass/adapter/NativeAdapter.java
NativeAdapter.compile
public Output compile(FileContext context, ImportStack importStack) throws CompilationException { NativeFileContext nativeContext = convertToNativeContext(context, importStack); return compileFile(nativeContext); }
java
public Output compile(FileContext context, ImportStack importStack) throws CompilationException { NativeFileContext nativeContext = convertToNativeContext(context, importStack); return compileFile(nativeContext); }
[ "public", "Output", "compile", "(", "FileContext", "context", ",", "ImportStack", "importStack", ")", "throws", "CompilationException", "{", "NativeFileContext", "nativeContext", "=", "convertToNativeContext", "(", "context", ",", "importStack", ")", ";", "return", "c...
Compile a file context. @return The compiled result.
[ "Compile", "a", "file", "context", "." ]
fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/adapter/NativeAdapter.java#L42-L45
134,134
CenturyLinkCloud/mdw
mdw-workflow/src/com/centurylink/mdw/workflow/activity/sync/SynchronizationActivity.java
SynchronizationActivity.execute
public void execute() throws ActivityException{ isSynchronized = checkIfSynchronized(); if (!isSynchronized) { EventWaitInstance received = registerWaitEvents(false, true); if (received!=null) resume(getExternalEventInstanceDetails(received.getMessageDocumentId(...
java
public void execute() throws ActivityException{ isSynchronized = checkIfSynchronized(); if (!isSynchronized) { EventWaitInstance received = registerWaitEvents(false, true); if (received!=null) resume(getExternalEventInstanceDetails(received.getMessageDocumentId(...
[ "public", "void", "execute", "(", ")", "throws", "ActivityException", "{", "isSynchronized", "=", "checkIfSynchronized", "(", ")", ";", "if", "(", "!", "isSynchronized", ")", "{", "EventWaitInstance", "received", "=", "registerWaitEvents", "(", "false", ",", "tr...
Executes the controlled activity @throws ActivityException
[ "Executes", "the", "controlled", "activity" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/activity/sync/SynchronizationActivity.java#L58-L65
134,135
CenturyLinkCloud/mdw
mdw-workflow/src/com/centurylink/mdw/workflow/activity/sync/SynchronizationActivity.java
SynchronizationActivity.escape
private String escape(String rawActivityName) { boolean lastIsUnderScore = false; StringBuffer sb = new StringBuffer(); for (int i=0; i<rawActivityName.length(); i++) { char ch = rawActivityName.charAt(i); if (Character.isLetterOrDigit(ch)) { sb.append(ch)...
java
private String escape(String rawActivityName) { boolean lastIsUnderScore = false; StringBuffer sb = new StringBuffer(); for (int i=0; i<rawActivityName.length(); i++) { char ch = rawActivityName.charAt(i); if (Character.isLetterOrDigit(ch)) { sb.append(ch)...
[ "private", "String", "escape", "(", "String", "rawActivityName", ")", "{", "boolean", "lastIsUnderScore", "=", "false", ";", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "rawActivityName"...
Replaces space characters in the activity name with underscores. @param rawActivityName @return the escaped activity name
[ "Replaces", "space", "characters", "in", "the", "activity", "name", "with", "underscores", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/activity/sync/SynchronizationActivity.java#L110-L124
134,136
CenturyLinkCloud/mdw
mdw-workflow/src/com/centurylink/mdw/workflow/activity/sync/SynchronizationActivity.java
SynchronizationActivity.getIncomingTransitions
private List<Transition> getIncomingTransitions(Process procdef, Long activityId, Map<String,String> idToEscapedName) { List<Transition> incomingTransitions = new ArrayList<Transition>(); for (Transition trans : procdef.getTransitions()) { if (trans.getToId().equals(activityId)) ...
java
private List<Transition> getIncomingTransitions(Process procdef, Long activityId, Map<String,String> idToEscapedName) { List<Transition> incomingTransitions = new ArrayList<Transition>(); for (Transition trans : procdef.getTransitions()) { if (trans.getToId().equals(activityId)) ...
[ "private", "List", "<", "Transition", ">", "getIncomingTransitions", "(", "Process", "procdef", ",", "Long", "activityId", ",", "Map", "<", "String", ",", "String", ">", "idToEscapedName", ")", "{", "List", "<", "Transition", ">", "incomingTransitions", "=", "...
reuse WorkTransitionVO for sync info
[ "reuse", "WorkTransitionVO", "for", "sync", "info" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/activity/sync/SynchronizationActivity.java#L129-L145
134,137
CenturyLinkCloud/mdw
mdw-workflow/src/com/centurylink/mdw/workflow/adapter/soap/MdwRpcWebServiceAdapter.java
MdwRpcWebServiceAdapter.createSoapRequest
protected SOAPMessage createSoapRequest(Object requestObj) throws ActivityException { try { MessageFactory messageFactory = getSoapMessageFactory(); SOAPMessage soapMessage = messageFactory.createMessage(); Map<Name,String> soapReqHeaders = getSoapRequestHeaders(); ...
java
protected SOAPMessage createSoapRequest(Object requestObj) throws ActivityException { try { MessageFactory messageFactory = getSoapMessageFactory(); SOAPMessage soapMessage = messageFactory.createMessage(); Map<Name,String> soapReqHeaders = getSoapRequestHeaders(); ...
[ "protected", "SOAPMessage", "createSoapRequest", "(", "Object", "requestObj", ")", "throws", "ActivityException", "{", "try", "{", "MessageFactory", "messageFactory", "=", "getSoapMessageFactory", "(", ")", ";", "SOAPMessage", "soapMessage", "=", "messageFactory", ".", ...
Populate the SOAP request message.
[ "Populate", "the", "SOAP", "request", "message", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/soap/MdwRpcWebServiceAdapter.java#L57-L95
134,138
CenturyLinkCloud/mdw
mdw-workflow/src/com/centurylink/mdw/workflow/adapter/soap/MdwRpcWebServiceAdapter.java
MdwRpcWebServiceAdapter.unwrapSoapResponse
protected Node unwrapSoapResponse(SOAPMessage soapResponse) throws ActivityException, AdapterException { try { // unwrap the soap content from the message SOAPBody soapBody = soapResponse.getSOAPBody(); Node childElem = null; Iterator<?> it = soapBody.getChildElem...
java
protected Node unwrapSoapResponse(SOAPMessage soapResponse) throws ActivityException, AdapterException { try { // unwrap the soap content from the message SOAPBody soapBody = soapResponse.getSOAPBody(); Node childElem = null; Iterator<?> it = soapBody.getChildElem...
[ "protected", "Node", "unwrapSoapResponse", "(", "SOAPMessage", "soapResponse", ")", "throws", "ActivityException", ",", "AdapterException", "{", "try", "{", "// unwrap the soap content from the message", "SOAPBody", "soapBody", "=", "soapResponse", ".", "getSOAPBody", "(", ...
Unwrap the SOAP response into a DOM Node.
[ "Unwrap", "the", "SOAP", "response", "into", "a", "DOM", "Node", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/soap/MdwRpcWebServiceAdapter.java#L100-L132
134,139
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/service/api/ResourceReaderExtension.java
ResourceReaderExtension.applyImplicitParameters
@Override public void applyImplicitParameters(ReaderContext context, Operation operation, Method method) { // copied from io.swagger.servlet.extensions.ServletReaderExtension final ApiImplicitParams implicitParams = method.getAnnotation(ApiImplicitParams.class); if (implicitParams != null &&...
java
@Override public void applyImplicitParameters(ReaderContext context, Operation operation, Method method) { // copied from io.swagger.servlet.extensions.ServletReaderExtension final ApiImplicitParams implicitParams = method.getAnnotation(ApiImplicitParams.class); if (implicitParams != null &&...
[ "@", "Override", "public", "void", "applyImplicitParameters", "(", "ReaderContext", "context", ",", "Operation", "operation", ",", "Method", "method", ")", "{", "// copied from io.swagger.servlet.extensions.ServletReaderExtension", "final", "ApiImplicitParams", "implicitParams"...
Implemented to allow loading of custom types using CloudClassLoader.
[ "Implemented", "to", "allow", "loading", "of", "custom", "types", "using", "CloudClassLoader", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/api/ResourceReaderExtension.java#L171-L185
134,140
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/asset/Pagelet.java
Pagelet.translateType
private String translateType(String type, Map<String,String> attrs) { String translated = type.toLowerCase(); if ("select".equals(type)) translated = "radio"; else if ("boolean".equals(type)) translated = "checkbox"; else if ("list".equals(type)) { tra...
java
private String translateType(String type, Map<String,String> attrs) { String translated = type.toLowerCase(); if ("select".equals(type)) translated = "radio"; else if ("boolean".equals(type)) translated = "checkbox"; else if ("list".equals(type)) { tra...
[ "private", "String", "translateType", "(", "String", "type", ",", "Map", "<", "String", ",", "String", ">", "attrs", ")", "{", "String", "translated", "=", "type", ".", "toLowerCase", "(", ")", ";", "if", "(", "\"select\"", ".", "equals", "(", "type", ...
Translate widget type.
[ "Translate", "widget", "type", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/asset/Pagelet.java#L199-L271
134,141
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/asset/Pagelet.java
Pagelet.adjustWidgets
private void adjustWidgets(String implCategory) { // adjust to add script language options param Map<Integer,Widget> companions = new HashMap<>(); for (int i = 0; i < widgets.size(); i++) { Widget widget = widgets.get(i); if ("expression".equals(widget.type) || ("edit".eq...
java
private void adjustWidgets(String implCategory) { // adjust to add script language options param Map<Integer,Widget> companions = new HashMap<>(); for (int i = 0; i < widgets.size(); i++) { Widget widget = widgets.get(i); if ("expression".equals(widget.type) || ("edit".eq...
[ "private", "void", "adjustWidgets", "(", "String", "implCategory", ")", "{", "// adjust to add script language options param", "Map", "<", "Integer", ",", "Widget", ">", "companions", "=", "new", "HashMap", "<>", "(", ")", ";", "for", "(", "int", "i", "=", "0"...
Adds companion widgets as needed.
[ "Adds", "companion", "widgets", "as", "needed", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/asset/Pagelet.java#L276-L300
134,142
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/app/Templates.java
Templates.substitute
public static String substitute(String input, Map<String,Object> values) { StringBuilder output = new StringBuilder(input.length()); int index = 0; Matcher matcher = SUBST_PATTERN.matcher(input); while (matcher.find()) { String match = matcher.group(); output.appe...
java
public static String substitute(String input, Map<String,Object> values) { StringBuilder output = new StringBuilder(input.length()); int index = 0; Matcher matcher = SUBST_PATTERN.matcher(input); while (matcher.find()) { String match = matcher.group(); output.appe...
[ "public", "static", "String", "substitute", "(", "String", "input", ",", "Map", "<", "String", ",", "Object", ">", "values", ")", "{", "StringBuilder", "output", "=", "new", "StringBuilder", "(", "input", ".", "length", "(", ")", ")", ";", "int", "index"...
Simple substitution mechanism. Missing values substituted with empty string.
[ "Simple", "substitution", "mechanism", ".", "Missing", "values", "substituted", "with", "empty", "string", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/app/Templates.java#L77-L90
134,143
CenturyLinkCloud/mdw
mdw-workflow/src/com/centurylink/mdw/workflow/activity/task/AutoFormManualTaskActivity.java
AutoFormManualTaskActivity.extractFormData
protected String extractFormData(JSONObject datadoc) throws ActivityException, JSONException { String varstring = this.getAttributeValue(TaskActivity.ATTRIBUTE_TASK_VARIABLES); List<String[]> parsed = StringHelper.parseTable(varstring, ',', ';', 5); for (String[] one : parsed) { ...
java
protected String extractFormData(JSONObject datadoc) throws ActivityException, JSONException { String varstring = this.getAttributeValue(TaskActivity.ATTRIBUTE_TASK_VARIABLES); List<String[]> parsed = StringHelper.parseTable(varstring, ',', ';', 5); for (String[] one : parsed) { ...
[ "protected", "String", "extractFormData", "(", "JSONObject", "datadoc", ")", "throws", "ActivityException", ",", "JSONException", "{", "String", "varstring", "=", "this", ".", "getAttributeValue", "(", "TaskActivity", ".", "ATTRIBUTE_TASK_VARIABLES", ")", ";", "List",...
This method is used to extract data from the message received from the task manager. The method updates all variables specified as non-readonly @param datadoc @return completion code; when it returns null, the completion code is taken from the completionCode parameter of the message with key FormDataDocument.ATTR_ACTI...
[ "This", "method", "is", "used", "to", "extract", "data", "from", "the", "message", "received", "from", "the", "task", "manager", ".", "The", "method", "updates", "all", "variables", "specified", "as", "non", "-", "readonly" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/activity/task/AutoFormManualTaskActivity.java#L170-L184
134,144
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/listener/file/FileListenerRegistration.java
FileListenerRegistration.onStartup
public void onStartup() throws StartupException { try { Map<String, Properties> fileListeners = getFileListeners(); for (String listenerName : fileListeners.keySet()) { Properties listenerProps = fileListeners.get(listenerName); String listenerClassName = ...
java
public void onStartup() throws StartupException { try { Map<String, Properties> fileListeners = getFileListeners(); for (String listenerName : fileListeners.keySet()) { Properties listenerProps = fileListeners.get(listenerName); String listenerClassName = ...
[ "public", "void", "onStartup", "(", ")", "throws", "StartupException", "{", "try", "{", "Map", "<", "String", ",", "Properties", ">", "fileListeners", "=", "getFileListeners", "(", ")", ";", "for", "(", "String", "listenerName", ":", "fileListeners", ".", "k...
Startup the file listeners.
[ "Startup", "the", "file", "listeners", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/listener/file/FileListenerRegistration.java#L44-L62
134,145
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/listener/file/FileListenerRegistration.java
FileListenerRegistration.onShutdown
public void onShutdown() { for (String listenerName : registeredFileListeners.keySet()) { logger.info("Deregistering File Listener: " + listenerName); FileListener listener = registeredFileListeners.get(listenerName); listener.stopListening(); } }
java
public void onShutdown() { for (String listenerName : registeredFileListeners.keySet()) { logger.info("Deregistering File Listener: " + listenerName); FileListener listener = registeredFileListeners.get(listenerName); listener.stopListening(); } }
[ "public", "void", "onShutdown", "(", ")", "{", "for", "(", "String", "listenerName", ":", "registeredFileListeners", ".", "keySet", "(", ")", ")", "{", "logger", ".", "info", "(", "\"Deregistering File Listener: \"", "+", "listenerName", ")", ";", "FileListener"...
Shutdown the file listeners.
[ "Shutdown", "the", "file", "listeners", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/listener/file/FileListenerRegistration.java#L67-L73
134,146
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/user/Workgroup.java
Workgroup.hasRole
public boolean hasRole(String roleName){ if (roles != null) { for (String r : roles) { if (r.equals(roleName)) return true; } } return false; }
java
public boolean hasRole(String roleName){ if (roles != null) { for (String r : roles) { if (r.equals(roleName)) return true; } } return false; }
[ "public", "boolean", "hasRole", "(", "String", "roleName", ")", "{", "if", "(", "roles", "!=", "null", ")", "{", "for", "(", "String", "r", ":", "roles", ")", "{", "if", "(", "r", ".", "equals", "(", "roleName", ")", ")", "return", "true", ";", "...
Check whether the group has the specified role.
[ "Check", "whether", "the", "group", "has", "the", "specified", "role", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/user/Workgroup.java#L148-L156
134,147
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/workflow/Process.java
Process.isWorkActivity
public boolean isWorkActivity(Long pWorkId) { if(this.activities == null){ return false; } for(int i=0; i<activities.size(); i++){ if(pWorkId.longValue() == activities.get(i).getId().longValue()){ return true; } } return false;...
java
public boolean isWorkActivity(Long pWorkId) { if(this.activities == null){ return false; } for(int i=0; i<activities.size(); i++){ if(pWorkId.longValue() == activities.get(i).getId().longValue()){ return true; } } return false;...
[ "public", "boolean", "isWorkActivity", "(", "Long", "pWorkId", ")", "{", "if", "(", "this", ".", "activities", "==", "null", ")", "{", "return", "false", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "activities", ".", "size", "(", ")"...
checks if the passed in workId is Activity @return boolean status
[ "checks", "if", "the", "passed", "in", "workId", "is", "Activity" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/workflow/Process.java#L102-L113
134,148
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/workflow/Process.java
Process.getSubProcessVO
public Process getSubProcessVO(Long id) { if (this.getId() != null && this.getId().equals(id)) // Id field is null for instance definitions return this; if (this.subprocesses == null) return null; for (Process ret : subprocesses) { if (ret.getId().equals(id)) ...
java
public Process getSubProcessVO(Long id) { if (this.getId() != null && this.getId().equals(id)) // Id field is null for instance definitions return this; if (this.subprocesses == null) return null; for (Process ret : subprocesses) { if (ret.getId().equals(id)) ...
[ "public", "Process", "getSubProcessVO", "(", "Long", "id", ")", "{", "if", "(", "this", ".", "getId", "(", ")", "!=", "null", "&&", "this", ".", "getId", "(", ")", ".", "equals", "(", "id", ")", ")", "// Id field is null for instance definitions", "return"...
returns the process VO identified by the passed in work id It is also possible the sub process is referencing self. @param id
[ "returns", "the", "process", "VO", "identified", "by", "the", "passed", "in", "work", "id", "It", "is", "also", "possible", "the", "sub", "process", "is", "referencing", "self", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/workflow/Process.java#L120-L130
134,149
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/workflow/Process.java
Process.getActivityVO
public Activity getActivityVO(Long pWorkId) { if(this.activities == null){ return null; } for(int i=0; i<activities.size(); i++){ if(pWorkId.longValue() == activities.get(i).getId().longValue()){ return activities.get(i); } } r...
java
public Activity getActivityVO(Long pWorkId) { if(this.activities == null){ return null; } for(int i=0; i<activities.size(); i++){ if(pWorkId.longValue() == activities.get(i).getId().longValue()){ return activities.get(i); } } r...
[ "public", "Activity", "getActivityVO", "(", "Long", "pWorkId", ")", "{", "if", "(", "this", ".", "activities", "==", "null", ")", "{", "return", "null", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "activities", ".", "size", "(", ")",...
Returns the Activity VO @param pWorkId @returb ActivityVO
[ "Returns", "the", "Activity", "VO" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/workflow/Process.java#L137-L148
134,150
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/workflow/Process.java
Process.getWorkTransitionVO
public Transition getWorkTransitionVO(Long pWorkTransId) { if(this.transitions == null){ return null; } for(int i=0; i<transitions.size(); i++){ if(pWorkTransId.longValue() == transitions.get(i).getId().longValue()){ return transitions.get(i); ...
java
public Transition getWorkTransitionVO(Long pWorkTransId) { if(this.transitions == null){ return null; } for(int i=0; i<transitions.size(); i++){ if(pWorkTransId.longValue() == transitions.get(i).getId().longValue()){ return transitions.get(i); ...
[ "public", "Transition", "getWorkTransitionVO", "(", "Long", "pWorkTransId", ")", "{", "if", "(", "this", ".", "transitions", "==", "null", ")", "{", "return", "null", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "transitions", ".", "size"...
Returns the WorkTransitionVO @param pWorkTransId @returb WorkTransitionVO
[ "Returns", "the", "WorkTransitionVO" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/workflow/Process.java#L155-L166
134,151
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/workflow/Process.java
Process.getTransition
public Transition getTransition(Long fromId, Integer eventType, String completionCode) { Transition ret = null; for (Transition transition : getTransitions()) { if (transition.getFromId().equals(fromId) && transition.match(eventType, completionCode)) { if ...
java
public Transition getTransition(Long fromId, Integer eventType, String completionCode) { Transition ret = null; for (Transition transition : getTransitions()) { if (transition.getFromId().equals(fromId) && transition.match(eventType, completionCode)) { if ...
[ "public", "Transition", "getTransition", "(", "Long", "fromId", ",", "Integer", "eventType", ",", "String", "completionCode", ")", "{", "Transition", "ret", "=", "null", ";", "for", "(", "Transition", "transition", ":", "getTransitions", "(", ")", ")", "{", ...
Finds one work transition for this process matching the specified parameters @param fromId @param eventType @param completionCode @return the work transition value object (or null if not found)
[ "Finds", "one", "work", "transition", "for", "this", "process", "matching", "the", "specified", "parameters" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/workflow/Process.java#L313-L327
134,152
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/workflow/Process.java
Process.getTransitions
public List<Transition> getTransitions(Long fromWorkId, Integer eventType, String completionCode) { List<Transition> allTransitions = getAllTransitions(fromWorkId); List<Transition> returnSet = findTransitions(allTransitions, eventType, completionCode); if (returnSet.size() > 0) retu...
java
public List<Transition> getTransitions(Long fromWorkId, Integer eventType, String completionCode) { List<Transition> allTransitions = getAllTransitions(fromWorkId); List<Transition> returnSet = findTransitions(allTransitions, eventType, completionCode); if (returnSet.size() > 0) retu...
[ "public", "List", "<", "Transition", ">", "getTransitions", "(", "Long", "fromWorkId", ",", "Integer", "eventType", ",", "String", "completionCode", ")", "{", "List", "<", "Transition", ">", "allTransitions", "=", "getAllTransitions", "(", "fromWorkId", ")", ";"...
Finds the work transitions from the given activity that match the event type and completion code. A DEFAULT completion code matches any completion code if and only if there is no other matches @param fromWorkId @param eventType @parame completionCode @return the matching work transition value objects
[ "Finds", "the", "work", "transitions", "from", "the", "given", "activity", "that", "match", "the", "event", "type", "and", "completion", "code", ".", "A", "DEFAULT", "completion", "code", "matches", "any", "completion", "code", "if", "and", "only", "if", "th...
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/workflow/Process.java#L379-L399
134,153
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/workflow/Process.java
Process.getTransition
public Transition getTransition(Long id) { for (Transition transition : getTransitions()) { if (transition.getId().equals(id)) return transition; } return null; // not found }
java
public Transition getTransition(Long id) { for (Transition transition : getTransitions()) { if (transition.getId().equals(id)) return transition; } return null; // not found }
[ "public", "Transition", "getTransition", "(", "Long", "id", ")", "{", "for", "(", "Transition", "transition", ":", "getTransitions", "(", ")", ")", "{", "if", "(", "transition", ".", "getId", "(", ")", ".", "equals", "(", "id", ")", ")", "return", "tra...
Find a work transition based on its id value @param id @return the matching transition VO, or null if not found
[ "Find", "a", "work", "transition", "based", "on", "its", "id", "value" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/workflow/Process.java#L425-L431
134,154
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/workflow/Process.java
Process.getActivityById
public Activity getActivityById(String logicalId) { for (Activity activityVO : getActivities()) { if (activityVO.getLogicalId().equals(logicalId)) { activityVO.setProcessName(getName()); return activityVO; } } for (Process subProc : this.su...
java
public Activity getActivityById(String logicalId) { for (Activity activityVO : getActivities()) { if (activityVO.getLogicalId().equals(logicalId)) { activityVO.setProcessName(getName()); return activityVO; } } for (Process subProc : this.su...
[ "public", "Activity", "getActivityById", "(", "String", "logicalId", ")", "{", "for", "(", "Activity", "activityVO", ":", "getActivities", "(", ")", ")", "{", "if", "(", "activityVO", ".", "getLogicalId", "(", ")", ".", "equals", "(", "logicalId", ")", ")"...
Also searches subprocs.
[ "Also", "searches", "subprocs", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/workflow/Process.java#L519-L536
134,155
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/HttpHelper.java
HttpHelper.postBytes
public byte[] postBytes(byte[] content) throws IOException { if (!connection.isOpen()) connection.open(); connection.prepare("POST"); OutputStream os = connection.getOutputStream(); os.write(content); response = connection.readInput(); os.close(); ...
java
public byte[] postBytes(byte[] content) throws IOException { if (!connection.isOpen()) connection.open(); connection.prepare("POST"); OutputStream os = connection.getOutputStream(); os.write(content); response = connection.readInput(); os.close(); ...
[ "public", "byte", "[", "]", "postBytes", "(", "byte", "[", "]", "content", ")", "throws", "IOException", "{", "if", "(", "!", "connection", ".", "isOpen", "(", ")", ")", "connection", ".", "open", "(", ")", ";", "connection", ".", "prepare", "(", "\"...
Perform an HTTP POST request to the URL. @param content string containing the content to be posted @return string containing the response from the server
[ "Perform", "an", "HTTP", "POST", "request", "to", "the", "URL", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/HttpHelper.java#L109-L122
134,156
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/HttpHelper.java
HttpHelper.getBytes
public byte[] getBytes() throws IOException { if (!connection.isOpen()) connection.open(); connection.prepare("GET"); response = connection.readInput(); return getResponseBytes(); }
java
public byte[] getBytes() throws IOException { if (!connection.isOpen()) connection.open(); connection.prepare("GET"); response = connection.readInput(); return getResponseBytes(); }
[ "public", "byte", "[", "]", "getBytes", "(", ")", "throws", "IOException", "{", "if", "(", "!", "connection", ".", "isOpen", "(", ")", ")", "connection", ".", "open", "(", ")", ";", "connection", ".", "prepare", "(", "\"GET\"", ")", ";", "response", ...
Perform an HTTP GET request against the URL. @return the string response from the server
[ "Perform", "an", "HTTP", "GET", "request", "against", "the", "URL", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/HttpHelper.java#L132-L139
134,157
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/HttpHelper.java
HttpHelper.put
public String put(File file) throws IOException { if (!connection.isOpen()) connection.open(); connection.prepare("PUT"); String contentType = connection.getHeader("Content-Type"); if (contentType == null) contentType = connection.getHeader("content-type"); ...
java
public String put(File file) throws IOException { if (!connection.isOpen()) connection.open(); connection.prepare("PUT"); String contentType = connection.getHeader("Content-Type"); if (contentType == null) contentType = connection.getHeader("content-type"); ...
[ "public", "String", "put", "(", "File", "file", ")", "throws", "IOException", "{", "if", "(", "!", "connection", ".", "isOpen", "(", ")", ")", "connection", ".", "open", "(", ")", ";", "connection", ".", "prepare", "(", "\"PUT\"", ")", ";", "String", ...
Upload a text file to the destination URL @param file the file to be uploaded @param force whether to overwrite if the destination file is newer @return string with the response from the server
[ "Upload", "a", "text", "file", "to", "the", "destination", "URL" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/HttpHelper.java#L247-L299
134,158
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/HttpHelper.java
HttpHelper.deleteBytes
public byte[] deleteBytes(byte[] content) throws IOException { if (!connection.isOpen()) connection.open(); connection.prepare("DELETE"); OutputStream os = null; if (content != null) { connection.getConnection().setDoOutput(true); os = connection.ge...
java
public byte[] deleteBytes(byte[] content) throws IOException { if (!connection.isOpen()) connection.open(); connection.prepare("DELETE"); OutputStream os = null; if (content != null) { connection.getConnection().setDoOutput(true); os = connection.ge...
[ "public", "byte", "[", "]", "deleteBytes", "(", "byte", "[", "]", "content", ")", "throws", "IOException", "{", "if", "(", "!", "connection", ".", "isOpen", "(", ")", ")", "connection", ".", "open", "(", ")", ";", "connection", ".", "prepare", "(", "...
Perform an HTTP DELETE request to the URL. @param content bytes (not usually populated) @return string containing the response from the server
[ "Perform", "an", "HTTP", "DELETE", "request", "to", "the", "URL", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/HttpHelper.java#L319-L337
134,159
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java
EventServicesImpl.getDistinctEventLogEventSources
public String[] getDistinctEventLogEventSources() throws DataAccessException, EventException { TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { transaction = edao.startTransaction(); return edao.getDistinctEventLogEventS...
java
public String[] getDistinctEventLogEventSources() throws DataAccessException, EventException { TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { transaction = edao.startTransaction(); return edao.getDistinctEventLogEventS...
[ "public", "String", "[", "]", "getDistinctEventLogEventSources", "(", ")", "throws", "DataAccessException", ",", "EventException", "{", "TransactionWrapper", "transaction", "=", "null", ";", "EngineDataAccessDB", "edao", "=", "new", "EngineDataAccessDB", "(", ")", ";"...
Method that returns distinct event log sources @return String[]
[ "Method", "that", "returns", "distinct", "event", "log", "sources" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java#L121-L133
134,160
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java
EventServicesImpl.setVariableInstance
public VariableInstance setVariableInstance(Long procInstId, String name, Object value) throws DataAccessException { TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { transaction = edao.startTransaction(); VariableInstanc...
java
public VariableInstance setVariableInstance(Long procInstId, String name, Object value) throws DataAccessException { TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { transaction = edao.startTransaction(); VariableInstanc...
[ "public", "VariableInstance", "setVariableInstance", "(", "Long", "procInstId", ",", "String", "name", ",", "Object", "value", ")", "throws", "DataAccessException", "{", "TransactionWrapper", "transaction", "=", "null", ";", "EngineDataAccessDB", "edao", "=", "new", ...
create or update variable instance value. This does not take care of checking for embedded processes. For document variables, the value must be DocumentReference, not the document content
[ "create", "or", "update", "variable", "instance", "value", ".", "This", "does", "not", "take", "care", "of", "checking", "for", "embedded", "processes", ".", "For", "document", "variables", "the", "value", "must", "be", "DocumentReference", "not", "the", "docu...
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java#L140-L182
134,161
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java
EventServicesImpl.sendDelayEventsToWaitActivities
public void sendDelayEventsToWaitActivities(String masterRequestId) throws DataAccessException, ProcessException { TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { transaction = edao.startTransaction(); List<Proc...
java
public void sendDelayEventsToWaitActivities(String masterRequestId) throws DataAccessException, ProcessException { TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { transaction = edao.startTransaction(); List<Proc...
[ "public", "void", "sendDelayEventsToWaitActivities", "(", "String", "masterRequestId", ")", "throws", "DataAccessException", ",", "ProcessException", "{", "TransactionWrapper", "transaction", "=", "null", ";", "EngineDataAccessDB", "edao", "=", "new", "EngineDataAccessDB", ...
This is for regression tester only. @param masterRequestId
[ "This", "is", "for", "regression", "tester", "only", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java#L216-L238
134,162
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java
EventServicesImpl.isProcessInstanceResumable
private boolean isProcessInstanceResumable(ProcessInstance pInstance) { int statusCd = pInstance.getStatusCode().intValue(); if (statusCd == WorkStatus.STATUS_COMPLETED.intValue()) { return false; } else if (statusCd == WorkStatus.STATUS_CANCELLED.intValue()) { return fa...
java
private boolean isProcessInstanceResumable(ProcessInstance pInstance) { int statusCd = pInstance.getStatusCode().intValue(); if (statusCd == WorkStatus.STATUS_COMPLETED.intValue()) { return false; } else if (statusCd == WorkStatus.STATUS_CANCELLED.intValue()) { return fa...
[ "private", "boolean", "isProcessInstanceResumable", "(", "ProcessInstance", "pInstance", ")", "{", "int", "statusCd", "=", "pInstance", ".", "getStatusCode", "(", ")", ".", "intValue", "(", ")", ";", "if", "(", "statusCd", "==", "WorkStatus", ".", "STATUS_COMPLE...
Checks if the process inst is resumable @param pInstance @return boolean status
[ "Checks", "if", "the", "process", "inst", "is", "resumable" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java#L334-L343
134,163
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java
EventServicesImpl.getProcessInstance
public ProcessInstance getProcessInstance(Long procInstId) throws ProcessException, DataAccessException { TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { transaction = edao.startTransaction(); return edao.getProcessInst...
java
public ProcessInstance getProcessInstance(Long procInstId) throws ProcessException, DataAccessException { TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { transaction = edao.startTransaction(); return edao.getProcessInst...
[ "public", "ProcessInstance", "getProcessInstance", "(", "Long", "procInstId", ")", "throws", "ProcessException", ",", "DataAccessException", "{", "TransactionWrapper", "transaction", "=", "null", ";", "EngineDataAccessDB", "edao", "=", "new", "EngineDataAccessDB", "(", ...
Returns the ProcessInstance identified by the passed in Id @param procInstId @return ProcessInstance
[ "Returns", "the", "ProcessInstance", "identified", "by", "the", "passed", "in", "Id" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java#L351-L364
134,164
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java
EventServicesImpl.getProcessInstances
@Override public List<ProcessInstance> getProcessInstances(String masterRequestId, String processName) throws ProcessException, DataAccessException { TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { Process procdef = ProcessCach...
java
@Override public List<ProcessInstance> getProcessInstances(String masterRequestId, String processName) throws ProcessException, DataAccessException { TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { Process procdef = ProcessCach...
[ "@", "Override", "public", "List", "<", "ProcessInstance", ">", "getProcessInstances", "(", "String", "masterRequestId", ",", "String", "processName", ")", "throws", "ProcessException", ",", "DataAccessException", "{", "TransactionWrapper", "transaction", "=", "null", ...
Returns the process instances by process name and master request ID. @param processName @param masterRequestId @return the list of process instances. If the process definition is not found, null is returned; if process definition is found but no process instances are found, an empty list is returned. @throws ProcessEx...
[ "Returns", "the", "process", "instances", "by", "process", "name", "and", "master", "request", "ID", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java#L377-L392
134,165
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java
EventServicesImpl.getActivityInstances
public List<ActivityInstance> getActivityInstances(String masterRequestId, String processName, String activityLogicalId) throws ProcessException, DataAccessException { TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { Process procdef...
java
public List<ActivityInstance> getActivityInstances(String masterRequestId, String processName, String activityLogicalId) throws ProcessException, DataAccessException { TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { Process procdef...
[ "public", "List", "<", "ActivityInstance", ">", "getActivityInstances", "(", "String", "masterRequestId", ",", "String", "processName", ",", "String", "activityLogicalId", ")", "throws", "ProcessException", ",", "DataAccessException", "{", "TransactionWrapper", "transacti...
Returns the activity instances by process name, activity logical ID, and master request ID. @param processName @param activityLogicalId @param masterRequestId @return the list of activity instances. If the process definition or the activity with the given logical ID is not found, null is returned; if process definiti...
[ "Returns", "the", "activity", "instances", "by", "process", "name", "activity", "logical", "ID", "and", "master", "request", "ID", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java#L407-L433
134,166
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java
EventServicesImpl.getActivityInstance
public ActivityInstance getActivityInstance(Long pActivityInstId) throws ProcessException, DataAccessException { ActivityInstance ai; TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { transaction = edao.startTransaction(); ...
java
public ActivityInstance getActivityInstance(Long pActivityInstId) throws ProcessException, DataAccessException { ActivityInstance ai; TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { transaction = edao.startTransaction(); ...
[ "public", "ActivityInstance", "getActivityInstance", "(", "Long", "pActivityInstId", ")", "throws", "ProcessException", ",", "DataAccessException", "{", "ActivityInstance", "ai", ";", "TransactionWrapper", "transaction", "=", "null", ";", "EngineDataAccessDB", "edao", "="...
Returns the ActivityInstance identified by the passed in Id @param pActivityInstId @return ActivityInstance
[ "Returns", "the", "ActivityInstance", "identified", "by", "the", "passed", "in", "Id" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java#L441-L455
134,167
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java
EventServicesImpl.getWorkTransitionInstance
public TransitionInstance getWorkTransitionInstance(Long pId) throws DataAccessException, ProcessException { TransitionInstance wti; TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { transaction = edao.startTransaction(); ...
java
public TransitionInstance getWorkTransitionInstance(Long pId) throws DataAccessException, ProcessException { TransitionInstance wti; TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { transaction = edao.startTransaction(); ...
[ "public", "TransitionInstance", "getWorkTransitionInstance", "(", "Long", "pId", ")", "throws", "DataAccessException", ",", "ProcessException", "{", "TransitionInstance", "wti", ";", "TransactionWrapper", "transaction", "=", "null", ";", "EngineDataAccessDB", "edao", "=",...
Returns the WorkTransitionVO based on the passed in params @param pId @return WorkTransitionINstance
[ "Returns", "the", "WorkTransitionVO", "based", "on", "the", "passed", "in", "params" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java#L463-L477
134,168
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/Value.java
Value.getJson
public JSONObject getJson() throws JSONException { JSONObject json = create(); if (value != null) json.put("value", value); if (label != null) json.put("label", label); if (type != null) json.put("type", type); if (display != null) ...
java
public JSONObject getJson() throws JSONException { JSONObject json = create(); if (value != null) json.put("value", value); if (label != null) json.put("label", label); if (type != null) json.put("type", type); if (display != null) ...
[ "public", "JSONObject", "getJson", "(", ")", "throws", "JSONException", "{", "JSONObject", "json", "=", "create", "(", ")", ";", "if", "(", "value", "!=", "null", ")", "json", ".", "put", "(", "\"value\"", ",", "value", ")", ";", "if", "(", "label", ...
expects to be a json object named 'name', so does not include name
[ "expects", "to", "be", "a", "json", "object", "named", "name", "so", "does", "not", "include", "name" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/Value.java#L99-L114
134,169
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/Value.java
Value.getDisplay
@ApiModelProperty(hidden=true) public static Display getDisplay(String option) { if ("Optional".equals(option)) return Display.Optional; else if ("Required".equals(option)) return Display.Required; else if ("Read Only".equals(option)) return Display.ReadOn...
java
@ApiModelProperty(hidden=true) public static Display getDisplay(String option) { if ("Optional".equals(option)) return Display.Optional; else if ("Required".equals(option)) return Display.Required; else if ("Read Only".equals(option)) return Display.ReadOn...
[ "@", "ApiModelProperty", "(", "hidden", "=", "true", ")", "public", "static", "Display", "getDisplay", "(", "String", "option", ")", "{", "if", "(", "\"Optional\"", ".", "equals", "(", "option", ")", ")", "return", "Display", ".", "Optional", ";", "else", ...
Maps Designer display option to Display type.
[ "Maps", "Designer", "display", "option", "to", "Display", "type", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/Value.java#L128-L140
134,170
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/Value.java
Value.getDisplay
public static Display getDisplay(int mode) { if (mode == 0) return Display.Required; else if (mode == 1) return Display.Optional; else if (mode == 2) return Display.ReadOnly; else if (mode == 3) return Display.Hidden; else ...
java
public static Display getDisplay(int mode) { if (mode == 0) return Display.Required; else if (mode == 1) return Display.Optional; else if (mode == 2) return Display.ReadOnly; else if (mode == 3) return Display.Hidden; else ...
[ "public", "static", "Display", "getDisplay", "(", "int", "mode", ")", "{", "if", "(", "mode", "==", "0", ")", "return", "Display", ".", "Required", ";", "else", "if", "(", "mode", "==", "1", ")", "return", "Display", ".", "Optional", ";", "else", "if...
Maps VariableVO display mode to Display type.
[ "Maps", "VariableVO", "display", "mode", "to", "Display", "type", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/Value.java#L145-L156
134,171
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/timer/startup/UserGroupMonitor.java
UserGroupMonitor.onStartup
public void onStartup() throws StartupException { if (monitor == null) { monitor = this; thread = new Thread() { @Override public void run() { this.setName("UserGroupMonitor-thread"); monitor.start(); ...
java
public void onStartup() throws StartupException { if (monitor == null) { monitor = this; thread = new Thread() { @Override public void run() { this.setName("UserGroupMonitor-thread"); monitor.start(); ...
[ "public", "void", "onStartup", "(", ")", "throws", "StartupException", "{", "if", "(", "monitor", "==", "null", ")", "{", "monitor", "=", "this", ";", "thread", "=", "new", "Thread", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ")", ...
Invoked when the server starts up.
[ "Invoked", "when", "the", "server", "starts", "up", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/timer/startup/UserGroupMonitor.java#L45-L57
134,172
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/JMSServices.java
JMSServices.sendTextMessage
public void sendTextMessage(String queueName, String message, int delaySeconds) throws NamingException, JMSException, ServiceLocatorException { sendTextMessage(null, queueName, message, delaySeconds, null); }
java
public void sendTextMessage(String queueName, String message, int delaySeconds) throws NamingException, JMSException, ServiceLocatorException { sendTextMessage(null, queueName, message, delaySeconds, null); }
[ "public", "void", "sendTextMessage", "(", "String", "queueName", ",", "String", "message", ",", "int", "delaySeconds", ")", "throws", "NamingException", ",", "JMSException", ",", "ServiceLocatorException", "{", "sendTextMessage", "(", "null", ",", "queueName", ",", ...
Sends a JMS text message to a local queue. @param queueName local queues are based on logical queue names @param message the message string @param delaySeconds 0 for immediate @throws ServiceLocatorException
[ "Sends", "a", "JMS", "text", "message", "to", "a", "local", "queue", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/JMSServices.java#L117-L120
134,173
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/JMSServices.java
JMSServices.sendTextMessage
public void sendTextMessage(String contextUrl, String queueName, String message, int delaySeconds, String correlationId) throws NamingException, JMSException, ServiceLocatorException { if (logger.isDebugEnabled()) logger.debug("Send JMS message: " + message); if (mdwM...
java
public void sendTextMessage(String contextUrl, String queueName, String message, int delaySeconds, String correlationId) throws NamingException, JMSException, ServiceLocatorException { if (logger.isDebugEnabled()) logger.debug("Send JMS message: " + message); if (mdwM...
[ "public", "void", "sendTextMessage", "(", "String", "contextUrl", ",", "String", "queueName", ",", "String", "message", ",", "int", "delaySeconds", ",", "String", "correlationId", ")", "throws", "NamingException", ",", "JMSException", ",", "ServiceLocatorException", ...
Sends a JMS text message. @param contextUrl null for local queues @param queueName local queues are based on logical queue names @param message the message string @param delaySeconds 0 for immediate @throws ServiceLocatorException
[ "Sends", "a", "JMS", "text", "message", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/JMSServices.java#L135-L190
134,174
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/JMSServices.java
JMSServices.getQueue
public Queue getQueue(Session session, String commonName) throws ServiceLocatorException { Queue queue = (Queue) queueCache.get(commonName); if (queue == null) { try { String name = namingProvider.qualifyJmsQueueName(commonName); queue = jmsProvider.getQueue(s...
java
public Queue getQueue(Session session, String commonName) throws ServiceLocatorException { Queue queue = (Queue) queueCache.get(commonName); if (queue == null) { try { String name = namingProvider.qualifyJmsQueueName(commonName); queue = jmsProvider.getQueue(s...
[ "public", "Queue", "getQueue", "(", "Session", "session", ",", "String", "commonName", ")", "throws", "ServiceLocatorException", "{", "Queue", "queue", "=", "(", "Queue", ")", "queueCache", ".", "get", "(", "commonName", ")", ";", "if", "(", "queue", "==", ...
Uses the container-specific qualifier to look up a JMS queue. @param commonName the vendor-neutral logical queue name @return javax.jms.Queue
[ "Uses", "the", "container", "-", "specific", "qualifier", "to", "look", "up", "a", "JMS", "queue", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/JMSServices.java#L221-L235
134,175
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/JMSServices.java
JMSServices.getQueue
public Queue getQueue(String contextUrl, String queueName) throws ServiceLocatorException { try { String jndiName = null; if (contextUrl == null) { jndiName = namingProvider.qualifyJmsQueueName(queueName); } else { jndiName = queueN...
java
public Queue getQueue(String contextUrl, String queueName) throws ServiceLocatorException { try { String jndiName = null; if (contextUrl == null) { jndiName = namingProvider.qualifyJmsQueueName(queueName); } else { jndiName = queueN...
[ "public", "Queue", "getQueue", "(", "String", "contextUrl", ",", "String", "queueName", ")", "throws", "ServiceLocatorException", "{", "try", "{", "String", "jndiName", "=", "null", ";", "if", "(", "contextUrl", "==", "null", ")", "{", "jndiName", "=", "nami...
Looks up and returns a JMS queue. @param queueName remote queue name @param contextUrl the context url (or null for local) @return javax.jms.Queue
[ "Looks", "up", "and", "returns", "a", "JMS", "queue", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/JMSServices.java#L246-L260
134,176
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/JMSServices.java
JMSServices.broadcastTextMessage
public void broadcastTextMessage(String topicName, String textMessage, int delaySeconds) throws NamingException, JMSException, ServiceLocatorException { if (mdwMessageProducer != null) { mdwMessageProducer.broadcastMessageToTopic(topicName, textMessage); } else { ...
java
public void broadcastTextMessage(String topicName, String textMessage, int delaySeconds) throws NamingException, JMSException, ServiceLocatorException { if (mdwMessageProducer != null) { mdwMessageProducer.broadcastMessageToTopic(topicName, textMessage); } else { ...
[ "public", "void", "broadcastTextMessage", "(", "String", "topicName", ",", "String", "textMessage", ",", "int", "delaySeconds", ")", "throws", "NamingException", ",", "JMSException", ",", "ServiceLocatorException", "{", "if", "(", "mdwMessageProducer", "!=", "null", ...
Sends the passed in text message to a local topic @param topicName @param pMessage @param delaySeconds @throws ServiceLocatorException
[ "Sends", "the", "passed", "in", "text", "message", "to", "a", "local", "topic" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/JMSServices.java#L299-L345
134,177
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/dataaccess/DatabaseAccess.java
DatabaseAccess.runSelect
public ResultSet runSelect(String logMessage, String query, Object[] arguments) throws SQLException { long before = System.currentTimeMillis(); try { return runSelect(query, arguments); } finally { if (logger.isDebugEnabled()) { long after = System...
java
public ResultSet runSelect(String logMessage, String query, Object[] arguments) throws SQLException { long before = System.currentTimeMillis(); try { return runSelect(query, arguments); } finally { if (logger.isDebugEnabled()) { long after = System...
[ "public", "ResultSet", "runSelect", "(", "String", "logMessage", ",", "String", "query", ",", "Object", "[", "]", "arguments", ")", "throws", "SQLException", "{", "long", "before", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "try", "{", "return",...
Ordinarily db query logging is at TRACE level. Use this method to log queries at DEBUG level.
[ "Ordinarily", "db", "query", "logging", "is", "at", "TRACE", "level", ".", "Use", "this", "method", "to", "log", "queries", "at", "DEBUG", "level", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/dataaccess/DatabaseAccess.java#L436-L447
134,178
CenturyLinkCloud/mdw
mdw-workflow/assets/com/centurylink/mdw/drools/DroolsActivity.java
DroolsActivity.getKnowledgeBase
protected KieBase getKnowledgeBase(String name, String version) throws ActivityException { return getKnowledgeBase(name, version, null); }
java
protected KieBase getKnowledgeBase(String name, String version) throws ActivityException { return getKnowledgeBase(name, version, null); }
[ "protected", "KieBase", "getKnowledgeBase", "(", "String", "name", ",", "String", "version", ")", "throws", "ActivityException", "{", "return", "getKnowledgeBase", "(", "name", ",", "version", ",", "null", ")", ";", "}" ]
Get knowledge base with no modifiers.
[ "Get", "knowledge", "base", "with", "no", "modifiers", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/drools/DroolsActivity.java#L103-L105
134,179
CenturyLinkCloud/mdw
mdw-workflow/assets/com/centurylink/mdw/drools/DroolsActivity.java
DroolsActivity.getClassLoader
protected ClassLoader getClassLoader() { ClassLoader loader = null; Package pkg = PackageCache.getProcessPackage(getProcessId()); if (pkg != null) { loader = pkg.getCloudClassLoader(); } if (loader == null) { loader = getClass().getClassLoader(); }...
java
protected ClassLoader getClassLoader() { ClassLoader loader = null; Package pkg = PackageCache.getProcessPackage(getProcessId()); if (pkg != null) { loader = pkg.getCloudClassLoader(); } if (loader == null) { loader = getClass().getClassLoader(); }...
[ "protected", "ClassLoader", "getClassLoader", "(", ")", "{", "ClassLoader", "loader", "=", "null", ";", "Package", "pkg", "=", "PackageCache", ".", "getProcessPackage", "(", "getProcessId", "(", ")", ")", ";", "if", "(", "pkg", "!=", "null", ")", "{", "loa...
Get the class loader based on package bundle version spec default is mdw-workflow loader @return
[ "Get", "the", "class", "loader", "based", "on", "package", "bundle", "version", "spec", "default", "is", "mdw", "-", "workflow", "loader" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/drools/DroolsActivity.java#L137-L147
134,180
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/service/rest/System.java
System.getRoles
public List<String> getRoles(String path) { List<String> roles = super.getRoles(path); roles.add(Role.ASSET_DESIGN); return roles; }
java
public List<String> getRoles(String path) { List<String> roles = super.getRoles(path); roles.add(Role.ASSET_DESIGN); return roles; }
[ "public", "List", "<", "String", ">", "getRoles", "(", "String", "path", ")", "{", "List", "<", "String", ">", "roles", "=", "super", ".", "getRoles", "(", "path", ")", ";", "roles", ".", "add", "(", "Role", ".", "ASSET_DESIGN", ")", ";", "return", ...
ASSET_DESIGN role can PUT in-memory config for running tests.
[ "ASSET_DESIGN", "role", "can", "PUT", "in", "-", "memory", "config", "for", "running", "tests", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/System.java#L53-L57
134,181
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/cli/SwaggerCodegen.java
SwaggerCodegen.toApiImport
@Override public String toApiImport(String name) { if (!apiPackage().isEmpty()) return apiPackage(); else if (trimApiPaths) return trimmedPaths.get(name).substring(1).replace('/', '.'); else return super.toApiImport(name); }
java
@Override public String toApiImport(String name) { if (!apiPackage().isEmpty()) return apiPackage(); else if (trimApiPaths) return trimmedPaths.get(name).substring(1).replace('/', '.'); else return super.toApiImport(name); }
[ "@", "Override", "public", "String", "toApiImport", "(", "String", "name", ")", "{", "if", "(", "!", "apiPackage", "(", ")", ".", "isEmpty", "(", ")", ")", "return", "apiPackage", "(", ")", ";", "else", "if", "(", "trimApiPaths", ")", "return", "trimme...
We use this for API package in our templates when trimmedPaths is true.
[ "We", "use", "this", "for", "API", "package", "in", "our", "templates", "when", "trimmedPaths", "is", "true", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cli/SwaggerCodegen.java#L173-L181
134,182
CenturyLinkCloud/mdw
mdw-hub/src/com/centurylink/mdw/hub/context/WebAppContext.java
WebAppContext.listOverrideFiles
public static List<File> listOverrideFiles(String type) throws IOException { List<File> files = new ArrayList<File>(); if (getMdw().getOverrideRoot().isDirectory()) { File dir = new File(getMdw().getOverrideRoot() + "/" + type); if (dir.isDirectory()) addFiles(fil...
java
public static List<File> listOverrideFiles(String type) throws IOException { List<File> files = new ArrayList<File>(); if (getMdw().getOverrideRoot().isDirectory()) { File dir = new File(getMdw().getOverrideRoot() + "/" + type); if (dir.isDirectory()) addFiles(fil...
[ "public", "static", "List", "<", "File", ">", "listOverrideFiles", "(", "String", "type", ")", "throws", "IOException", "{", "List", "<", "File", ">", "files", "=", "new", "ArrayList", "<", "File", ">", "(", ")", ";", "if", "(", "getMdw", "(", ")", "...
Recursively list override files. Assumes dir path == ext == type.
[ "Recursively", "list", "override", "files", ".", "Assumes", "dir", "path", "==", "ext", "==", "type", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-hub/src/com/centurylink/mdw/hub/context/WebAppContext.java#L102-L110
134,183
CenturyLinkCloud/mdw
mdw-workflow/assets/com/centurylink/mdw/system/filepanel/FileView.java
FileView.search
private int search(int startLine, boolean backward) throws IOException { search = search.toLowerCase(); try (Stream<String> stream = Files.lines(path)) { if (backward) { int idx = -1; if (startLine > 0) idx = searchTo(startLine - 1, true); ...
java
private int search(int startLine, boolean backward) throws IOException { search = search.toLowerCase(); try (Stream<String> stream = Files.lines(path)) { if (backward) { int idx = -1; if (startLine > 0) idx = searchTo(startLine - 1, true); ...
[ "private", "int", "search", "(", "int", "startLine", ",", "boolean", "backward", ")", "throws", "IOException", "{", "search", "=", "search", ".", "toLowerCase", "(", ")", ";", "try", "(", "Stream", "<", "String", ">", "stream", "=", "Files", ".", "lines"...
Search pass locates line index of first match.
[ "Search", "pass", "locates", "line", "index", "of", "first", "match", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/system/filepanel/FileView.java#L138-L161
134,184
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/timer/process/ScheduledProcessStart.java
ScheduledProcessStart.handleEventMessage
@Override public String handleEventMessage(String msg, Object msgdoc, Map<String, String> metainfo) throws EventHandlerException { return null; }
java
@Override public String handleEventMessage(String msg, Object msgdoc, Map<String, String> metainfo) throws EventHandlerException { return null; }
[ "@", "Override", "public", "String", "handleEventMessage", "(", "String", "msg", ",", "Object", "msgdoc", ",", "Map", "<", "String", ",", "String", ">", "metainfo", ")", "throws", "EventHandlerException", "{", "return", "null", ";", "}" ]
This is not used - the class extends ExternalEventHandlerBase only to get access to convenient methods
[ "This", "is", "not", "used", "-", "the", "class", "extends", "ExternalEventHandlerBase", "only", "to", "get", "access", "to", "convenient", "methods" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/timer/process/ScheduledProcessStart.java#L71-L75
134,185
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/script/GroovyExecutor.java
GroovyExecutor.initializeDynamicJavaAssets
private static void initializeDynamicJavaAssets() throws DataAccessException, IOException, CachingException { logger.info("Initializing Dynamic Java assets for Groovy..."); for (Asset java : AssetCache.getAssets(Asset.JAVA)) { Package pkg = PackageCache.getAssetPackage(java.getId()); ...
java
private static void initializeDynamicJavaAssets() throws DataAccessException, IOException, CachingException { logger.info("Initializing Dynamic Java assets for Groovy..."); for (Asset java : AssetCache.getAssets(Asset.JAVA)) { Package pkg = PackageCache.getAssetPackage(java.getId()); ...
[ "private", "static", "void", "initializeDynamicJavaAssets", "(", ")", "throws", "DataAccessException", ",", "IOException", ",", "CachingException", "{", "logger", ".", "info", "(", "\"Initializing Dynamic Java assets for Groovy...\"", ")", ";", "for", "(", "Asset", "jav...
so that Groovy scripts can reference these assets during compilation
[ "so", "that", "Groovy", "scripts", "can", "reference", "these", "assets", "during", "compilation" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/script/GroovyExecutor.java#L249-L275
134,186
CenturyLinkCloud/mdw
mdw-workflow/assets/com/centurylink/mdw/slack/SlackService.java
SlackService.post
public JSONObject post(String path, JSONObject content, Map<String,String> headers) throws ServiceException, JSONException { String sub = getSegment(path, 4); if ("event".equals(sub)) { SlackEvent event = new SlackEvent(content); EventHandler eventHandler = getEventHa...
java
public JSONObject post(String path, JSONObject content, Map<String,String> headers) throws ServiceException, JSONException { String sub = getSegment(path, 4); if ("event".equals(sub)) { SlackEvent event = new SlackEvent(content); EventHandler eventHandler = getEventHa...
[ "public", "JSONObject", "post", "(", "String", "path", ",", "JSONObject", "content", ",", "Map", "<", "String", ",", "String", ">", "headers", ")", "throws", "ServiceException", ",", "JSONException", "{", "String", "sub", "=", "getSegment", "(", "path", ",",...
Responds to requests from Slack.
[ "Responds", "to", "requests", "from", "Slack", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/slack/SlackService.java#L42-L74
134,187
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/service/rest/AuthenticatedUser.java
AuthenticatedUser.get
@Override public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException { // we trust this header value because only MDW can set it String authUser = (String)headers.get(Listener.AUTHENTICATED_USER_HEADER); try { if (authUser == null) ...
java
@Override public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException { // we trust this header value because only MDW can set it String authUser = (String)headers.get(Listener.AUTHENTICATED_USER_HEADER); try { if (authUser == null) ...
[ "@", "Override", "public", "JSONObject", "get", "(", "String", "path", ",", "Map", "<", "String", ",", "String", ">", "headers", ")", "throws", "ServiceException", ",", "JSONException", "{", "// we trust this header value because only MDW can set it", "String", "authU...
Retrieve the current authenticated user.
[ "Retrieve", "the", "current", "authenticated", "user", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/AuthenticatedUser.java#L49-L68
134,188
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/messenger/MessengerFactory.java
MessengerFactory.getEngineUrl
public static String getEngineUrl(String serverSpec) throws NamingException { String url; int at = serverSpec.indexOf('@'); if (at>0) { url = serverSpec.substring(at+1); } else { int colonDashDash = serverSpec.indexOf("://"); if (colonDashDash>0) { ...
java
public static String getEngineUrl(String serverSpec) throws NamingException { String url; int at = serverSpec.indexOf('@'); if (at>0) { url = serverSpec.substring(at+1); } else { int colonDashDash = serverSpec.indexOf("://"); if (colonDashDash>0) { ...
[ "public", "static", "String", "getEngineUrl", "(", "String", "serverSpec", ")", "throws", "NamingException", "{", "String", "url", ";", "int", "at", "=", "serverSpec", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "at", ">", "0", ")", "{", "url",...
Returns engine URL for another server, using server specification as input. Server specification can be one of the following forms a) URL of the form t3://host:port, iiop://host:port, rmi://host:port, http://host:port/context_and_path b) a logical server name, in which case the URL is obtained from property mdw.remote...
[ "Returns", "engine", "URL", "for", "another", "server", "using", "server", "specification", "as", "input", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/messenger/MessengerFactory.java#L114-L129
134,189
CenturyLinkCloud/mdw
mdw-workflow/src/com/centurylink/mdw/workflow/activity/validate/SwaggerValidatorActivity.java
SwaggerValidatorActivity.handleResult
protected Object handleResult(Result result) throws ActivityException { ServiceValuesAccess serviceValues = getRuntimeContext().getServiceValues(); StatusResponse statusResponse; if (result.isError()) { logsevere("Validation error: " + result.getStatus().toString()); stat...
java
protected Object handleResult(Result result) throws ActivityException { ServiceValuesAccess serviceValues = getRuntimeContext().getServiceValues(); StatusResponse statusResponse; if (result.isError()) { logsevere("Validation error: " + result.getStatus().toString()); stat...
[ "protected", "Object", "handleResult", "(", "Result", "result", ")", "throws", "ActivityException", "{", "ServiceValuesAccess", "serviceValues", "=", "getRuntimeContext", "(", ")", ".", "getServiceValues", "(", ")", ";", "StatusResponse", "statusResponse", ";", "if", ...
Populates "response" variable with a default JSON status object. Can be overwritten by custom logic in a downstream activity, or in a JsonRestService implementation.
[ "Populates", "response", "variable", "with", "a", "default", "JSON", "status", "object", ".", "Can", "be", "overwritten", "by", "custom", "logic", "in", "a", "downstream", "activity", "or", "in", "a", "JsonRestService", "implementation", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/activity/validate/SwaggerValidatorActivity.java#L130-L161
134,190
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/cli/Init.java
Init.deleteDynamicTemplates
private void deleteDynamicTemplates() throws IOException { File codegenDir = new File(getProjectDir() + "/codegen"); if (codegenDir.exists()) { getOut().println("Deleting " + codegenDir); new Delete(codegenDir, true).run(); } File assetsDir = new File(getProjectDi...
java
private void deleteDynamicTemplates() throws IOException { File codegenDir = new File(getProjectDir() + "/codegen"); if (codegenDir.exists()) { getOut().println("Deleting " + codegenDir); new Delete(codegenDir, true).run(); } File assetsDir = new File(getProjectDi...
[ "private", "void", "deleteDynamicTemplates", "(", ")", "throws", "IOException", "{", "File", "codegenDir", "=", "new", "File", "(", "getProjectDir", "(", ")", "+", "\"/codegen\"", ")", ";", "if", "(", "codegenDir", ".", "exists", "(", ")", ")", "{", "getOu...
These will be retrieved just-in-time based on current mdw version.
[ "These", "will", "be", "retrieved", "just", "-", "in", "-", "time", "based", "on", "current", "mdw", "version", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cli/Init.java#L165-L181
134,191
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/common/service/SystemMessages.java
SystemMessages.bulletinOff
public static void bulletinOff(Bulletin bulletin, Level level, String message) { if (bulletin == null) return; synchronized (bulletins) { bulletins.remove(bulletin.getId(), bulletin); } try { WebSocketMessenger.getInstance().send("SystemMessage", bulle...
java
public static void bulletinOff(Bulletin bulletin, Level level, String message) { if (bulletin == null) return; synchronized (bulletins) { bulletins.remove(bulletin.getId(), bulletin); } try { WebSocketMessenger.getInstance().send("SystemMessage", bulle...
[ "public", "static", "void", "bulletinOff", "(", "Bulletin", "bulletin", ",", "Level", "level", ",", "String", "message", ")", "{", "if", "(", "bulletin", "==", "null", ")", "return", ";", "synchronized", "(", "bulletins", ")", "{", "bulletins", ".", "remov...
Should be the same instance or have the same id as the bulletinOn message.
[ "Should", "be", "the", "same", "instance", "or", "have", "the", "same", "id", "as", "the", "bulletinOn", "message", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/common/service/SystemMessages.java#L76-L88
134,192
CenturyLinkCloud/mdw
mdw-workflow/assets/com/centurylink/mdw/system/filepanel/FilePanelService.java
FilePanelService.exclude
private static boolean exclude(String host, java.nio.file.Path path) { List<PathMatcher> exclusions = getExcludes(host); if (exclusions == null && host != null) { exclusions = getExcludes(null); // check global config } if (exclusions != null) { for (PathMatcher m...
java
private static boolean exclude(String host, java.nio.file.Path path) { List<PathMatcher> exclusions = getExcludes(host); if (exclusions == null && host != null) { exclusions = getExcludes(null); // check global config } if (exclusions != null) { for (PathMatcher m...
[ "private", "static", "boolean", "exclude", "(", "String", "host", ",", "java", ".", "nio", ".", "file", ".", "Path", "path", ")", "{", "List", "<", "PathMatcher", ">", "exclusions", "=", "getExcludes", "(", "host", ")", ";", "if", "(", "exclusions", "=...
Checks for matching exclude patterns.
[ "Checks", "for", "matching", "exclude", "patterns", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/system/filepanel/FilePanelService.java#L363-L375
134,193
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/cli/Setup.java
Setup.getMdwVersion
public String getMdwVersion() throws IOException { if (mdwVersion == null) { YamlProperties yaml = getProjectYaml(); if (yaml != null) { mdwVersion = yaml.getString(Props.ProjectYaml.MDW_VERSION); } } return mdwVersion; }
java
public String getMdwVersion() throws IOException { if (mdwVersion == null) { YamlProperties yaml = getProjectYaml(); if (yaml != null) { mdwVersion = yaml.getString(Props.ProjectYaml.MDW_VERSION); } } return mdwVersion; }
[ "public", "String", "getMdwVersion", "(", ")", "throws", "IOException", "{", "if", "(", "mdwVersion", "==", "null", ")", "{", "YamlProperties", "yaml", "=", "getProjectYaml", "(", ")", ";", "if", "(", "yaml", "!=", "null", ")", "{", "mdwVersion", "=", "y...
Reads from project.yaml
[ "Reads", "from", "project", ".", "yaml" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cli/Setup.java#L215-L223
134,194
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/cli/Setup.java
Setup.findMdwVersion
public String findMdwVersion(boolean snapshots) throws IOException { URL url = new URL(getReleasesUrl() + MDW_COMMON_PATH); if (snapshots) url = new URL(getSnapshotsUrl() + MDW_COMMON_PATH); Crawl crawl = new Crawl(url, snapshots); crawl.run(); if (crawl.getReleases()...
java
public String findMdwVersion(boolean snapshots) throws IOException { URL url = new URL(getReleasesUrl() + MDW_COMMON_PATH); if (snapshots) url = new URL(getSnapshotsUrl() + MDW_COMMON_PATH); Crawl crawl = new Crawl(url, snapshots); crawl.run(); if (crawl.getReleases()...
[ "public", "String", "findMdwVersion", "(", "boolean", "snapshots", ")", "throws", "IOException", "{", "URL", "url", "=", "new", "URL", "(", "getReleasesUrl", "(", ")", "+", "MDW_COMMON_PATH", ")", ";", "if", "(", "snapshots", ")", "url", "=", "new", "URL",...
Crawls to find the latest stable version.
[ "Crawls", "to", "find", "the", "latest", "stable", "version", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cli/Setup.java#L279-L288
134,195
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/cli/Setup.java
Setup.initBaseAssetPackages
protected void initBaseAssetPackages() throws IOException { baseAssetPackages = new ArrayList<>(); addBasePackages(getAssetRoot(), getAssetRoot()); if (baseAssetPackages.isEmpty()) baseAssetPackages = Packages.DEFAULT_BASE_PACKAGES; }
java
protected void initBaseAssetPackages() throws IOException { baseAssetPackages = new ArrayList<>(); addBasePackages(getAssetRoot(), getAssetRoot()); if (baseAssetPackages.isEmpty()) baseAssetPackages = Packages.DEFAULT_BASE_PACKAGES; }
[ "protected", "void", "initBaseAssetPackages", "(", ")", "throws", "IOException", "{", "baseAssetPackages", "=", "new", "ArrayList", "<>", "(", ")", ";", "addBasePackages", "(", "getAssetRoot", "(", ")", ",", "getAssetRoot", "(", ")", ")", ";", "if", "(", "ba...
Checks for any existing packages. If none present, adds the defaults.
[ "Checks", "for", "any", "existing", "packages", ".", "If", "none", "present", "adds", "the", "defaults", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cli/Setup.java#L293-L298
134,196
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/cli/Setup.java
Setup.getRelativePath
public String getRelativePath(File from, File to) { Path fromPath = Paths.get(from.getPath()).normalize().toAbsolutePath(); Path toPath = Paths.get(to.getPath()).normalize().toAbsolutePath(); return fromPath.relativize(toPath).toString().replace('\\', '/'); }
java
public String getRelativePath(File from, File to) { Path fromPath = Paths.get(from.getPath()).normalize().toAbsolutePath(); Path toPath = Paths.get(to.getPath()).normalize().toAbsolutePath(); return fromPath.relativize(toPath).toString().replace('\\', '/'); }
[ "public", "String", "getRelativePath", "(", "File", "from", ",", "File", "to", ")", "{", "Path", "fromPath", "=", "Paths", ".", "get", "(", "from", ".", "getPath", "(", ")", ")", ".", "normalize", "(", ")", ".", "toAbsolutePath", "(", ")", ";", "Path...
Returns 'to' file or dir path relative to 'from' dir. Result always uses forward slashes and has no trailing slash.
[ "Returns", "to", "file", "or", "dir", "path", "relative", "to", "from", "dir", ".", "Result", "always", "uses", "forward", "slashes", "and", "has", "no", "trailing", "slash", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cli/Setup.java#L405-L409
134,197
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/cli/Setup.java
Setup.downloadTemplates
protected void downloadTemplates(ProgressMonitor... monitors) throws IOException { File templateDir = getTemplateDir(); if (!templateDir.exists()) { if (!templateDir.mkdirs()) throw new IOException("Unable to create directory: " + templateDir.getAbsolutePath()); S...
java
protected void downloadTemplates(ProgressMonitor... monitors) throws IOException { File templateDir = getTemplateDir(); if (!templateDir.exists()) { if (!templateDir.mkdirs()) throw new IOException("Unable to create directory: " + templateDir.getAbsolutePath()); S...
[ "protected", "void", "downloadTemplates", "(", "ProgressMonitor", "...", "monitors", ")", "throws", "IOException", "{", "File", "templateDir", "=", "getTemplateDir", "(", ")", ";", "if", "(", "!", "templateDir", ".", "exists", "(", ")", ")", "{", "if", "(", ...
Downloads asset templates for codegen, etc.
[ "Downloads", "asset", "templates", "for", "codegen", "etc", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cli/Setup.java#L583-L599
134,198
CenturyLinkCloud/mdw
mdw-workflow/assets/com/centurylink/mdw/zipkin/TraceAdapterMonitor.java
TraceAdapterMonitor.onRequest
@Override public Object onRequest(ActivityRuntimeContext context, Object content, Map<String,String> headers, Object connection) { if (connection instanceof HttpConnection) { HttpConnection httpConnection = (HttpConnection)connection; Tracing tracing = TraceHelper.getTracing("mdw-ada...
java
@Override public Object onRequest(ActivityRuntimeContext context, Object content, Map<String,String> headers, Object connection) { if (connection instanceof HttpConnection) { HttpConnection httpConnection = (HttpConnection)connection; Tracing tracing = TraceHelper.getTracing("mdw-ada...
[ "@", "Override", "public", "Object", "onRequest", "(", "ActivityRuntimeContext", "context", ",", "Object", "content", ",", "Map", "<", "String", ",", "String", ">", "headers", ",", "Object", "connection", ")", "{", "if", "(", "connection", "instanceof", "HttpC...
Only for HTTP.
[ "Only", "for", "HTTP", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/zipkin/TraceAdapterMonitor.java#L33-L53
134,199
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/task/TaskWorkflowHelper.java
TaskWorkflowHelper.createTaskInstance
static TaskInstance createTaskInstance(Long taskId, String masterRequestId, Long procInstId, String secOwner, Long secOwnerId, String title, String comments) throws ServiceException, DataAccessException { return createTaskInstance(taskId, masterRequestId, procInstId, secOwner, secOwnerId, title, com...
java
static TaskInstance createTaskInstance(Long taskId, String masterRequestId, Long procInstId, String secOwner, Long secOwnerId, String title, String comments) throws ServiceException, DataAccessException { return createTaskInstance(taskId, masterRequestId, procInstId, secOwner, secOwnerId, title, com...
[ "static", "TaskInstance", "createTaskInstance", "(", "Long", "taskId", ",", "String", "masterRequestId", ",", "Long", "procInstId", ",", "String", "secOwner", ",", "Long", "secOwnerId", ",", "String", "title", ",", "String", "comments", ")", "throws", "ServiceExce...
Convenience method for below.
[ "Convenience", "method", "for", "below", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/task/TaskWorkflowHelper.java#L99-L102