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
partition
stringclasses
1 value
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WTabAndCollapsibleExample.java
WTabAndCollapsibleExample.newVisibilityToggleForTab
private WButton newVisibilityToggleForTab(final int idx) { WButton toggleButton = new WButton("Toggle visibility of tab " + (idx + 1)); toggleButton.setAction(new Action() { @Override public void execute(final ActionEvent event) { boolean tabVisible = tabset.isTabVisible(idx); tabset.setTabVisible(id...
java
private WButton newVisibilityToggleForTab(final int idx) { WButton toggleButton = new WButton("Toggle visibility of tab " + (idx + 1)); toggleButton.setAction(new Action() { @Override public void execute(final ActionEvent event) { boolean tabVisible = tabset.isTabVisible(idx); tabset.setTabVisible(id...
[ "private", "WButton", "newVisibilityToggleForTab", "(", "final", "int", "idx", ")", "{", "WButton", "toggleButton", "=", "new", "WButton", "(", "\"Toggle visibility of tab \"", "+", "(", "idx", "+", "1", ")", ")", ";", "toggleButton", ".", "setAction", "(", "n...
Creates a button to toggle the visibility of a tab. @param idx the index of the tab. @return a button which toggles the visibility of the tab.
[ "Creates", "a", "button", "to", "toggle", "the", "visibility", "of", "a", "tab", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WTabAndCollapsibleExample.java#L68-L80
train
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/table/WTableOptionsExample.java
WTableOptionsExample.createRadioButtonGroup
private <T extends Enum<T>> EnumerationRadioButtonSelect<T> createRadioButtonGroup( final T[] options) { EnumerationRadioButtonSelect<T> rbSelect = new EnumerationRadioButtonSelect<>(options); rbSelect.setButtonLayout(EnumerationRadioButtonSelect.Layout.FLAT); rbSelect.setFrameless(true); return rbSelect; }
java
private <T extends Enum<T>> EnumerationRadioButtonSelect<T> createRadioButtonGroup( final T[] options) { EnumerationRadioButtonSelect<T> rbSelect = new EnumerationRadioButtonSelect<>(options); rbSelect.setButtonLayout(EnumerationRadioButtonSelect.Layout.FLAT); rbSelect.setFrameless(true); return rbSelect; }
[ "private", "<", "T", "extends", "Enum", "<", "T", ">", ">", "EnumerationRadioButtonSelect", "<", "T", ">", "createRadioButtonGroup", "(", "final", "T", "[", "]", "options", ")", "{", "EnumerationRadioButtonSelect", "<", "T", ">", "rbSelect", "=", "new", "Enu...
Create a radio button select containing the options. @param <T> the enumeration type. @param options the list of options @return a radioButtonSelect with the options
[ "Create", "a", "radio", "button", "select", "containing", "the", "options", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/table/WTableOptionsExample.java#L302-L308
train
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/table/WTableOptionsExample.java
WTableOptionsExample.displaySelected
private void displaySelected() { copySelection(table1, selected1); copySelection(table2, selected2); copySelection(table3, selected3); }
java
private void displaySelected() { copySelection(table1, selected1); copySelection(table2, selected2); copySelection(table3, selected3); }
[ "private", "void", "displaySelected", "(", ")", "{", "copySelection", "(", "table1", ",", "selected1", ")", ";", "copySelection", "(", "table2", ",", "selected2", ")", ";", "copySelection", "(", "table3", ",", "selected3", ")", ";", "}" ]
Display the rows that have been selected.
[ "Display", "the", "rows", "that", "have", "been", "selected", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/table/WTableOptionsExample.java#L439-L443
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WNumberField.java
WNumberField.convertValue
private BigDecimal convertValue(final Object value) { if (value == null) { return null; } else if (value instanceof BigDecimal) { return (BigDecimal) value; } // Try and convert "String" value String dataString = value.toString(); if (Util.empty(dataString)) { return null; } try { return n...
java
private BigDecimal convertValue(final Object value) { if (value == null) { return null; } else if (value instanceof BigDecimal) { return (BigDecimal) value; } // Try and convert "String" value String dataString = value.toString(); if (Util.empty(dataString)) { return null; } try { return n...
[ "private", "BigDecimal", "convertValue", "(", "final", "Object", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "return", "null", ";", "}", "else", "if", "(", "value", "instanceof", "BigDecimal", ")", "{", "return", "(", "BigDecimal", ")"...
Attempts to convert a value to a BigDecimal. Throws a SystemException on error. @param value the value to convert. @return the converted value, or null if <code>value</code> was null/empty.
[ "Attempts", "to", "convert", "a", "value", "to", "a", "BigDecimal", ".", "Throws", "a", "SystemException", "on", "error", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WNumberField.java#L131-L151
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WNumberField.java
WNumberField.setMinValue
public void setMinValue(final BigDecimal minValue) { BigDecimal currMin = getMinValue(); if (!Objects.equals(minValue, currMin)) { getOrCreateComponentModel().minValue = minValue; } }
java
public void setMinValue(final BigDecimal minValue) { BigDecimal currMin = getMinValue(); if (!Objects.equals(minValue, currMin)) { getOrCreateComponentModel().minValue = minValue; } }
[ "public", "void", "setMinValue", "(", "final", "BigDecimal", "minValue", ")", "{", "BigDecimal", "currMin", "=", "getMinValue", "(", ")", ";", "if", "(", "!", "Objects", ".", "equals", "(", "minValue", ",", "currMin", ")", ")", "{", "getOrCreateComponentMode...
Sets the minimum allowable value for this number field. @param minValue the minimum allowable value, or null for no minimum.
[ "Sets", "the", "minimum", "allowable", "value", "for", "this", "number", "field", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WNumberField.java#L283-L288
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WNumberField.java
WNumberField.setMaxValue
public void setMaxValue(final BigDecimal maxValue) { BigDecimal currMax = getMaxValue(); if (!Objects.equals(maxValue, currMax)) { getOrCreateComponentModel().maxValue = maxValue; } }
java
public void setMaxValue(final BigDecimal maxValue) { BigDecimal currMax = getMaxValue(); if (!Objects.equals(maxValue, currMax)) { getOrCreateComponentModel().maxValue = maxValue; } }
[ "public", "void", "setMaxValue", "(", "final", "BigDecimal", "maxValue", ")", "{", "BigDecimal", "currMax", "=", "getMaxValue", "(", ")", ";", "if", "(", "!", "Objects", ".", "equals", "(", "maxValue", ",", "currMax", ")", ")", "{", "getOrCreateComponentMode...
Sets the maximum allowable value for this number field. @param maxValue the maximum allowable value, or null for no maximum.
[ "Sets", "the", "maximum", "allowable", "value", "for", "this", "number", "field", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WNumberField.java#L323-L328
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WNumberField.java
WNumberField.validateComponent
@Override protected void validateComponent(final List<Diagnostic> diags) { if (isValidNumber()) { super.validateComponent(diags); validateNumber(diags); } else { diags.add(createErrorDiagnostic(InternalMessages.DEFAULT_VALIDATION_ERROR_INVALID, this)); } }
java
@Override protected void validateComponent(final List<Diagnostic> diags) { if (isValidNumber()) { super.validateComponent(diags); validateNumber(diags); } else { diags.add(createErrorDiagnostic(InternalMessages.DEFAULT_VALIDATION_ERROR_INVALID, this)); } }
[ "@", "Override", "protected", "void", "validateComponent", "(", "final", "List", "<", "Diagnostic", ">", "diags", ")", "{", "if", "(", "isValidNumber", "(", ")", ")", "{", "super", ".", "validateComponent", "(", "diags", ")", ";", "validateNumber", "(", "d...
Override WInput's validateComponent to perform futher validation on email addresses. @param diags the list into which any validation diagnostics are added.
[ "Override", "WInput", "s", "validateComponent", "to", "perform", "futher", "validation", "on", "email", "addresses", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WNumberField.java#L416-L424
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/validation/ValidatingAction.java
ValidatingAction.containsError
private static boolean containsError(final List<Diagnostic> diags) { if (diags == null || diags.isEmpty()) { return false; } for (Diagnostic diag : diags) { if (diag.getSeverity() == Diagnostic.ERROR) { return true; } } return false; }
java
private static boolean containsError(final List<Diagnostic> diags) { if (diags == null || diags.isEmpty()) { return false; } for (Diagnostic diag : diags) { if (diag.getSeverity() == Diagnostic.ERROR) { return true; } } return false; }
[ "private", "static", "boolean", "containsError", "(", "final", "List", "<", "Diagnostic", ">", "diags", ")", "{", "if", "(", "diags", "==", "null", "||", "diags", ".", "isEmpty", "(", ")", ")", "{", "return", "false", ";", "}", "for", "(", "Diagnostic"...
Indicates whether the given list of diagnostics contains any errors. @param diags the list into which any validation diagnostics were added. @return true if any of the diagnostics in the list are errors, false otherwise.
[ "Indicates", "whether", "the", "given", "list", "of", "diagnostics", "contains", "any", "errors", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/validation/ValidatingAction.java#L130-L142
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WTextField.java
WTextField.doHandleRequest
@Override protected boolean doHandleRequest(final Request request) { String value = getRequestValue(request); String current = getValue(); boolean changed = !Util.equals(value, current); if (changed) { setData(value); } return changed; }
java
@Override protected boolean doHandleRequest(final Request request) { String value = getRequestValue(request); String current = getValue(); boolean changed = !Util.equals(value, current); if (changed) { setData(value); } return changed; }
[ "@", "Override", "protected", "boolean", "doHandleRequest", "(", "final", "Request", "request", ")", "{", "String", "value", "=", "getRequestValue", "(", "request", ")", ";", "String", "current", "=", "getValue", "(", ")", ";", "boolean", "changed", "=", "!"...
Override handleRequest in order to perform processing for this component. This implementation updates the text field's text if it has changed. @param request the request being responded to. @return true if the text field has changed, otherwise false
[ "Override", "handleRequest", "in", "order", "to", "perform", "processing", "for", "this", "component", ".", "This", "implementation", "updates", "the", "text", "field", "s", "text", "if", "it", "has", "changed", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WTextField.java#L43-L55
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/AjaxPageShellInterceptor.java
AjaxPageShellInterceptor.preparePaint
@Override public void preparePaint(final Request request) { UIContext uic = UIContextHolder.getCurrent(); Headers headers = uic.getUI().getHeaders(); headers.reset(); headers.setContentType(WebUtilities.CONTENT_TYPE_XML); super.preparePaint(request); }
java
@Override public void preparePaint(final Request request) { UIContext uic = UIContextHolder.getCurrent(); Headers headers = uic.getUI().getHeaders(); headers.reset(); headers.setContentType(WebUtilities.CONTENT_TYPE_XML); super.preparePaint(request); }
[ "@", "Override", "public", "void", "preparePaint", "(", "final", "Request", "request", ")", "{", "UIContext", "uic", "=", "UIContextHolder", ".", "getCurrent", "(", ")", ";", "Headers", "headers", "=", "uic", ".", "getUI", "(", ")", ".", "getHeaders", "(",...
Override to set the content type of the response and reset the headers. @param request The request being serviced.
[ "Override", "to", "set", "the", "content", "type", "of", "the", "response", "and", "reset", "the", "headers", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/AjaxPageShellInterceptor.java#L30-L38
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/AjaxPageShellInterceptor.java
AjaxPageShellInterceptor.paint
@Override public void paint(final RenderContext renderContext) { WebXmlRenderContext webRenderContext = (WebXmlRenderContext) renderContext; XmlStringBuilder xml = webRenderContext.getWriter(); AjaxOperation operation = AjaxHelper.getCurrentOperation(); if (operation == null) { // the request attribute tha...
java
@Override public void paint(final RenderContext renderContext) { WebXmlRenderContext webRenderContext = (WebXmlRenderContext) renderContext; XmlStringBuilder xml = webRenderContext.getWriter(); AjaxOperation operation = AjaxHelper.getCurrentOperation(); if (operation == null) { // the request attribute tha...
[ "@", "Override", "public", "void", "paint", "(", "final", "RenderContext", "renderContext", ")", "{", "WebXmlRenderContext", "webRenderContext", "=", "(", "WebXmlRenderContext", ")", "renderContext", ";", "XmlStringBuilder", "xml", "=", "webRenderContext", ".", "getWr...
Paints the targeted ajax regions. The format of the response is an agreement between the server and the client side handling our AJAX response. @param renderContext the renderContext to send the output to.
[ "Paints", "the", "targeted", "ajax", "regions", ".", "The", "format", "of", "the", "response", "is", "an", "agreement", "between", "the", "server", "and", "the", "client", "side", "handling", "our", "AJAX", "response", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/AjaxPageShellInterceptor.java#L46-L71
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractMutableContainer.java
AbstractMutableContainer.add
@Deprecated @Override public void add(final WComponent component, final String tag) { super.add(component, tag); }
java
@Deprecated @Override public void add(final WComponent component, final String tag) { super.add(component, tag); }
[ "@", "Deprecated", "@", "Override", "public", "void", "add", "(", "final", "WComponent", "component", ",", "final", "String", "tag", ")", "{", "super", ".", "add", "(", "component", ",", "tag", ")", ";", "}" ]
Add the given component as a child of this component. The tag is used to identify the child in this component's velocity template. @param component the component to add. @param tag the tag used to identify the component. @deprecated Use {@link WTemplate} instead
[ "Add", "the", "given", "component", "as", "a", "child", "of", "this", "component", ".", "The", "tag", "is", "used", "to", "identify", "the", "child", "in", "this", "component", "s", "velocity", "template", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractMutableContainer.java#L32-L36
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WAudioRenderer.java
WAudioRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WAudio audioComponent = (WAudio) component; XmlStringBuilder xml = renderContext.getWriter(); Audio[] audio = audioComponent.getAudio(); if (audio == null || audio.length == 0) { return; } WAudio.Cont...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WAudio audioComponent = (WAudio) component; XmlStringBuilder xml = renderContext.getWriter(); Audio[] audio = audioComponent.getAudio(); if (audio == null || audio.length == 0) { return; } WAudio.Cont...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WAudio", "audioComponent", "=", "(", "WAudio", ")", "component", ";", "XmlStringBuilder", "xml", "=", "renderCo...
Paints the given WAudio. @param component the WAudio to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WAudio", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WAudioRenderer.java#L32-L117
train
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/ColumnLayoutExample.java
ColumnLayoutExample.addResponsiveExample
private void addResponsiveExample() { add(new WHeading(HeadingLevel.H2, "Default responsive design")); add(new ExplanatoryText("This example applies the theme's default responsive design rules for ColumnLayout.\n " + "The columns have width and alignment and there is also a hgap and a vgap.")); WPanel panel...
java
private void addResponsiveExample() { add(new WHeading(HeadingLevel.H2, "Default responsive design")); add(new ExplanatoryText("This example applies the theme's default responsive design rules for ColumnLayout.\n " + "The columns have width and alignment and there is also a hgap and a vgap.")); WPanel panel...
[ "private", "void", "addResponsiveExample", "(", ")", "{", "add", "(", "new", "WHeading", "(", "HeadingLevel", ".", "H2", ",", "\"Default responsive design\"", ")", ")", ";", "add", "(", "new", "ExplanatoryText", "(", "\"This example applies the theme's default respons...
Add a column layout which will change its rendering on small screens.
[ "Add", "a", "column", "layout", "which", "will", "change", "its", "rendering", "on", "small", "screens", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/ColumnLayoutExample.java#L72-L87
train
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/ColumnLayoutExample.java
ColumnLayoutExample.getTitle
private static String getTitle(final int[] widths) { StringBuffer buf = new StringBuffer("Column widths: "); for (int i = 0; i < widths.length; i++) { if (i > 0) { buf.append(", "); } buf.append(widths[i]); } return buf.toString(); }
java
private static String getTitle(final int[] widths) { StringBuffer buf = new StringBuffer("Column widths: "); for (int i = 0; i < widths.length; i++) { if (i > 0) { buf.append(", "); } buf.append(widths[i]); } return buf.toString(); }
[ "private", "static", "String", "getTitle", "(", "final", "int", "[", "]", "widths", ")", "{", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", "\"Column widths: \"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "widths", ".", "leng...
Concatenates column widths to form the heading text for the example. @param widths the widths to concatenate. @return the title text.
[ "Concatenates", "column", "widths", "to", "form", "the", "heading", "text", "for", "the", "example", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/ColumnLayoutExample.java#L95-L107
train
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/ColumnLayoutExample.java
ColumnLayoutExample.addHgapVGapExample
private void addHgapVGapExample(final Size hgap, final Size vgap) { add(new WHeading(HeadingLevel.H2, "Column Layout: hgap=" + hgap.toString() + " vgap=" + vgap.toString())); WPanel panel = new WPanel(); panel.setLayout(new ColumnLayout(new int[]{25, 25, 25, 25}, hgap, vgap)); add(panel); for (int i = 0; i <...
java
private void addHgapVGapExample(final Size hgap, final Size vgap) { add(new WHeading(HeadingLevel.H2, "Column Layout: hgap=" + hgap.toString() + " vgap=" + vgap.toString())); WPanel panel = new WPanel(); panel.setLayout(new ColumnLayout(new int[]{25, 25, 25, 25}, hgap, vgap)); add(panel); for (int i = 0; i <...
[ "private", "void", "addHgapVGapExample", "(", "final", "Size", "hgap", ",", "final", "Size", "vgap", ")", "{", "add", "(", "new", "WHeading", "(", "HeadingLevel", ".", "H2", ",", "\"Column Layout: hgap=\"", "+", "hgap", ".", "toString", "(", ")", "+", "\" ...
Build an example using hgap and vgap. @param hgap the hgap width @param vgap the vgap width
[ "Build", "an", "example", "using", "hgap", "and", "vgap", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/ColumnLayoutExample.java#L115-L126
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTableRowRendererRenderer.java
WTableRowRendererRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WTableRowRenderer renderer = (WTableRowRenderer) component; XmlStringBuilder xml = renderContext.getWriter(); WTable table = renderer.getTable(); TableModel dataModel = table.getTableModel(); int[] columnOr...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WTableRowRenderer renderer = (WTableRowRenderer) component; XmlStringBuilder xml = renderContext.getWriter(); WTable table = renderer.getTable(); TableModel dataModel = table.getTableModel(); int[] columnOr...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WTableRowRenderer", "renderer", "=", "(", "WTableRowRenderer", ")", "component", ";", "XmlStringBuilder", "xml", ...
Paints the given WTableRowRenderer. @param component the WTableRowRenderer to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WTableRowRenderer", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTableRowRendererRenderer.java#L34-L97
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/HtmlSanitizerUtil.java
HtmlSanitizerUtil.createPolicy
public static Policy createPolicy(final String resourceName) { if (StringUtils.isBlank(resourceName)) { throw new SystemException("AntiSamy Policy resourceName cannot be null "); } URL resource = HtmlSanitizerUtil.class.getClassLoader().getResource(resourceName); if (resource == null) { throw new SystemEx...
java
public static Policy createPolicy(final String resourceName) { if (StringUtils.isBlank(resourceName)) { throw new SystemException("AntiSamy Policy resourceName cannot be null "); } URL resource = HtmlSanitizerUtil.class.getClassLoader().getResource(resourceName); if (resource == null) { throw new SystemEx...
[ "public", "static", "Policy", "createPolicy", "(", "final", "String", "resourceName", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "resourceName", ")", ")", "{", "throw", "new", "SystemException", "(", "\"AntiSamy Policy resourceName cannot be null \"", ...
Create a Policy from a named local resource. @param resourceName the path to AntiSamy policy file @return the AntiSamy Policy
[ "Create", "a", "Policy", "from", "a", "named", "local", "resource", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/HtmlSanitizerUtil.java#L150-L163
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDataRenderer.java
WDataRenderer.handleRequest
@Override public void handleRequest(final Request request) { // Let the wcomponent gather data from the request. super.handleRequest(request); Object data = getData(); if (data != null) { // Now update the data object (bound to this wcomponent) by copying // values from this wcomponent and its children...
java
@Override public void handleRequest(final Request request) { // Let the wcomponent gather data from the request. super.handleRequest(request); Object data = getData(); if (data != null) { // Now update the data object (bound to this wcomponent) by copying // values from this wcomponent and its children...
[ "@", "Override", "public", "void", "handleRequest", "(", "final", "Request", "request", ")", "{", "// Let the wcomponent gather data from the request.", "super", ".", "handleRequest", "(", "request", ")", ";", "Object", "data", "=", "getData", "(", ")", ";", "if",...
The handleRequest method has been overridden to keep the data object bound to this wcomponent in sync with any changes the user has entered. @param request the Request being responded to.
[ "The", "handleRequest", "method", "has", "been", "overridden", "to", "keep", "the", "data", "object", "bound", "to", "this", "wcomponent", "in", "sync", "with", "any", "changes", "the", "user", "has", "entered", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDataRenderer.java#L73-L85
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/ThemeServlet.java
ThemeServlet.doGet
@Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { ServletUtil.handleThemeResourceRequest(req, resp); }
java
@Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { ServletUtil.handleThemeResourceRequest(req, resp); }
[ "@", "Override", "protected", "void", "doGet", "(", "final", "HttpServletRequest", "req", ",", "final", "HttpServletResponse", "resp", ")", "throws", "ServletException", ",", "IOException", "{", "ServletUtil", ".", "handleThemeResourceRequest", "(", "req", ",", "res...
Serves up a file from the theme. @param req the request with the file name in parameter "f", or following the servlet path. @param resp the response to write to. @throws ServletException on error. @throws IOException if there is an error reading the file / writing the response.
[ "Serves", "up", "a", "file", "from", "the", "theme", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/ThemeServlet.java#L46-L51
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WCollapsibleToggleRenderer.java
WCollapsibleToggleRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WCollapsibleToggle toggle = (WCollapsibleToggle) component; XmlStringBuilder xml = renderContext.getWriter(); xml.appendTagOpen("ui:collapsibletoggle"); xml.appendAttribute("id", component.getId()); xml.app...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WCollapsibleToggle toggle = (WCollapsibleToggle) component; XmlStringBuilder xml = renderContext.getWriter(); xml.appendTagOpen("ui:collapsibletoggle"); xml.appendAttribute("id", component.getId()); xml.app...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WCollapsibleToggle", "toggle", "=", "(", "WCollapsibleToggle", ")", "component", ";", "XmlStringBuilder", "xml", ...
Paints the given WCollapsibleToggle. @param component the WCollapsibleToggle to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WCollapsibleToggle", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WCollapsibleToggleRenderer.java#L22-L33
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/Util.java
Util.empty
public static boolean empty(final String aString) { if (aString != null) { final int len = aString.length(); for (int i = 0; i < len; i++) { // This mirrors String.trim(), which removes ASCII // control characters as well as whitespace. if (aString.charAt(i) > ' ') { return false; } } ...
java
public static boolean empty(final String aString) { if (aString != null) { final int len = aString.length(); for (int i = 0; i < len; i++) { // This mirrors String.trim(), which removes ASCII // control characters as well as whitespace. if (aString.charAt(i) > ' ') { return false; } } ...
[ "public", "static", "boolean", "empty", "(", "final", "String", "aString", ")", "{", "if", "(", "aString", "!=", "null", ")", "{", "final", "int", "len", "=", "aString", ".", "length", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<...
Determines whether the given string is null or "empty". @param aString the string to check. @return true if the given String is null or contains only whitespace.
[ "Determines", "whether", "the", "given", "string", "is", "null", "or", "empty", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/Util.java#L23-L37
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/Util.java
Util.compareAllowNull
public static int compareAllowNull(final Comparable c1, final Comparable c2) { if (c1 == null && c2 == null) { return 0; } else if (c1 == null) { return -1; } else if (c2 == null) { return 1; } else { return c1.compareTo(c2); } }
java
public static int compareAllowNull(final Comparable c1, final Comparable c2) { if (c1 == null && c2 == null) { return 0; } else if (c1 == null) { return -1; } else if (c2 == null) { return 1; } else { return c1.compareTo(c2); } }
[ "public", "static", "int", "compareAllowNull", "(", "final", "Comparable", "c1", ",", "final", "Comparable", "c2", ")", "{", "if", "(", "c1", "==", "null", "&&", "c2", "==", "null", ")", "{", "return", "0", ";", "}", "else", "if", "(", "c1", "==", ...
Compares two comparable objects where either may be null. Null is regarded as the smallest value, and 2 nulls are considered equal. @param c1 the first comparable @param c2 the second comparable @return a negative integer, zero, or a positive integer if c1 is less than, equal to, or greater than the c2.
[ "Compares", "two", "comparable", "objects", "where", "either", "may", "be", "null", ".", "Null", "is", "regarded", "as", "the", "smallest", "value", "and", "2", "nulls", "are", "considered", "equal", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/Util.java#L66-L76
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/Util.java
Util.rightTrim
public static String rightTrim(final String aString) { if (aString == null) { return null; } int end = aString.length() - 1; while ((end >= 0) && (aString.charAt(end) <= ' ')) { end--; } if (end == aString.length() - 1) { return aString; } return aString.substring(0, end + 1); }
java
public static String rightTrim(final String aString) { if (aString == null) { return null; } int end = aString.length() - 1; while ((end >= 0) && (aString.charAt(end) <= ' ')) { end--; } if (end == aString.length() - 1) { return aString; } return aString.substring(0, end + 1); }
[ "public", "static", "String", "rightTrim", "(", "final", "String", "aString", ")", "{", "if", "(", "aString", "==", "null", ")", "{", "return", "null", ";", "}", "int", "end", "=", "aString", ".", "length", "(", ")", "-", "1", ";", "while", "(", "(...
Copies this String removing white space characters from the end of the string. @param aString the String to trim. @return a new String with characters <code>\\u0020</code> removed from the end
[ "Copies", "this", "String", "removing", "white", "space", "characters", "from", "the", "end", "of", "the", "string", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/Util.java#L98-L110
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/Util.java
Util.leftTrim
public static String leftTrim(final String aString) { if (aString == null) { return null; } int start = 0; while ((start < aString.length()) && (aString.charAt(start) <= ' ')) { start++; } if (start == 0) { return aString; } return aString.substring(start); }
java
public static String leftTrim(final String aString) { if (aString == null) { return null; } int start = 0; while ((start < aString.length()) && (aString.charAt(start) <= ' ')) { start++; } if (start == 0) { return aString; } return aString.substring(start); }
[ "public", "static", "String", "leftTrim", "(", "final", "String", "aString", ")", "{", "if", "(", "aString", "==", "null", ")", "{", "return", "null", ";", "}", "int", "start", "=", "0", ";", "while", "(", "(", "start", "<", "aString", ".", "length",...
Copies this String removing white space characters from the beginning of the string. @param aString the String to trim. @return a new String with characters <code>\\u0020</code> removed from the beginning
[ "Copies", "this", "String", "removing", "white", "space", "characters", "from", "the", "beginning", "of", "the", "string", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/Util.java#L118-L130
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/UIContextHolder.java
UIContextHolder.getCurrent
public static UIContext getCurrent() { Stack<UIContext> stack = CONTEXT_STACK.get(); if (stack == null || stack.isEmpty()) { return null; } return getStack().peek(); }
java
public static UIContext getCurrent() { Stack<UIContext> stack = CONTEXT_STACK.get(); if (stack == null || stack.isEmpty()) { return null; } return getStack().peek(); }
[ "public", "static", "UIContext", "getCurrent", "(", ")", "{", "Stack", "<", "UIContext", ">", "stack", "=", "CONTEXT_STACK", ".", "get", "(", ")", ";", "if", "(", "stack", "==", "null", "||", "stack", ".", "isEmpty", "(", ")", ")", "{", "return", "nu...
Retrieves the current effective UIContext. Note that this method will return null if called from outside normal request processing, for example during the intial application UI construction. @return the current effective UIContext.
[ "Retrieves", "the", "current", "effective", "UIContext", ".", "Note", "that", "this", "method", "will", "return", "null", "if", "called", "from", "outside", "normal", "request", "processing", "for", "example", "during", "the", "intial", "application", "UI", "con...
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/UIContextHolder.java#L102-L110
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/UIContextHolder.java
UIContextHolder.getStack
private static Stack<UIContext> getStack() { Stack<UIContext> stack = CONTEXT_STACK.get(); if (stack == null) { stack = new Stack<>(); CONTEXT_STACK.set(stack); } return stack; }
java
private static Stack<UIContext> getStack() { Stack<UIContext> stack = CONTEXT_STACK.get(); if (stack == null) { stack = new Stack<>(); CONTEXT_STACK.set(stack); } return stack; }
[ "private", "static", "Stack", "<", "UIContext", ">", "getStack", "(", ")", "{", "Stack", "<", "UIContext", ">", "stack", "=", "CONTEXT_STACK", ".", "get", "(", ")", ";", "if", "(", "stack", "==", "null", ")", "{", "stack", "=", "new", "Stack", "<>", ...
Retrieves the internal stack, creating it if necessary. @return the internal stack
[ "Retrieves", "the", "internal", "stack", "creating", "it", "if", "necessary", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/UIContextHolder.java#L117-L126
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/ReflectionUtil.java
ReflectionUtil.getAllFields
public static List getAllFields(final Object obj, final boolean excludeStatic, final boolean excludeTransient) { List fieldList = new ArrayList(); for (Class clazz = obj.getClass(); clazz != null; clazz = clazz.getSuperclass()) { Field[] declaredFields = clazz.getDeclaredFields(); for (int i = 0; i < dec...
java
public static List getAllFields(final Object obj, final boolean excludeStatic, final boolean excludeTransient) { List fieldList = new ArrayList(); for (Class clazz = obj.getClass(); clazz != null; clazz = clazz.getSuperclass()) { Field[] declaredFields = clazz.getDeclaredFields(); for (int i = 0; i < dec...
[ "public", "static", "List", "getAllFields", "(", "final", "Object", "obj", ",", "final", "boolean", "excludeStatic", ",", "final", "boolean", "excludeTransient", ")", "{", "List", "fieldList", "=", "new", "ArrayList", "(", ")", ";", "for", "(", "Class", "cla...
Retrieves all the fields contained in the given object and its superclasses. @param obj the object to examine @param excludeStatic if true, static fields will be omitted @param excludeTransient if true, transient fields will be omitted @return a list of fields for the given object
[ "Retrieves", "all", "the", "fields", "contained", "in", "the", "given", "object", "and", "its", "superclasses", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/ReflectionUtil.java#L93-L112
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/ReflectionUtil.java
ReflectionUtil.setProperty
public static void setProperty(final Object object, final String property, final Class propertyType, final Object value) { Class[] paramTypes = new Class[]{propertyType}; Object[] params = new Object[]{value}; String methodName = "set" + property.substring(0, 1).toUpperCase() + property.substring(1); Reflec...
java
public static void setProperty(final Object object, final String property, final Class propertyType, final Object value) { Class[] paramTypes = new Class[]{propertyType}; Object[] params = new Object[]{value}; String methodName = "set" + property.substring(0, 1).toUpperCase() + property.substring(1); Reflec...
[ "public", "static", "void", "setProperty", "(", "final", "Object", "object", ",", "final", "String", "property", ",", "final", "Class", "propertyType", ",", "final", "Object", "value", ")", "{", "Class", "[", "]", "paramTypes", "=", "new", "Class", "[", "]...
This method sets a property on an object via reflection. @param object The object on which the property is to be set. @param property The name of the property to be set. @param propertyType The type of the property being set. @param value The value of the property being set.
[ "This", "method", "sets", "a", "property", "on", "an", "object", "via", "reflection", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/ReflectionUtil.java#L122-L129
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/ReflectionUtil.java
ReflectionUtil.getProperty
public static Object getProperty(final Object object, final String property) { Class[] paramTypes = new Class[]{}; Object[] params = new Object[]{}; String methodName = "get" + property.substring(0, 1).toUpperCase() + property.substring(1); return ReflectionUtil.invokeMethod(object, methodName, params, paramTy...
java
public static Object getProperty(final Object object, final String property) { Class[] paramTypes = new Class[]{}; Object[] params = new Object[]{}; String methodName = "get" + property.substring(0, 1).toUpperCase() + property.substring(1); return ReflectionUtil.invokeMethod(object, methodName, params, paramTy...
[ "public", "static", "Object", "getProperty", "(", "final", "Object", "object", ",", "final", "String", "property", ")", "{", "Class", "[", "]", "paramTypes", "=", "new", "Class", "[", "]", "{", "}", ";", "Object", "[", "]", "params", "=", "new", "Objec...
This method gets a property from an object via reflection. @param object The object from which the property is to be retrieved. @param property The name of the property to be retrieved. @return The value of the specified <em>property</em>.
[ "This", "method", "gets", "a", "property", "from", "an", "object", "via", "reflection", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/ReflectionUtil.java#L139-L145
train
podio/podio-java
src/main/java/com/podio/rating/RatingAPI.java
RatingAPI.createRating
public int createRating(Reference reference, RatingType type, int value) { return getResourceFactory() .getApiResource("/rating/" + reference.toURLFragment() + type) .entity(Collections.singletonMap("value", value), MediaType.APPLICATION_JSON_TYPE) .post(RatingCreateResponse.class).getId(); }
java
public int createRating(Reference reference, RatingType type, int value) { return getResourceFactory() .getApiResource("/rating/" + reference.toURLFragment() + type) .entity(Collections.singletonMap("value", value), MediaType.APPLICATION_JSON_TYPE) .post(RatingCreateResponse.class).getId(); }
[ "public", "int", "createRating", "(", "Reference", "reference", ",", "RatingType", "type", ",", "int", "value", ")", "{", "return", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/rating/\"", "+", "reference", ".", "toURLFragment", "(", ")", "+...
Add a new rating of the user to the object. The rating can be one of many different types. For more details see the area. Ratings can be changed by posting a new rating, and deleted by doing a DELETE. @param reference The reference to the object the rating should be created on @param type The type of the rating @para...
[ "Add", "a", "new", "rating", "of", "the", "user", "to", "the", "object", ".", "The", "rating", "can", "be", "one", "of", "many", "different", "types", ".", "For", "more", "details", "see", "the", "area", "." ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/rating/RatingAPI.java#L41-L47
train
podio/podio-java
src/main/java/com/podio/rating/RatingAPI.java
RatingAPI.deleteRating
public void deleteRating(Reference reference, RatingType type) { getResourceFactory().getApiResource( "/rating/" + reference.toURLFragment() + type).delete(); }
java
public void deleteRating(Reference reference, RatingType type) { getResourceFactory().getApiResource( "/rating/" + reference.toURLFragment() + type).delete(); }
[ "public", "void", "deleteRating", "(", "Reference", "reference", ",", "RatingType", "type", ")", "{", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/rating/\"", "+", "reference", ".", "toURLFragment", "(", ")", "+", "type", ")", ".", "delete",...
Deletes the rating of the given type on the object by the active user @param reference The reference ot the object @param type The type of the rating
[ "Deletes", "the", "rating", "of", "the", "given", "type", "on", "the", "object", "by", "the", "active", "user" ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/rating/RatingAPI.java#L57-L60
train
podio/podio-java
src/main/java/com/podio/rating/RatingAPI.java
RatingAPI.getAllRatings
public RatingValuesMap getAllRatings(Reference reference) { return getResourceFactory().getApiResource( "/rating/" + reference.toURLFragment()).get( RatingValuesMap.class); }
java
public RatingValuesMap getAllRatings(Reference reference) { return getResourceFactory().getApiResource( "/rating/" + reference.toURLFragment()).get( RatingValuesMap.class); }
[ "public", "RatingValuesMap", "getAllRatings", "(", "Reference", "reference", ")", "{", "return", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/rating/\"", "+", "reference", ".", "toURLFragment", "(", ")", ")", ".", "get", "(", "RatingValuesMap", ...
Returns all the ratings for the given object. It will only return the ratings that are enabled for the object. @param reference The reference to the object to get ratings for @return The map of rating types and their values
[ "Returns", "all", "the", "ratings", "for", "the", "given", "object", ".", "It", "will", "only", "return", "the", "ratings", "that", "are", "enabled", "for", "the", "object", "." ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/rating/RatingAPI.java#L198-L202
train
podio/podio-java
src/main/java/com/podio/rating/RatingAPI.java
RatingAPI.getRating
public int getRating(Reference reference, RatingType type, int userId) { return getResourceFactory() .getApiResource( "/rating/" + reference.toURLFragment() + type + "/" + userId).get(SingleRatingValue.class) .getValue(); }
java
public int getRating(Reference reference, RatingType type, int userId) { return getResourceFactory() .getApiResource( "/rating/" + reference.toURLFragment() + type + "/" + userId).get(SingleRatingValue.class) .getValue(); }
[ "public", "int", "getRating", "(", "Reference", "reference", ",", "RatingType", "type", ",", "int", "userId", ")", "{", "return", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/rating/\"", "+", "reference", ".", "toURLFragment", "(", ")", "+",...
Returns the rating value for the given rating type, object and user. @param reference The reference to the object to get ratings for @param type The type of rating to return @param userId The id of the user for which to return the rating for @return The value of the rating
[ "Returns", "the", "rating", "value", "for", "the", "given", "rating", "type", "object", "and", "user", "." ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/rating/RatingAPI.java#L231-L237
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubMenuRenderer.java
WSubMenuRenderer.getMenuType
private String getMenuType(final WSubMenu submenu) { WMenu menu = WebUtilities.getAncestorOfClass(WMenu.class, submenu); switch (menu.getType()) { case BAR: return "bar"; case FLYOUT: return "flyout"; case TREE: return "tree"; case COLUMN: return "column"; default: throw new Illeg...
java
private String getMenuType(final WSubMenu submenu) { WMenu menu = WebUtilities.getAncestorOfClass(WMenu.class, submenu); switch (menu.getType()) { case BAR: return "bar"; case FLYOUT: return "flyout"; case TREE: return "tree"; case COLUMN: return "column"; default: throw new Illeg...
[ "private", "String", "getMenuType", "(", "final", "WSubMenu", "submenu", ")", "{", "WMenu", "menu", "=", "WebUtilities", ".", "getAncestorOfClass", "(", "WMenu", ".", "class", ",", "submenu", ")", ";", "switch", "(", "menu", ".", "getType", "(", ")", ")", ...
Get the string value of a WMenu.MenuType. @param submenu he WSubMenu currently being rendered @return the menu type as a string
[ "Get", "the", "string", "value", "of", "a", "WMenu", ".", "MenuType", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubMenuRenderer.java#L48-L62
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubMenuRenderer.java
WSubMenuRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WSubMenu menu = (WSubMenu) component; XmlStringBuilder xml = renderContext.getWriter(); xml.appendTagOpen("ui:submenu"); xml.appendAttribute("id", component.getId()); xml.appendOptionalAttribute("class", co...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WSubMenu menu = (WSubMenu) component; XmlStringBuilder xml = renderContext.getWriter(); xml.appendTagOpen("ui:submenu"); xml.appendAttribute("id", component.getId()); xml.appendOptionalAttribute("class", co...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WSubMenu", "menu", "=", "(", "WSubMenu", ")", "component", ";", "XmlStringBuilder", "xml", "=", "renderContext"...
Paints the given WSubMenu. @param component the WSubMenu to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WSubMenu", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubMenuRenderer.java#L70-L131
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WMultiDropdown.java
WMultiDropdown.getNewSelections
@Override protected List getNewSelections(final Request request) { List selections = super.getNewSelections(request); if (selections != null) { // Ensure that there are no duplicates for (int i = 0; i < selections.size(); i++) { Object selection = selections.get(i); for (int j = i + 1; j < selectio...
java
@Override protected List getNewSelections(final Request request) { List selections = super.getNewSelections(request); if (selections != null) { // Ensure that there are no duplicates for (int i = 0; i < selections.size(); i++) { Object selection = selections.get(i); for (int j = i + 1; j < selectio...
[ "@", "Override", "protected", "List", "getNewSelections", "(", "final", "Request", "request", ")", "{", "List", "selections", "=", "super", ".", "getNewSelections", "(", "request", ")", ";", "if", "(", "selections", "!=", "null", ")", "{", "// Ensure that ther...
Override getNewSelections to ensure that the max number of inputs is honoured and that there are no duplicates. This should not normally occur, as the client side js should prevent it. @param request the current request @return a list of selections that have been added in the given request.
[ "Override", "getNewSelections", "to", "ensure", "that", "the", "max", "number", "of", "inputs", "is", "honoured", "and", "that", "there", "are", "no", "duplicates", ".", "This", "should", "not", "normally", "occur", "as", "the", "client", "side", "js", "shou...
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WMultiDropdown.java#L93-L111
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TableUtil.java
TableUtil.rowIndexListToString
public static String rowIndexListToString(final List<Integer> row) { if (row == null || row.isEmpty()) { return null; } StringBuffer index = new StringBuffer(); boolean addDelimiter = false; for (Integer lvl : row) { if (addDelimiter) { index.append(INDEX_DELIMITER); } index.append(lvl); ...
java
public static String rowIndexListToString(final List<Integer> row) { if (row == null || row.isEmpty()) { return null; } StringBuffer index = new StringBuffer(); boolean addDelimiter = false; for (Integer lvl : row) { if (addDelimiter) { index.append(INDEX_DELIMITER); } index.append(lvl); ...
[ "public", "static", "String", "rowIndexListToString", "(", "final", "List", "<", "Integer", ">", "row", ")", "{", "if", "(", "row", "==", "null", "||", "row", ".", "isEmpty", "(", ")", ")", "{", "return", "null", ";", "}", "StringBuffer", "index", "=",...
Convert the row index to its string representation. @param row the row index @return the string representation of the row index
[ "Convert", "the", "row", "index", "to", "its", "string", "representation", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TableUtil.java#L46-L63
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TableUtil.java
TableUtil.rowIndexStringToList
public static List<Integer> rowIndexStringToList(final String row) { if (row == null) { return null; } List<Integer> rowIndex = new ArrayList<>(); try { // Convert StringId to array String[] rowIdString = row.split(INDEX_DELIMITER); for (int i = 0; i < rowIdString.length; i++) { rowIndex.add(...
java
public static List<Integer> rowIndexStringToList(final String row) { if (row == null) { return null; } List<Integer> rowIndex = new ArrayList<>(); try { // Convert StringId to array String[] rowIdString = row.split(INDEX_DELIMITER); for (int i = 0; i < rowIdString.length; i++) { rowIndex.add(...
[ "public", "static", "List", "<", "Integer", ">", "rowIndexStringToList", "(", "final", "String", "row", ")", "{", "if", "(", "row", "==", "null", ")", "{", "return", "null", ";", "}", "List", "<", "Integer", ">", "rowIndex", "=", "new", "ArrayList", "<...
Convert the string representation of a row index to a list. @param row the string representation of the row index @return the row index
[ "Convert", "the", "string", "representation", "of", "a", "row", "index", "to", "a", "list", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TableUtil.java#L71-L90
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TableUtil.java
TableUtil.sortData
public static void sortData(final Object[] data, final Comparator<Object> comparator, final boolean ascending, final int lowIndex, final int highIndex, final int[] sortIndices) { if (lowIndex >= highIndex) { return; // 1 element, so sorted already! } Object midValue = data[sortIndices[(lowIndex + highIn...
java
public static void sortData(final Object[] data, final Comparator<Object> comparator, final boolean ascending, final int lowIndex, final int highIndex, final int[] sortIndices) { if (lowIndex >= highIndex) { return; // 1 element, so sorted already! } Object midValue = data[sortIndices[(lowIndex + highIn...
[ "public", "static", "void", "sortData", "(", "final", "Object", "[", "]", "data", ",", "final", "Comparator", "<", "Object", ">", "comparator", ",", "final", "boolean", "ascending", ",", "final", "int", "lowIndex", ",", "final", "int", "highIndex", ",", "f...
Sorts the data using the given comparator, using a quick-sort. @param data the data for the column. @param comparator the comparator to use for sorting. @param ascending true for an ascending sort, false for descending. @param lowIndex the start index for sub-sorting @param highIndex the end index for sub-sorting @par...
[ "Sorts", "the", "data", "using", "the", "given", "comparator", "using", "a", "quick", "-", "sort", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TableUtil.java#L139-L178
train
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/datatable/TableCellWithActionExample.java
TableCellWithActionExample.parse
private static Date parse(final String dateString) { try { return new SimpleDateFormat("dd/mm/yyyy").parse(dateString); } catch (ParseException e) { LOG.error("Error parsing date: " + dateString, e); return null; } }
java
private static Date parse(final String dateString) { try { return new SimpleDateFormat("dd/mm/yyyy").parse(dateString); } catch (ParseException e) { LOG.error("Error parsing date: " + dateString, e); return null; } }
[ "private", "static", "Date", "parse", "(", "final", "String", "dateString", ")", "{", "try", "{", "return", "new", "SimpleDateFormat", "(", "\"dd/mm/yyyy\"", ")", ".", "parse", "(", "dateString", ")", ";", "}", "catch", "(", "ParseException", "e", ")", "{"...
Parses a date string. @param dateString the date string to parse @return a date corresponding to the given dateString, or null on error.
[ "Parses", "a", "date", "string", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/datatable/TableCellWithActionExample.java#L89-L96
train
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/datatable/TableCellWithActionExample.java
TableCellWithActionExample.createTableModel
private TableDataModel createTableModel() { return new AbstractTableDataModel() { /** * Column id for the first name column. */ private static final int FIRST_NAME = 0; /** * Column id for the last name column. */ private static final int LAST_NAME = 1; /** * Column id for the dat...
java
private TableDataModel createTableModel() { return new AbstractTableDataModel() { /** * Column id for the first name column. */ private static final int FIRST_NAME = 0; /** * Column id for the last name column. */ private static final int LAST_NAME = 1; /** * Column id for the dat...
[ "private", "TableDataModel", "createTableModel", "(", ")", "{", "return", "new", "AbstractTableDataModel", "(", ")", "{", "/**\n\t\t\t * Column id for the first name column.\n\t\t\t */", "private", "static", "final", "int", "FIRST_NAME", "=", "0", ";", "/**\n\t\t\t * Column...
Creates a table data model containing some dummy person data. @return a new data model.
[ "Creates", "a", "table", "data", "model", "containing", "some", "dummy", "person", "data", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/datatable/TableCellWithActionExample.java#L103-L170
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/PageContentHelper.java
PageContentHelper.addAllHeadlines
public static void addAllHeadlines(final PrintWriter writer, final Headers headers) { PageContentHelper.addHeadlines(writer, headers.getHeadLines()); PageContentHelper.addJsHeadlines(writer, headers.getHeadLines(Headers.JAVASCRIPT_HEADLINE)); PageContentHelper.addCssHeadlines(writer, headers.getHeadLines(Headers....
java
public static void addAllHeadlines(final PrintWriter writer, final Headers headers) { PageContentHelper.addHeadlines(writer, headers.getHeadLines()); PageContentHelper.addJsHeadlines(writer, headers.getHeadLines(Headers.JAVASCRIPT_HEADLINE)); PageContentHelper.addCssHeadlines(writer, headers.getHeadLines(Headers....
[ "public", "static", "void", "addAllHeadlines", "(", "final", "PrintWriter", "writer", ",", "final", "Headers", "headers", ")", "{", "PageContentHelper", ".", "addHeadlines", "(", "writer", ",", "headers", ".", "getHeadLines", "(", ")", ")", ";", "PageContentHelp...
Shortcut method for adding all the headline entries stored in the WHeaders. @param writer the writer to write to. @param headers contains all the headline entries.
[ "Shortcut", "method", "for", "adding", "all", "the", "headline", "entries", "stored", "in", "the", "WHeaders", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/PageContentHelper.java#L33-L37
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WButtonRenderer.java
WButtonRenderer.paintAjax
private void paintAjax(final WButton button, final XmlStringBuilder xml) { // Start tag xml.appendTagOpen("ui:ajaxtrigger"); xml.appendAttribute("triggerId", button.getId()); xml.appendClose(); // Target xml.appendTagOpen("ui:ajaxtargetid"); xml.appendAttribute("targetId", button.getAjaxTarget().getId())...
java
private void paintAjax(final WButton button, final XmlStringBuilder xml) { // Start tag xml.appendTagOpen("ui:ajaxtrigger"); xml.appendAttribute("triggerId", button.getId()); xml.appendClose(); // Target xml.appendTagOpen("ui:ajaxtargetid"); xml.appendAttribute("targetId", button.getAjaxTarget().getId())...
[ "private", "void", "paintAjax", "(", "final", "WButton", "button", ",", "final", "XmlStringBuilder", "xml", ")", "{", "// Start tag", "xml", ".", "appendTagOpen", "(", "\"ui:ajaxtrigger\"", ")", ";", "xml", ".", "appendAttribute", "(", "\"triggerId\"", ",", "but...
Paints the AJAX information for the given WButton. @param button the WButton to paint. @param xml the XmlStringBuilder to paint to.
[ "Paints", "the", "AJAX", "information", "for", "the", "given", "WButton", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WButtonRenderer.java#L134-L147
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WDialogRenderer.java
WDialogRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WDialog dialog = (WDialog) component; int state = dialog.getState(); if (state == WDialog.ACTIVE_STATE || dialog.getTrigger() != null) { int width = dialog.getWidth(); int height = dialog.getHeight(); ...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WDialog dialog = (WDialog) component; int state = dialog.getState(); if (state == WDialog.ACTIVE_STATE || dialog.getTrigger() != null) { int width = dialog.getWidth(); int height = dialog.getHeight(); ...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WDialog", "dialog", "=", "(", "WDialog", ")", "component", ";", "int", "state", "=", "dialog", ".", "getSta...
Paints the given WDialog. @param component the WDialog to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WDialog", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WDialogRenderer.java#L24-L59
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/AjaxDebugStructureInterceptor.java
AjaxDebugStructureInterceptor.paint
@Override public void paint(final RenderContext renderContext) { if (!DebugUtil.isDebugFeaturesEnabled() || !(renderContext instanceof WebXmlRenderContext)) { getBackingComponent().paint(renderContext); return; } AjaxOperation operation = AjaxHelper.getCurrentOperation(); if (operation == null) { ge...
java
@Override public void paint(final RenderContext renderContext) { if (!DebugUtil.isDebugFeaturesEnabled() || !(renderContext instanceof WebXmlRenderContext)) { getBackingComponent().paint(renderContext); return; } AjaxOperation operation = AjaxHelper.getCurrentOperation(); if (operation == null) { ge...
[ "@", "Override", "public", "void", "paint", "(", "final", "RenderContext", "renderContext", ")", "{", "if", "(", "!", "DebugUtil", ".", "isDebugFeaturesEnabled", "(", ")", "||", "!", "(", "renderContext", "instanceof", "WebXmlRenderContext", ")", ")", "{", "ge...
Override paint to only output the debugging info for the current targets. @param renderContext the renderContext to send the output to.
[ "Override", "paint", "to", "only", "output", "the", "debugging", "info", "for", "the", "current", "targets", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/AjaxDebugStructureInterceptor.java#L26-L53
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/MockRequest.java
MockRequest.setParameter
public void setParameter(final String key, final String value) { parameters.put(key, new String[]{value}); }
java
public void setParameter(final String key, final String value) { parameters.put(key, new String[]{value}); }
[ "public", "void", "setParameter", "(", "final", "String", "key", ",", "final", "String", "value", ")", "{", "parameters", ".", "put", "(", "key", ",", "new", "String", "[", "]", "{", "value", "}", ")", ";", "}" ]
Sets a parameter. @param key the parameter key. @param value the parameter value.
[ "Sets", "a", "parameter", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/MockRequest.java#L70-L72
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/MockRequest.java
MockRequest.addParameterForButton
public void addParameterForButton(final UIContext uic, final WButton button) { UIContextHolder.pushContext(uic); try { setParameter(button.getId(), "x"); } finally { UIContextHolder.popContext(); } }
java
public void addParameterForButton(final UIContext uic, final WButton button) { UIContextHolder.pushContext(uic); try { setParameter(button.getId(), "x"); } finally { UIContextHolder.popContext(); } }
[ "public", "void", "addParameterForButton", "(", "final", "UIContext", "uic", ",", "final", "WButton", "button", ")", "{", "UIContextHolder", ".", "pushContext", "(", "uic", ")", ";", "try", "{", "setParameter", "(", "button", ".", "getId", "(", ")", ",", "...
Convenience method that adds a parameter emulating a button press. @param uic the current user's UIContext @param button the button to add a parameter for.
[ "Convenience", "method", "that", "adds", "a", "parameter", "emulating", "a", "button", "press", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/MockRequest.java#L90-L97
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/MockRequest.java
MockRequest.setFileContents
public void setFileContents(final String key, final byte[] contents) { MockFileItem fileItem = new MockFileItem(); fileItem.set(contents); files.put(key, new FileItem[]{fileItem}); }
java
public void setFileContents(final String key, final byte[] contents) { MockFileItem fileItem = new MockFileItem(); fileItem.set(contents); files.put(key, new FileItem[]{fileItem}); }
[ "public", "void", "setFileContents", "(", "final", "String", "key", ",", "final", "byte", "[", "]", "contents", ")", "{", "MockFileItem", "fileItem", "=", "new", "MockFileItem", "(", ")", ";", "fileItem", ".", "set", "(", "contents", ")", ";", "files", "...
Sets mock file upload contents. @param key the parameter key. @param contents the file binary data.
[ "Sets", "mock", "file", "upload", "contents", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/MockRequest.java#L105-L109
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WMessages.java
WMessages.addMessage
private void addMessage(final WMessageBox box, final Message message, final boolean encode) { String code = message.getMessage(); if (!Util.empty(code)) { box.addMessage(encode, code, message.getArgs()); } }
java
private void addMessage(final WMessageBox box, final Message message, final boolean encode) { String code = message.getMessage(); if (!Util.empty(code)) { box.addMessage(encode, code, message.getArgs()); } }
[ "private", "void", "addMessage", "(", "final", "WMessageBox", "box", ",", "final", "Message", "message", ",", "final", "boolean", "encode", ")", "{", "String", "code", "=", "message", ".", "getMessage", "(", ")", ";", "if", "(", "!", "Util", ".", "empty"...
Convenience method to add a message to a message box. @param box the message box to add the message to @param message the message to add @param encode true to encode the message, false otherwise.
[ "Convenience", "method", "to", "add", "a", "message", "to", "a", "message", "box", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WMessages.java#L398-L404
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WMessages.java
WMessages.getMessageContainer
protected static MessageContainer getMessageContainer(final WComponent component) { for (WComponent c = component; c != null; c = c.getParent()) { if (c instanceof MessageContainer) { return (MessageContainer) c; } } return null; }
java
protected static MessageContainer getMessageContainer(final WComponent component) { for (WComponent c = component; c != null; c = c.getParent()) { if (c instanceof MessageContainer) { return (MessageContainer) c; } } return null; }
[ "protected", "static", "MessageContainer", "getMessageContainer", "(", "final", "WComponent", "component", ")", "{", "for", "(", "WComponent", "c", "=", "component", ";", "c", "!=", "null", ";", "c", "=", "c", ".", "getParent", "(", ")", ")", "{", "if", ...
Searches the WComponent tree of the given component for an ancestor that implements the MessageContainer interface. @param component the component to return the Container for @return the nearest MessageContainer if found, null otherwise
[ "Searches", "the", "WComponent", "tree", "of", "the", "given", "component", "for", "an", "ancestor", "that", "implements", "the", "MessageContainer", "interface", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WMessages.java#L495-L503
train
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.addItem
public int addItem(int appId, ItemCreate create, boolean silent) { return getResourceFactory().getApiResource("/item/app/" + appId + "/") .queryParam("silent", silent ? "1" : "0") .entity(create, MediaType.APPLICATION_JSON_TYPE) .post(ItemCreateResponse.class).getId(); }
java
public int addItem(int appId, ItemCreate create, boolean silent) { return getResourceFactory().getApiResource("/item/app/" + appId + "/") .queryParam("silent", silent ? "1" : "0") .entity(create, MediaType.APPLICATION_JSON_TYPE) .post(ItemCreateResponse.class).getId(); }
[ "public", "int", "addItem", "(", "int", "appId", ",", "ItemCreate", "create", ",", "boolean", "silent", ")", "{", "return", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/item/app/\"", "+", "appId", "+", "\"/\"", ")", ".", "queryParam", "(",...
Adds a new item to the given app. @param appId The id of the app the item should be added to @param create The data for the new item @param silent True if the create should be silten, false otherwise @return The id of the newly created item
[ "Adds", "a", "new", "item", "to", "the", "given", "app", "." ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L45-L50
train
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.updateItem
public void updateItem(int itemId, ItemUpdate update, boolean silent, boolean hook) { getResourceFactory().getApiResource("/item/" + itemId) .queryParam("silent", silent ? "1" : "0") .queryParam("hook", hook ? "1" : "0") .entity(update, MediaType.APPLICATION_JSON_TYPE).put(); }
java
public void updateItem(int itemId, ItemUpdate update, boolean silent, boolean hook) { getResourceFactory().getApiResource("/item/" + itemId) .queryParam("silent", silent ? "1" : "0") .queryParam("hook", hook ? "1" : "0") .entity(update, MediaType.APPLICATION_JSON_TYPE).put(); }
[ "public", "void", "updateItem", "(", "int", "itemId", ",", "ItemUpdate", "update", ",", "boolean", "silent", ",", "boolean", "hook", ")", "{", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/item/\"", "+", "itemId", ")", ".", "queryParam", "(...
Updates the entire item. Only fields which have values specified will be updated. To delete the contents of a field, pass an empty array for the value. @param itemId The id of the item to update @param update The data for the update @param silent True if the update should be silent, false otherwise @param hook True if...
[ "Updates", "the", "entire", "item", ".", "Only", "fields", "which", "have", "values", "specified", "will", "be", "updated", ".", "To", "delete", "the", "contents", "of", "a", "field", "pass", "an", "empty", "array", "for", "the", "value", "." ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L78-L83
train
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.updateItemValues
public void updateItemValues(int itemId, List<FieldValuesUpdate> values, boolean silent, boolean hook) { getResourceFactory().getApiResource("/item/" + itemId + "/value/") .queryParam("silent", silent ? "1" : "0") .queryParam("hook", hook ? "1" : "0") .entity(values, MediaType.APPLICATION_JSON_TYPE).pu...
java
public void updateItemValues(int itemId, List<FieldValuesUpdate> values, boolean silent, boolean hook) { getResourceFactory().getApiResource("/item/" + itemId + "/value/") .queryParam("silent", silent ? "1" : "0") .queryParam("hook", hook ? "1" : "0") .entity(values, MediaType.APPLICATION_JSON_TYPE).pu...
[ "public", "void", "updateItemValues", "(", "int", "itemId", ",", "List", "<", "FieldValuesUpdate", ">", "values", ",", "boolean", "silent", ",", "boolean", "hook", ")", "{", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/item/\"", "+", "itemId...
Updates all the values for an item @param itemId The id of the item @param values The values for the fields @param silent True if the update should be silent, false otherwise @param hook True if hooks should be executed for the change, false otherwise
[ "Updates", "all", "the", "values", "for", "an", "item" ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L97-L103
train
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.updateItemFieldValues
public void updateItemFieldValues(int itemId, int fieldId, List<Map<String, Object>> values, boolean silent, boolean hook) { getResourceFactory() .getApiResource("/item/" + itemId + "/value/" + fieldId) .queryParam("silent", silent ? "1" : "0") .queryParam("hook", hook ? "1" : "0") .entity(values, ...
java
public void updateItemFieldValues(int itemId, int fieldId, List<Map<String, Object>> values, boolean silent, boolean hook) { getResourceFactory() .getApiResource("/item/" + itemId + "/value/" + fieldId) .queryParam("silent", silent ? "1" : "0") .queryParam("hook", hook ? "1" : "0") .entity(values, ...
[ "public", "void", "updateItemFieldValues", "(", "int", "itemId", ",", "int", "fieldId", ",", "List", "<", "Map", "<", "String", ",", "Object", ">", ">", "values", ",", "boolean", "silent", ",", "boolean", "hook", ")", "{", "getResourceFactory", "(", ")", ...
Update the item values for a specific field. @param itemId The id of the item @param fieldId The id of the field @param values The new values for the field @param silent True if the update should be silent, false otherwise @param hook True if hooks should be executed for the change, false otherwise
[ "Update", "the", "item", "values", "for", "a", "specific", "field", "." ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L119-L126
train
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.getItemFieldValues
public List<Map<String, Object>> getItemFieldValues(int itemId, int fieldId) { return getResourceFactory().getApiResource( "/item/" + itemId + "/value/" + fieldId).get( new GenericType<List<Map<String, Object>>>() { }); }
java
public List<Map<String, Object>> getItemFieldValues(int itemId, int fieldId) { return getResourceFactory().getApiResource( "/item/" + itemId + "/value/" + fieldId).get( new GenericType<List<Map<String, Object>>>() { }); }
[ "public", "List", "<", "Map", "<", "String", ",", "Object", ">", ">", "getItemFieldValues", "(", "int", "itemId", ",", "int", "fieldId", ")", "{", "return", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/item/\"", "+", "itemId", "+", "\"/v...
Returns the values for a specified field on an item @param itemId The id of the item @param fieldId The id of the field @return The values on the field on the item
[ "Returns", "the", "values", "for", "a", "specified", "field", "on", "an", "item" ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L151-L156
train
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.getItemValues
public List<FieldValuesView> getItemValues(int itemId) { return getResourceFactory().getApiResource( "/item/" + itemId + "/value/").get( new GenericType<List<FieldValuesView>>() { }); }
java
public List<FieldValuesView> getItemValues(int itemId) { return getResourceFactory().getApiResource( "/item/" + itemId + "/value/").get( new GenericType<List<FieldValuesView>>() { }); }
[ "public", "List", "<", "FieldValuesView", ">", "getItemValues", "(", "int", "itemId", ")", "{", "return", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/item/\"", "+", "itemId", "+", "\"/value/\"", ")", ".", "get", "(", "new", "GenericType", ...
Returns all the values for an item, with the additional data provided by the get item operation. @param itemId The id of the item @return The values on the item
[ "Returns", "all", "the", "values", "for", "an", "item", "with", "the", "additional", "data", "provided", "by", "the", "get", "item", "operation", "." ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L166-L171
train
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.getItemsByFieldAndTitle
public List<ItemMini> getItemsByFieldAndTitle(int fieldId, String text, List<Integer> notItemIds, Integer limit) { WebResource resource = getResourceFactory().getApiResource( "/item/field/" + fieldId + "/find"); if (limit != null) { resource = resource.queryParam("limit", limit.toString()); } ...
java
public List<ItemMini> getItemsByFieldAndTitle(int fieldId, String text, List<Integer> notItemIds, Integer limit) { WebResource resource = getResourceFactory().getApiResource( "/item/field/" + fieldId + "/find"); if (limit != null) { resource = resource.queryParam("limit", limit.toString()); } ...
[ "public", "List", "<", "ItemMini", ">", "getItemsByFieldAndTitle", "(", "int", "fieldId", ",", "String", "text", ",", "List", "<", "Integer", ">", "notItemIds", ",", "Integer", "limit", ")", "{", "WebResource", "resource", "=", "getResourceFactory", "(", ")", ...
Used to find possible items for a given application field. It searches the relevant items for the title given. @param fieldId The id of app reference field to search for @param text The text to search for in the items title @param notItemIds If supplied the items with these ids will not be returned @param limit The ma...
[ "Used", "to", "find", "possible", "items", "for", "a", "given", "application", "field", ".", "It", "searches", "the", "relevant", "items", "for", "the", "title", "given", "." ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L187-L203
train
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.getItemReference
public List<ItemReference> getItemReference(int itemId) { return getResourceFactory().getApiResource( "/item/" + itemId + "/reference/").get( new GenericType<List<ItemReference>>() { }); }
java
public List<ItemReference> getItemReference(int itemId) { return getResourceFactory().getApiResource( "/item/" + itemId + "/reference/").get( new GenericType<List<ItemReference>>() { }); }
[ "public", "List", "<", "ItemReference", ">", "getItemReference", "(", "int", "itemId", ")", "{", "return", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/item/\"", "+", "itemId", "+", "\"/reference/\"", ")", ".", "get", "(", "new", "GenericTyp...
Returns the items that have a reference to the given item. The references are grouped by app. Both the apps and the items are sorted by title. @param itemId The id of the item @return The references to the given item
[ "Returns", "the", "items", "that", "have", "a", "reference", "to", "the", "given", "item", ".", "The", "references", "are", "grouped", "by", "app", ".", "Both", "the", "apps", "and", "the", "items", "are", "sorted", "by", "title", "." ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L213-L218
train
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.getItemRevision
public ItemRevision getItemRevision(int itemId, int revisionId) { return getResourceFactory().getApiResource( "/item/" + itemId + "/revision/" + revisionId).get( ItemRevision.class); }
java
public ItemRevision getItemRevision(int itemId, int revisionId) { return getResourceFactory().getApiResource( "/item/" + itemId + "/revision/" + revisionId).get( ItemRevision.class); }
[ "public", "ItemRevision", "getItemRevision", "(", "int", "itemId", ",", "int", "revisionId", ")", "{", "return", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/item/\"", "+", "itemId", "+", "\"/revision/\"", "+", "revisionId", ")", ".", "get", ...
Returns the data about the specific revision on an item @param itemId The id of the item @param revisionId The running revision number, starts at 0 for the initial revision @return The revision
[ "Returns", "the", "data", "about", "the", "specific", "revision", "on", "an", "item" ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L230-L234
train
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.getItemRevisionDifference
public List<ItemFieldDifference> getItemRevisionDifference(int itemId, int revisionFrom, int revisionTo) { return getResourceFactory().getApiResource( "/item/" + itemId + "/revision/" + revisionFrom + "/" + revisionTo).get( new GenericType<List<ItemFieldDifference>>() { }); }
java
public List<ItemFieldDifference> getItemRevisionDifference(int itemId, int revisionFrom, int revisionTo) { return getResourceFactory().getApiResource( "/item/" + itemId + "/revision/" + revisionFrom + "/" + revisionTo).get( new GenericType<List<ItemFieldDifference>>() { }); }
[ "public", "List", "<", "ItemFieldDifference", ">", "getItemRevisionDifference", "(", "int", "itemId", ",", "int", "revisionFrom", ",", "int", "revisionTo", ")", "{", "return", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/item/\"", "+", "itemId",...
Returns the difference in fields values between the two revisions. @param itemId The id of the item @param revisionFrom The from revision @param revisionTo The to revision @return The difference between the two revision
[ "Returns", "the", "difference", "in", "fields", "values", "between", "the", "two", "revisions", "." ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L247-L254
train
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.getItemRevisions
public List<ItemRevision> getItemRevisions(int itemId) { return getResourceFactory().getApiResource( "/item/" + itemId + "/revision/").get( new GenericType<List<ItemRevision>>() { }); }
java
public List<ItemRevision> getItemRevisions(int itemId) { return getResourceFactory().getApiResource( "/item/" + itemId + "/revision/").get( new GenericType<List<ItemRevision>>() { }); }
[ "public", "List", "<", "ItemRevision", ">", "getItemRevisions", "(", "int", "itemId", ")", "{", "return", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/item/\"", "+", "itemId", "+", "\"/revision/\"", ")", ".", "get", "(", "new", "GenericType"...
Returns all the revisions that have been made to an item @param itemId The id of the item @return All the revisions
[ "Returns", "all", "the", "revisions", "that", "have", "been", "made", "to", "an", "item" ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L263-L268
train
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.getItems
public ItemsResponse getItems(int appId, Integer limit, Integer offset, SortBy sortBy, Boolean sortDesc, FilterByValue<?>... filters) { WebResource resource = getResourceFactory().getApiResource( "/item/app/" + appId + "/v2/"); if (limit != null) { resource = resource.queryParam("limit", limit.toString())...
java
public ItemsResponse getItems(int appId, Integer limit, Integer offset, SortBy sortBy, Boolean sortDesc, FilterByValue<?>... filters) { WebResource resource = getResourceFactory().getApiResource( "/item/app/" + appId + "/v2/"); if (limit != null) { resource = resource.queryParam("limit", limit.toString())...
[ "public", "ItemsResponse", "getItems", "(", "int", "appId", ",", "Integer", "limit", ",", "Integer", "offset", ",", "SortBy", "sortBy", ",", "Boolean", "sortDesc", ",", "FilterByValue", "<", "?", ">", "...", "filters", ")", "{", "WebResource", "resource", "=...
Returns the items on app matching the given filters. @param appId The id of the app @param limit The maximum number of items to receive, defaults to 20 @param offset The offset from the start of the items returned, defaults to 0 @param sortBy How the items should be sorted. For the possible options, see the filter are...
[ "Returns", "the", "items", "on", "app", "matching", "the", "given", "filters", "." ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L294-L316
train
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.getItemsByExternalId
public ItemsResponse getItemsByExternalId(int appId, String externalId) { return getItems(appId, null, null, null, null, new FilterByValue<String>(new ExternalIdFilterBy(), externalId)); }
java
public ItemsResponse getItemsByExternalId(int appId, String externalId) { return getItems(appId, null, null, null, null, new FilterByValue<String>(new ExternalIdFilterBy(), externalId)); }
[ "public", "ItemsResponse", "getItemsByExternalId", "(", "int", "appId", ",", "String", "externalId", ")", "{", "return", "getItems", "(", "appId", ",", "null", ",", "null", ",", "null", ",", "null", ",", "new", "FilterByValue", "<", "String", ">", "(", "ne...
Utility method to get items matching an external id @param appId The id of the app @param externalId The external id @return The items matching the app and external id
[ "Utility", "method", "to", "get", "items", "matching", "an", "external", "id" ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L327-L330
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WAjaxControlRenderer.java
WAjaxControlRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WAjaxControl ajaxControl = (WAjaxControl) component; XmlStringBuilder xml = renderContext.getWriter(); WComponent trigger = ajaxControl.getTrigger() == null ? ajaxControl : ajaxControl. getTrigger(); int d...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WAjaxControl ajaxControl = (WAjaxControl) component; XmlStringBuilder xml = renderContext.getWriter(); WComponent trigger = ajaxControl.getTrigger() == null ? ajaxControl : ajaxControl. getTrigger(); int d...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WAjaxControl", "ajaxControl", "=", "(", "WAjaxControl", ")", "component", ";", "XmlStringBuilder", "xml", "=", ...
Paints the given AjaxControl. @param component the AjaxControl to paint @param renderContext the RenderContext to paint to
[ "Paints", "the", "given", "AjaxControl", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WAjaxControlRenderer.java#L24-L52
train
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/repeater/link/RepeaterLinkComponent.java
RepeaterLinkComponent.setNameAction
public void setNameAction(final Action action) { LinkComponent linkComponent = new LinkComponent(); linkComponent.setNameAction(action); repeater.setRepeatedComponent(linkComponent); }
java
public void setNameAction(final Action action) { LinkComponent linkComponent = new LinkComponent(); linkComponent.setNameAction(action); repeater.setRepeatedComponent(linkComponent); }
[ "public", "void", "setNameAction", "(", "final", "Action", "action", ")", "{", "LinkComponent", "linkComponent", "=", "new", "LinkComponent", "(", ")", ";", "linkComponent", ".", "setNameAction", "(", "action", ")", ";", "repeater", ".", "setRepeatedComponent", ...
Sets the action to execute when the "name" link is invoked. @param action the action for the name link.
[ "Sets", "the", "action", "to", "execute", "when", "the", "name", "link", "is", "invoked", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/repeater/link/RepeaterLinkComponent.java#L37-L41
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSingleSelectList.java
AbstractWSingleSelectList.getNewSelection
protected Object getNewSelection(final Request request) { String paramValue = request.getParameter(getId()); if (paramValue == null) { return null; } // Figure out which option has been selected. List<?> options = getOptions(); if (options == null || options.isEmpty()) { if (!isEditable()) { //...
java
protected Object getNewSelection(final Request request) { String paramValue = request.getParameter(getId()); if (paramValue == null) { return null; } // Figure out which option has been selected. List<?> options = getOptions(); if (options == null || options.isEmpty()) { if (!isEditable()) { //...
[ "protected", "Object", "getNewSelection", "(", "final", "Request", "request", ")", "{", "String", "paramValue", "=", "request", ".", "getParameter", "(", "getId", "(", ")", ")", ";", "if", "(", "paramValue", "==", "null", ")", "{", "return", "null", ";", ...
Determines which selection has been included in the given request. @param request the current request @return the selected option in the given request
[ "Determines", "which", "selection", "has", "been", "included", "in", "the", "given", "request", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSingleSelectList.java#L250-L296
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/SerializationUtil.java
SerializationUtil.pipe
public static Object pipe(final Object in) { try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream os = new ObjectOutputStream(bos); os.writeObject(in); os.close(); byte[] bytes = bos.toByteArray(); ByteArrayInputStream bis = new ByteArrayInputStream(bytes); ObjectInp...
java
public static Object pipe(final Object in) { try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream os = new ObjectOutputStream(bos); os.writeObject(in); os.close(); byte[] bytes = bos.toByteArray(); ByteArrayInputStream bis = new ByteArrayInputStream(bytes); ObjectInp...
[ "public", "static", "Object", "pipe", "(", "final", "Object", "in", ")", "{", "try", "{", "ByteArrayOutputStream", "bos", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "ObjectOutputStream", "os", "=", "new", "ObjectOutputStream", "(", "bos", ")", ";", ...
Takes a copy of an input object via serialization. @param in the object to copy @return the copied object
[ "Takes", "a", "copy", "of", "an", "input", "object", "via", "serialization", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/SerializationUtil.java#L27-L42
train
podio/podio-java
src/main/java/com/podio/notification/NotificationAPI.java
NotificationAPI.markAsViewed
public void markAsViewed(int notificationId) { getResourceFactory() .getApiResource("/notification/" + notificationId + "/viewed") .entity(new Empty(), MediaType.APPLICATION_JSON_TYPE).post(); }
java
public void markAsViewed(int notificationId) { getResourceFactory() .getApiResource("/notification/" + notificationId + "/viewed") .entity(new Empty(), MediaType.APPLICATION_JSON_TYPE).post(); }
[ "public", "void", "markAsViewed", "(", "int", "notificationId", ")", "{", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/notification/\"", "+", "notificationId", "+", "\"/viewed\"", ")", ".", "entity", "(", "new", "Empty", "(", ")", ",", "Medi...
Mark the notification as viewed. This will move the notification from the inbox to the viewed archive. @param notificationId The id of the notification
[ "Mark", "the", "notification", "as", "viewed", ".", "This", "will", "move", "the", "notification", "from", "the", "inbox", "to", "the", "viewed", "archive", "." ]
a520b23bac118c957ce02cdd8ff42a6c7d17b49a
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/notification/NotificationAPI.java#L49-L53
train
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ErrorComponent.java
ErrorComponent.afterPaint
@Override protected void afterPaint(final RenderContext renderContext) { if (renderContext instanceof WebXmlRenderContext) { PrintWriter writer = ((WebXmlRenderContext) renderContext).getWriter(); writer.println(WebUtilities.encode(message)); if (error != null) { writer.println("\n<br/>\n<pre>\n"); ...
java
@Override protected void afterPaint(final RenderContext renderContext) { if (renderContext instanceof WebXmlRenderContext) { PrintWriter writer = ((WebXmlRenderContext) renderContext).getWriter(); writer.println(WebUtilities.encode(message)); if (error != null) { writer.println("\n<br/>\n<pre>\n"); ...
[ "@", "Override", "protected", "void", "afterPaint", "(", "final", "RenderContext", "renderContext", ")", "{", "if", "(", "renderContext", "instanceof", "WebXmlRenderContext", ")", "{", "PrintWriter", "writer", "=", "(", "(", "WebXmlRenderContext", ")", "renderContex...
Override in order to paint the component. Real applications should not emit HTML directly. @param renderContext the renderContext to send output to.
[ "Override", "in", "order", "to", "paint", "the", "component", ".", "Real", "applications", "should", "not", "emit", "HTML", "directly", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ErrorComponent.java#L55-L71
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/WServlet.java
WServlet.serviceInt
protected void serviceInt(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { // Check for resource request boolean continueProcess = ServletUtil.checkResourceRequest(request, response); if (!continueProcess) { return; } // Create a support class...
java
protected void serviceInt(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { // Check for resource request boolean continueProcess = ServletUtil.checkResourceRequest(request, response); if (!continueProcess) { return; } // Create a support class...
[ "protected", "void", "serviceInt", "(", "final", "HttpServletRequest", "request", ",", "final", "HttpServletResponse", "response", ")", "throws", "ServletException", ",", "IOException", "{", "// Check for resource request", "boolean", "continueProcess", "=", "ServletUtil", ...
Service internal. This method does the real work in servicing the http request. It integrates wcomponents into a servlet environment via a servlet specific helper class. @param request the http servlet request. @param response the http servlet response. @throws IOException an IO exception @throws ServletException a se...
[ "Service", "internal", ".", "This", "method", "does", "the", "real", "work", "in", "servicing", "the", "http", "request", ".", "It", "integrates", "wcomponents", "into", "a", "servlet", "environment", "via", "a", "servlet", "specific", "helper", "class", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/WServlet.java#L130-L148
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/WServlet.java
WServlet.createServletHelper
protected WServletHelper createServletHelper(final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse) { LOG.debug("Creating a new WServletHelper instance"); WServletHelper helper = new WServletHelper(this, httpServletRequest, httpServletResponse); return helper; }
java
protected WServletHelper createServletHelper(final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse) { LOG.debug("Creating a new WServletHelper instance"); WServletHelper helper = new WServletHelper(this, httpServletRequest, httpServletResponse); return helper; }
[ "protected", "WServletHelper", "createServletHelper", "(", "final", "HttpServletRequest", "httpServletRequest", ",", "final", "HttpServletResponse", "httpServletResponse", ")", "{", "LOG", ".", "debug", "(", "\"Creating a new WServletHelper instance\"", ")", ";", "WServletHel...
Create a support class to coordinate the web request. @param httpServletRequest the request being processed @param httpServletResponse the servlet response @return the servlet helper
[ "Create", "a", "support", "class", "to", "coordinate", "the", "web", "request", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/WServlet.java#L189-L194
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WPanelRenderer.java
WPanelRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WPanel panel = (WPanel) component; XmlStringBuilder xml = renderContext.getWriter(); WButton submitButton = panel.getDefaultSubmitButton(); String submitId = submitButton == null ? null : submitButton.getId();...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WPanel panel = (WPanel) component; XmlStringBuilder xml = renderContext.getWriter(); WButton submitButton = panel.getDefaultSubmitButton(); String submitId = submitButton == null ? null : submitButton.getId();...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WPanel", "panel", "=", "(", "WPanel", ")", "component", ";", "XmlStringBuilder", "xml", "=", "renderContext", ...
Paints the given container. @param component the container to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "container", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WPanelRenderer.java#L28-L66
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java
WSubordinateControlRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WSubordinateControl subordinate = (WSubordinateControl) component; XmlStringBuilder xml = renderContext.getWriter(); if (!subordinate.getRules().isEmpty()) { int seq = 0; for (Rule rule : subordinate.get...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WSubordinateControl subordinate = (WSubordinateControl) component; XmlStringBuilder xml = renderContext.getWriter(); if (!subordinate.getRules().isEmpty()) { int seq = 0; for (Rule rule : subordinate.get...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WSubordinateControl", "subordinate", "=", "(", "WSubordinateControl", ")", "component", ";", "XmlStringBuilder", "x...
Paints the given SubordinateControl. @param component the SubordinateControl to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "SubordinateControl", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java#L35-L51
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java
WSubordinateControlRenderer.paintRule
private void paintRule(final Rule rule, final XmlStringBuilder xml) { if (rule.getCondition() == null) { throw new SystemException("Rule cannot be painted as it has no condition"); } paintCondition(rule.getCondition(), xml); for (Action action : rule.getOnTrue()) { paintAction(action, "ui:onTrue", xml);...
java
private void paintRule(final Rule rule, final XmlStringBuilder xml) { if (rule.getCondition() == null) { throw new SystemException("Rule cannot be painted as it has no condition"); } paintCondition(rule.getCondition(), xml); for (Action action : rule.getOnTrue()) { paintAction(action, "ui:onTrue", xml);...
[ "private", "void", "paintRule", "(", "final", "Rule", "rule", ",", "final", "XmlStringBuilder", "xml", ")", "{", "if", "(", "rule", ".", "getCondition", "(", ")", "==", "null", ")", "{", "throw", "new", "SystemException", "(", "\"Rule cannot be painted as it h...
Paints a single rule. @param rule the rule to paint. @param xml the writer to send the output to
[ "Paints", "a", "single", "rule", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java#L59-L73
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java
WSubordinateControlRenderer.paintCondition
private void paintCondition(final Condition condition, final XmlStringBuilder xml) { if (condition instanceof And) { xml.appendTag("ui:and"); for (Condition operand : ((And) condition).getConditions()) { paintCondition(operand, xml); } xml.appendEndTag("ui:and"); } else if (condition instanceof Or...
java
private void paintCondition(final Condition condition, final XmlStringBuilder xml) { if (condition instanceof And) { xml.appendTag("ui:and"); for (Condition operand : ((And) condition).getConditions()) { paintCondition(operand, xml); } xml.appendEndTag("ui:and"); } else if (condition instanceof Or...
[ "private", "void", "paintCondition", "(", "final", "Condition", "condition", ",", "final", "XmlStringBuilder", "xml", ")", "{", "if", "(", "condition", "instanceof", "And", ")", "{", "xml", ".", "appendTag", "(", "\"ui:and\"", ")", ";", "for", "(", "Conditio...
Paints a condition. @param condition the condition to paint. @param xml the writer to send the output to
[ "Paints", "a", "condition", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java#L81-L112
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java
WSubordinateControlRenderer.paintAction
private void paintAction(final Action action, final String elementName, final XmlStringBuilder xml) { switch (action.getActionType()) { case SHOW: case HIDE: case ENABLE: case DISABLE: case OPTIONAL: case MANDATORY: paintStandardAction(action, elementName, xml); break; case SHOWIN: ...
java
private void paintAction(final Action action, final String elementName, final XmlStringBuilder xml) { switch (action.getActionType()) { case SHOW: case HIDE: case ENABLE: case DISABLE: case OPTIONAL: case MANDATORY: paintStandardAction(action, elementName, xml); break; case SHOWIN: ...
[ "private", "void", "paintAction", "(", "final", "Action", "action", ",", "final", "String", "elementName", ",", "final", "XmlStringBuilder", "xml", ")", "{", "switch", "(", "action", ".", "getActionType", "(", ")", ")", "{", "case", "SHOW", ":", "case", "H...
Paints an action. @param action the action to paint @param elementName the enclosing element name ("ui:onFalse" or "ui:onTrue"). @param xml the writer to send the output to
[ "Paints", "an", "action", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java#L121-L143
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java
WSubordinateControlRenderer.paintStandardAction
private void paintStandardAction(final Action action, final String elementName, final XmlStringBuilder xml) { xml.appendTagOpen(elementName); xml.appendAttribute("action", getActionTypeName(action.getActionType())); xml.appendClose(); xml.appendTagOpen("ui:target"); SubordinateTarget target = action.getTa...
java
private void paintStandardAction(final Action action, final String elementName, final XmlStringBuilder xml) { xml.appendTagOpen(elementName); xml.appendAttribute("action", getActionTypeName(action.getActionType())); xml.appendClose(); xml.appendTagOpen("ui:target"); SubordinateTarget target = action.getTa...
[ "private", "void", "paintStandardAction", "(", "final", "Action", "action", ",", "final", "String", "elementName", ",", "final", "XmlStringBuilder", "xml", ")", "{", "xml", ".", "appendTagOpen", "(", "elementName", ")", ";", "xml", ".", "appendAttribute", "(", ...
Paint a standard action - where a single item or single group is targeted. @param action the action to paint @param elementName the enclosing element name ("ui:onFalse" or "ui:onTrue"). @param xml the output response
[ "Paint", "a", "standard", "action", "-", "where", "a", "single", "item", "or", "single", "group", "is", "targeted", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java#L152-L168
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java
WSubordinateControlRenderer.paintInGroupAction
private void paintInGroupAction(final Action action, final String elementName, final XmlStringBuilder xml) { xml.appendTagOpen(elementName); xml.appendAttribute("action", getActionTypeName(action.getActionType())); xml.appendClose(); xml.appendTagOpen("ui:target"); xml.appendAttribute("groupId", action.get...
java
private void paintInGroupAction(final Action action, final String elementName, final XmlStringBuilder xml) { xml.appendTagOpen(elementName); xml.appendAttribute("action", getActionTypeName(action.getActionType())); xml.appendClose(); xml.appendTagOpen("ui:target"); xml.appendAttribute("groupId", action.get...
[ "private", "void", "paintInGroupAction", "(", "final", "Action", "action", ",", "final", "String", "elementName", ",", "final", "XmlStringBuilder", "xml", ")", "{", "xml", ".", "appendTagOpen", "(", "elementName", ")", ";", "xml", ".", "appendAttribute", "(", ...
Paint an inGroup action - where a single item is being targeted out of a group of items. @param action the action to paint @param elementName the enclosing element name ("ui:onFalse" or "ui:onTrue"). @param xml the output response
[ "Paint", "an", "inGroup", "action", "-", "where", "a", "single", "item", "is", "being", "targeted", "out", "of", "a", "group", "of", "items", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java#L177-L187
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java
WSubordinateControlRenderer.getCompareTypeName
private String getCompareTypeName(final CompareType type) { String compare = null; switch (type) { case EQUAL: break; case NOT_EQUAL: compare = "ne"; break; case LESS_THAN: compare = "lt"; break; case LESS_THAN_OR_EQUAL: compare = "le"; break; case GREATER_THAN: compa...
java
private String getCompareTypeName(final CompareType type) { String compare = null; switch (type) { case EQUAL: break; case NOT_EQUAL: compare = "ne"; break; case LESS_THAN: compare = "lt"; break; case LESS_THAN_OR_EQUAL: compare = "le"; break; case GREATER_THAN: compa...
[ "private", "String", "getCompareTypeName", "(", "final", "CompareType", "type", ")", "{", "String", "compare", "=", "null", ";", "switch", "(", "type", ")", "{", "case", "EQUAL", ":", "break", ";", "case", "NOT_EQUAL", ":", "compare", "=", "\"ne\"", ";", ...
Helper method to determine the compare type name. @param type the enumerated CompareType @return the name of the CompareType
[ "Helper", "method", "to", "determine", "the", "compare", "type", "name", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java#L195-L224
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java
WSubordinateControlRenderer.getActionTypeName
private String getActionTypeName(final ActionType type) { String action = null; switch (type) { case SHOW: action = "show"; break; case SHOWIN: action = "showIn"; break; case HIDE: action = "hide"; break; case HIDEIN: action = "hideIn"; break; case ENABLE: action ...
java
private String getActionTypeName(final ActionType type) { String action = null; switch (type) { case SHOW: action = "show"; break; case SHOWIN: action = "showIn"; break; case HIDE: action = "hide"; break; case HIDEIN: action = "hideIn"; break; case ENABLE: action ...
[ "private", "String", "getActionTypeName", "(", "final", "ActionType", "type", ")", "{", "String", "action", "=", "null", ";", "switch", "(", "type", ")", "{", "case", "SHOW", ":", "action", "=", "\"show\"", ";", "break", ";", "case", "SHOWIN", ":", "acti...
Helper method to determine the action name. @param type the enumerated ActionType @return the name of the action
[ "Helper", "method", "to", "determine", "the", "action", "name", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java#L232-L271
train
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java
ExampleSection.buildUI
private void buildUI() { add(messages); add(tabset); // add(new AccessibilityWarningContainer()); container.add(new WText("Select an example from the menu")); // Set a static ID on container and it becomes a de-facto naming context. container.setIdName("eg"); tabset.addTab(container, "(no selection)", WT...
java
private void buildUI() { add(messages); add(tabset); // add(new AccessibilityWarningContainer()); container.add(new WText("Select an example from the menu")); // Set a static ID on container and it becomes a de-facto naming context. container.setIdName("eg"); tabset.addTab(container, "(no selection)", WT...
[ "private", "void", "buildUI", "(", ")", "{", "add", "(", "messages", ")", ";", "add", "(", "tabset", ")", ";", "// add(new AccessibilityWarningContainer());", "container", ".", "add", "(", "new", "WText", "(", "\"Select an example from the menu\"", ")", ")", ";"...
Add the controls to the section in the right order.
[ "Add", "the", "controls", "to", "the", "section", "in", "the", "right", "order", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java#L77-L120
train
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java
ExampleSection.addToTail
private void addToTail(final WComponent component) { WContainer tail = (WContainer) getDecoratedLabel().getTail(); if (null != tail) { // bloody well better not be... tail.add(component); } }
java
private void addToTail(final WComponent component) { WContainer tail = (WContainer) getDecoratedLabel().getTail(); if (null != tail) { // bloody well better not be... tail.add(component); } }
[ "private", "void", "addToTail", "(", "final", "WComponent", "component", ")", "{", "WContainer", "tail", "=", "(", "WContainer", ")", "getDecoratedLabel", "(", ")", ".", "getTail", "(", ")", ";", "if", "(", "null", "!=", "tail", ")", "{", "// bloody well b...
Add a component to the WDecoratedLabel's tail container. @param component The component to add.
[ "Add", "a", "component", "to", "the", "WDecoratedLabel", "s", "tail", "container", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java#L136-L141
train
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java
ExampleSection.selectExample
public void selectExample(final WComponent example, final String exampleName) { WComponent currentExample = container.getChildAt(0).getParent(); if (currentExample != null && currentExample.getClass().equals(example.getClass())) { // Same example selected, do nothing return; } resetExample(); containe...
java
public void selectExample(final WComponent example, final String exampleName) { WComponent currentExample = container.getChildAt(0).getParent(); if (currentExample != null && currentExample.getClass().equals(example.getClass())) { // Same example selected, do nothing return; } resetExample(); containe...
[ "public", "void", "selectExample", "(", "final", "WComponent", "example", ",", "final", "String", "exampleName", ")", "{", "WComponent", "currentExample", "=", "container", ".", "getChildAt", "(", "0", ")", ".", "getParent", "(", ")", ";", "if", "(", "curren...
Selects an example. @param example the example to select. @param exampleName the name of the example being selected.
[ "Selects", "an", "example", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java#L149-L183
train
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java
ExampleSection.selectExample
public void selectExample(final ExampleData example) { try { StringBuilder exampleName = new StringBuilder(); if (example.getExampleGroupName() != null && !example.getExampleGroupName().equals("")) { exampleName.append(example.getExampleGroupName()).append(" - "); } exampleName.append(example.getExamp...
java
public void selectExample(final ExampleData example) { try { StringBuilder exampleName = new StringBuilder(); if (example.getExampleGroupName() != null && !example.getExampleGroupName().equals("")) { exampleName.append(example.getExampleGroupName()).append(" - "); } exampleName.append(example.getExamp...
[ "public", "void", "selectExample", "(", "final", "ExampleData", "example", ")", "{", "try", "{", "StringBuilder", "exampleName", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "example", ".", "getExampleGroupName", "(", ")", "!=", "null", "&&", "!", ...
Selects an example. If there is an error instantiating the component, an error message will be displayed. @param example the ExampleData of the example to select.
[ "Selects", "an", "example", ".", "If", "there", "is", "an", "error", "instantiating", "the", "component", "an", "error", "message", "will", "be", "displayed", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java#L190-L203
train
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java
ExampleSection.getSource
private static String getSource(final String className) { String sourceName = '/' + className.replace('.', '/') + ".java"; InputStream stream = null; try { stream = ExampleSection.class.getResourceAsStream(sourceName); if (stream != null) { byte[] sourceBytes = StreamUtil.getBytes(stream); // we...
java
private static String getSource(final String className) { String sourceName = '/' + className.replace('.', '/') + ".java"; InputStream stream = null; try { stream = ExampleSection.class.getResourceAsStream(sourceName); if (stream != null) { byte[] sourceBytes = StreamUtil.getBytes(stream); // we...
[ "private", "static", "String", "getSource", "(", "final", "String", "className", ")", "{", "String", "sourceName", "=", "'", "'", "+", "className", ".", "replace", "(", "'", "'", ",", "'", "'", ")", "+", "\".java\"", ";", "InputStream", "stream", "=", ...
Tries to obtain the source file for the given class. @param className the name of the class to find the source for. @return the source file for the given class, or null on error.
[ "Tries", "to", "obtain", "the", "source", "file", "for", "the", "given", "class", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java#L218-L245
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSelectList.java
AbstractWSelectList.optionToCode
protected String optionToCode(final Object option, final int index) { if (index < 0) { List<?> options = getOptions(); if (options == null || options.isEmpty()) { Integrity.issue(this, "No options available, so cannot convert the option \"" + option + "\" to a code."); } else { StringBuffer me...
java
protected String optionToCode(final Object option, final int index) { if (index < 0) { List<?> options = getOptions(); if (options == null || options.isEmpty()) { Integrity.issue(this, "No options available, so cannot convert the option \"" + option + "\" to a code."); } else { StringBuffer me...
[ "protected", "String", "optionToCode", "(", "final", "Object", "option", ",", "final", "int", "index", ")", "{", "if", "(", "index", "<", "0", ")", "{", "List", "<", "?", ">", "options", "=", "getOptions", "(", ")", ";", "if", "(", "options", "==", ...
Retrieves the code for the given option. Will return null if there is no matching option. @param option the option @param index the index of the option in the list. @return the code for the given option, or null if there is no matching option.
[ "Retrieves", "the", "code", "for", "the", "given", "option", ".", "Will", "return", "null", "if", "there", "is", "no", "matching", "option", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSelectList.java#L126-L163
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSelectList.java
AbstractWSelectList.getOptionIndex
protected int getOptionIndex(final Object option) { int optionCount = 0; List<?> options = getOptions(); if (options != null) { for (Object obj : getOptions()) { if (obj instanceof OptionGroup) { List<?> groupOptions = ((OptionGroup) obj).getOptions(); int groupIndex = groupOptions.indexOf(opti...
java
protected int getOptionIndex(final Object option) { int optionCount = 0; List<?> options = getOptions(); if (options != null) { for (Object obj : getOptions()) { if (obj instanceof OptionGroup) { List<?> groupOptions = ((OptionGroup) obj).getOptions(); int groupIndex = groupOptions.indexOf(opti...
[ "protected", "int", "getOptionIndex", "(", "final", "Object", "option", ")", "{", "int", "optionCount", "=", "0", ";", "List", "<", "?", ">", "options", "=", "getOptions", "(", ")", ";", "if", "(", "options", "!=", "null", ")", "{", "for", "(", "Obje...
Retrieves the index of the given option. The index is not necessarily the index of the option in the options list, as there may be options nested in OptionGroups. @param option the option @return the index of the given option, or -1 if there is no matching option.
[ "Retrieves", "the", "index", "of", "the", "given", "option", ".", "The", "index", "is", "not", "necessarily", "the", "index", "of", "the", "option", "in", "the", "options", "list", "as", "there", "may", "be", "options", "nested", "in", "OptionGroups", "." ...
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSelectList.java#L172-L197
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSelectList.java
AbstractWSelectList.getListCacheKey
public String getListCacheKey() { Object table = getLookupTable(); if (table != null && ConfigurationProperties.getDatalistCaching()) { String key = APPLICATION_LOOKUP_TABLE.getCacheKeyForTable(table); return key; } return null; }
java
public String getListCacheKey() { Object table = getLookupTable(); if (table != null && ConfigurationProperties.getDatalistCaching()) { String key = APPLICATION_LOOKUP_TABLE.getCacheKeyForTable(table); return key; } return null; }
[ "public", "String", "getListCacheKey", "(", ")", "{", "Object", "table", "=", "getLookupTable", "(", ")", ";", "if", "(", "table", "!=", "null", "&&", "ConfigurationProperties", ".", "getDatalistCaching", "(", ")", ")", "{", "String", "key", "=", "APPLICATIO...
Retrieves the data list cache key for this component. @return the cache key if client-side caching is enabled, null otherwise.
[ "Retrieves", "the", "data", "list", "cache", "key", "for", "this", "component", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSelectList.java#L204-L213
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSelectList.java
AbstractWSelectList.getOptions
public List<?> getOptions() { if (getLookupTable() == null) { SelectionModel model = getComponentModel(); return model.getOptions(); } else { return APPLICATION_LOOKUP_TABLE.getTable(getLookupTable()); } }
java
public List<?> getOptions() { if (getLookupTable() == null) { SelectionModel model = getComponentModel(); return model.getOptions(); } else { return APPLICATION_LOOKUP_TABLE.getTable(getLookupTable()); } }
[ "public", "List", "<", "?", ">", "getOptions", "(", ")", "{", "if", "(", "getLookupTable", "(", ")", "==", "null", ")", "{", "SelectionModel", "model", "=", "getComponentModel", "(", ")", ";", "return", "model", ".", "getOptions", "(", ")", ";", "}", ...
Returns the complete list of options available for selection for this user's session. @return the list of options available for the given user's session.
[ "Returns", "the", "complete", "list", "of", "options", "available", "for", "selection", "for", "this", "user", "s", "session", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSelectList.java#L234-L241
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSelectList.java
AbstractWSelectList.setOptions
public void setOptions(final Object[] aArray) { setOptions(aArray == null ? null : Arrays.asList(aArray)); }
java
public void setOptions(final Object[] aArray) { setOptions(aArray == null ? null : Arrays.asList(aArray)); }
[ "public", "void", "setOptions", "(", "final", "Object", "[", "]", "aArray", ")", "{", "setOptions", "(", "aArray", "==", "null", "?", "null", ":", "Arrays", ".", "asList", "(", "aArray", ")", ")", ";", "}" ]
Set the complete list of options available for selection for this users session. @param aArray the list of options available to the user.
[ "Set", "the", "complete", "list", "of", "options", "available", "for", "selection", "for", "this", "users", "session", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSelectList.java#L258-L260
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSelectList.java
AbstractWSelectList.preparePaintComponent
@Override protected void preparePaintComponent(final Request request) { super.preparePaintComponent(request); if (isAjax() && UIContextHolder.getCurrent().getUI() != null) { AjaxTarget target = getAjaxTarget(); AjaxHelper.registerComponent(target.getId(), getId()); } String cacheKey = getListCacheKey()...
java
@Override protected void preparePaintComponent(final Request request) { super.preparePaintComponent(request); if (isAjax() && UIContextHolder.getCurrent().getUI() != null) { AjaxTarget target = getAjaxTarget(); AjaxHelper.registerComponent(target.getId(), getId()); } String cacheKey = getListCacheKey()...
[ "@", "Override", "protected", "void", "preparePaintComponent", "(", "final", "Request", "request", ")", "{", "super", ".", "preparePaintComponent", "(", "request", ")", ";", "if", "(", "isAjax", "(", ")", "&&", "UIContextHolder", ".", "getCurrent", "(", ")", ...
Override preparePaintComponent to register an AJAX operation if this list is AJAX enabled. @param request the request being responded to.
[ "Override", "preparePaintComponent", "to", "register", "an", "AJAX", "operation", "if", "this", "list", "is", "AJAX", "enabled", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSelectList.java#L372-L386
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSelectList.java
AbstractWSelectList.getDesc
public String getDesc(final Object option, final int index) { String desc = ""; if (option instanceof Option) { String optDesc = ((Option) option).getDesc(); if (optDesc != null) { desc = optDesc; } } else { String tableDesc = APPLICATION_LOOKUP_TABLE.getDescription(getLookupTable(), option); ...
java
public String getDesc(final Object option, final int index) { String desc = ""; if (option instanceof Option) { String optDesc = ((Option) option).getDesc(); if (optDesc != null) { desc = optDesc; } } else { String tableDesc = APPLICATION_LOOKUP_TABLE.getDescription(getLookupTable(), option); ...
[ "public", "String", "getDesc", "(", "final", "Object", "option", ",", "final", "int", "index", ")", "{", "String", "desc", "=", "\"\"", ";", "if", "(", "option", "instanceof", "Option", ")", "{", "String", "optDesc", "=", "(", "(", "Option", ")", "opti...
Retrieves the description for the given option. Intended for use by Renderers. @param option the option to retrieve the description for. @param index the option index. @return the description for the given option.
[ "Retrieves", "the", "description", "for", "the", "given", "option", ".", "Intended", "for", "use", "by", "Renderers", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWSelectList.java#L432-L452
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSingleSelectRenderer.java
WSingleSelectRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WSingleSelect listBox = (WSingleSelect) component; XmlStringBuilder xml = renderContext.getWriter(); String dataKey = listBox.getListCacheKey(); boolean readOnly = listBox.isReadOnly(); int rows = listBox.ge...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WSingleSelect listBox = (WSingleSelect) component; XmlStringBuilder xml = renderContext.getWriter(); String dataKey = listBox.getListCacheKey(); boolean readOnly = listBox.isReadOnly(); int rows = listBox.ge...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WSingleSelect", "listBox", "=", "(", "WSingleSelect", ")", "component", ";", "XmlStringBuilder", "xml", "=", "r...
Paints the given WSingleSelect. @param component the WSingleSelect to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WSingleSelect", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSingleSelectRenderer.java#L25-L84
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java
DefaultInternalConfiguration.initialiseInstanceVariables
private void initialiseInstanceVariables() { backing = new HashMap<>(); booleanBacking = new HashSet<>(); locations = new HashMap<>(); // subContextCache is updated on the fly so ensure no concurrent modification. subcontextCache = Collections.synchronizedMap(new HashMap()); runtimeProperties = new Include...
java
private void initialiseInstanceVariables() { backing = new HashMap<>(); booleanBacking = new HashSet<>(); locations = new HashMap<>(); // subContextCache is updated on the fly so ensure no concurrent modification. subcontextCache = Collections.synchronizedMap(new HashMap()); runtimeProperties = new Include...
[ "private", "void", "initialiseInstanceVariables", "(", ")", "{", "backing", "=", "new", "HashMap", "<>", "(", ")", ";", "booleanBacking", "=", "new", "HashSet", "<>", "(", ")", ";", "locations", "=", "new", "HashMap", "<>", "(", ")", ";", "// subContextCac...
This method initialises most of the instance variables.
[ "This", "method", "initialises", "most", "of", "the", "instance", "variables", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java#L230-L238
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java
DefaultInternalConfiguration.load
@SuppressWarnings("checkstyle:emptyblock") private void load() { recordMessage("Loading parameters"); File cwd = new File("."); String workingDir; try { workingDir = cwd.getCanonicalPath(); } catch (IOException ex) { workingDir = "UNKNOWN"; } recordMessage("Working directory is " + workingDir); ...
java
@SuppressWarnings("checkstyle:emptyblock") private void load() { recordMessage("Loading parameters"); File cwd = new File("."); String workingDir; try { workingDir = cwd.getCanonicalPath(); } catch (IOException ex) { workingDir = "UNKNOWN"; } recordMessage("Working directory is " + workingDir); ...
[ "@", "SuppressWarnings", "(", "\"checkstyle:emptyblock\"", ")", "private", "void", "load", "(", ")", "{", "recordMessage", "(", "\"Loading parameters\"", ")", ";", "File", "cwd", "=", "new", "File", "(", "\".\"", ")", ";", "String", "workingDir", ";", "try", ...
Load the backing from the properties file visible to our classloader, plus the filesystem.
[ "Load", "the", "backing", "from", "the", "properties", "file", "visible", "to", "our", "classloader", "plus", "the", "filesystem", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java#L243-L283
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java
DefaultInternalConfiguration.loadTop
@SuppressWarnings("checkstyle:emptyblock") private void loadTop(final String resourceName) { try { resources.push(resourceName); load(resourceName); // Now check for INCLUDE_AFTER resources String includes = get(INCLUDE_AFTER); if (includes != null) { // First, do substitution on the INCLUDE_AF...
java
@SuppressWarnings("checkstyle:emptyblock") private void loadTop(final String resourceName) { try { resources.push(resourceName); load(resourceName); // Now check for INCLUDE_AFTER resources String includes = get(INCLUDE_AFTER); if (includes != null) { // First, do substitution on the INCLUDE_AF...
[ "@", "SuppressWarnings", "(", "\"checkstyle:emptyblock\"", ")", "private", "void", "loadTop", "(", "final", "String", "resourceName", ")", "{", "try", "{", "resources", ".", "push", "(", "resourceName", ")", ";", "load", "(", "resourceName", ")", ";", "// Now ...
Loading of "top level" resources is different to the general recursive case, since it is only at the top level that we check for the includeAfter parameter. @param resourceName the path of the resource to load from.
[ "Loading", "of", "top", "level", "resources", "is", "different", "to", "the", "general", "recursive", "case", "since", "it", "is", "only", "at", "the", "top", "level", "that", "we", "check", "for", "the", "includeAfter", "parameter", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java#L341-L366
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java
DefaultInternalConfiguration.load
private void load(final String resourceName) { boolean found = false; try { resources.push(resourceName); // Try classloader - load the resources in reverse order of the enumeration. Since later-loaded resources // override earlier-loaded ones, this better corresponds to the usual classpath behaviour. ...
java
private void load(final String resourceName) { boolean found = false; try { resources.push(resourceName); // Try classloader - load the resources in reverse order of the enumeration. Since later-loaded resources // override earlier-loaded ones, this better corresponds to the usual classpath behaviour. ...
[ "private", "void", "load", "(", "final", "String", "resourceName", ")", "{", "boolean", "found", "=", "false", ";", "try", "{", "resources", ".", "push", "(", "resourceName", ")", ";", "// Try classloader - load the resources in reverse order of the enumeration. Since ...
Try loading the given resource name. There may be several resources corresponding to that name... @param resourceName the path of the resource to load from.
[ "Try", "loading", "the", "given", "resource", "name", ".", "There", "may", "be", "several", "resources", "corresponding", "to", "that", "name", "..." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java#L373-L462
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java
DefaultInternalConfiguration.filename
private String filename(final File aFile) { try { return aFile.getCanonicalPath(); } catch (IOException ex) { recordException(ex); return "UNKNOWN FILE"; } }
java
private String filename(final File aFile) { try { return aFile.getCanonicalPath(); } catch (IOException ex) { recordException(ex); return "UNKNOWN FILE"; } }
[ "private", "String", "filename", "(", "final", "File", "aFile", ")", "{", "try", "{", "return", "aFile", ".", "getCanonicalPath", "(", ")", ";", "}", "catch", "(", "IOException", "ex", ")", "{", "recordException", "(", "ex", ")", ";", "return", "\"UNKNOW...
Retrieves the canonical path for a given file. @param aFile the file to get the canonical path for. @return the canonical path to the given file, or <code>"UNKNOWN FILE"</code> on error.
[ "Retrieves", "the", "canonical", "path", "for", "a", "given", "file", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java#L470-L477
train
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java
DefaultInternalConfiguration.load
private void load(final Properties properties, final String location, final boolean overwriteOnly) { for (Map.Entry<Object, Object> entry : properties.entrySet()) { String key = (String) entry.getKey(); String already = get(key); if (overwriteOnly && already == null && !INCLUDE.equals(key)) { contin...
java
private void load(final Properties properties, final String location, final boolean overwriteOnly) { for (Map.Entry<Object, Object> entry : properties.entrySet()) { String key = (String) entry.getKey(); String already = get(key); if (overwriteOnly && already == null && !INCLUDE.equals(key)) { contin...
[ "private", "void", "load", "(", "final", "Properties", "properties", ",", "final", "String", "location", ",", "final", "boolean", "overwriteOnly", ")", "{", "for", "(", "Map", ".", "Entry", "<", "Object", ",", "Object", ">", "entry", ":", "properties", "."...
Load the properties from the given Properties object, recording the origin on those properties as being from the given location. @param properties the properties to load from @param location the location where the parameter was defined. @param overwriteOnly if true, only properties that are already defined will be loa...
[ "Load", "the", "properties", "from", "the", "given", "Properties", "object", "recording", "the", "origin", "on", "those", "properties", "as", "being", "from", "the", "given", "location", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java#L535-L549
train