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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
alkacon/opencms-core | src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorModel.java | CmsMessageBundleEditorModel.saveToPropertyVfsBundle | private void saveToPropertyVfsBundle() throws CmsException {
for (Locale l : m_changedTranslations) {
SortedProperties props = m_localizations.get(l);
LockedFile f = m_lockedBundleFiles.get(l);
if ((null != props) && (null != f)) {
try {
B... | java | private void saveToPropertyVfsBundle() throws CmsException {
for (Locale l : m_changedTranslations) {
SortedProperties props = m_localizations.get(l);
LockedFile f = m_lockedBundleFiles.get(l);
if ((null != props) && (null != f)) {
try {
B... | [
"private",
"void",
"saveToPropertyVfsBundle",
"(",
")",
"throws",
"CmsException",
"{",
"for",
"(",
"Locale",
"l",
":",
"m_changedTranslations",
")",
"{",
"SortedProperties",
"props",
"=",
"m_localizations",
".",
"get",
"(",
"l",
")",
";",
"LockedFile",
"f",
"=... | Saves messages to a propertyvfsbundle file.
@throws CmsException thrown if writing to the file fails. | [
"Saves",
"messages",
"to",
"a",
"propertyvfsbundle",
"file",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorModel.java#L1830-L1867 | train |
alkacon/opencms-core | src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorModel.java | CmsMessageBundleEditorModel.saveToXmlVfsBundle | private void saveToXmlVfsBundle() throws CmsException {
if (m_lockedBundleFiles.get(null) != null) { // If the file was not locked, no changes were made, i.e., storing is not necessary.
for (Locale l : m_locales) {
SortedProperties props = m_localizations.get(l);
if ... | java | private void saveToXmlVfsBundle() throws CmsException {
if (m_lockedBundleFiles.get(null) != null) { // If the file was not locked, no changes were made, i.e., storing is not necessary.
for (Locale l : m_locales) {
SortedProperties props = m_localizations.get(l);
if ... | [
"private",
"void",
"saveToXmlVfsBundle",
"(",
")",
"throws",
"CmsException",
"{",
"if",
"(",
"m_lockedBundleFiles",
".",
"get",
"(",
"null",
")",
"!=",
"null",
")",
"{",
"// If the file was not locked, no changes were made, i.e., storing is not necessary.",
"for",
"(",
... | Saves messages to a xmlvfsbundle file.
@throws CmsException thrown if writing to the file fails. | [
"Saves",
"messages",
"to",
"a",
"xmlvfsbundle",
"file",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorModel.java#L1874-L1904 | train |
alkacon/opencms-core | src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorModel.java | CmsMessageBundleEditorModel.setResourceInformation | private void setResourceInformation() {
String sitePath = m_cms.getSitePath(m_resource);
int pathEnd = sitePath.lastIndexOf('/') + 1;
String baseName = sitePath.substring(pathEnd);
m_sitepath = sitePath.substring(0, pathEnd);
switch (CmsMessageBundleEditorTypes.BundleType.toBund... | java | private void setResourceInformation() {
String sitePath = m_cms.getSitePath(m_resource);
int pathEnd = sitePath.lastIndexOf('/') + 1;
String baseName = sitePath.substring(pathEnd);
m_sitepath = sitePath.substring(0, pathEnd);
switch (CmsMessageBundleEditorTypes.BundleType.toBund... | [
"private",
"void",
"setResourceInformation",
"(",
")",
"{",
"String",
"sitePath",
"=",
"m_cms",
".",
"getSitePath",
"(",
"m_resource",
")",
";",
"int",
"pathEnd",
"=",
"sitePath",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
"+",
"1",
";",
"String",
"baseName",... | Extract site path, base name and locale from the resource opened with the editor. | [
"Extract",
"site",
"path",
"base",
"name",
"and",
"locale",
"from",
"the",
"resource",
"opened",
"with",
"the",
"editor",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorModel.java#L1907-L1949 | train |
alkacon/opencms-core | src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorModel.java | CmsMessageBundleEditorModel.unmarshalDescriptor | private void unmarshalDescriptor() throws CmsXmlException, CmsException {
if (null != m_desc) {
// unmarshal descriptor
m_descContent = CmsXmlContentFactory.unmarshal(m_cms, m_cms.readFile(m_desc));
// configure messages if wanted
CmsProperty bundleProp = m_cms... | java | private void unmarshalDescriptor() throws CmsXmlException, CmsException {
if (null != m_desc) {
// unmarshal descriptor
m_descContent = CmsXmlContentFactory.unmarshal(m_cms, m_cms.readFile(m_desc));
// configure messages if wanted
CmsProperty bundleProp = m_cms... | [
"private",
"void",
"unmarshalDescriptor",
"(",
")",
"throws",
"CmsXmlException",
",",
"CmsException",
"{",
"if",
"(",
"null",
"!=",
"m_desc",
")",
"{",
"// unmarshal descriptor",
"m_descContent",
"=",
"CmsXmlContentFactory",
".",
"unmarshal",
"(",
"m_cms",
",",
"m... | Unmarshals the descriptor content.
@throws CmsXmlException thrown if the XML structure of the descriptor is wrong.
@throws CmsException thrown if reading the descriptor file fails. | [
"Unmarshals",
"the",
"descriptor",
"content",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorModel.java#L1957-L1971 | train |
alkacon/opencms-core | src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorModel.java | CmsMessageBundleEditorModel.updateBundleDescriptorContent | private void updateBundleDescriptorContent() throws CmsXmlException {
if (m_descContent.hasLocale(Descriptor.LOCALE)) {
m_descContent.removeLocale(Descriptor.LOCALE);
}
m_descContent.addLocale(m_cms, Descriptor.LOCALE);
int i = 0;
Property<Object> descProp;
... | java | private void updateBundleDescriptorContent() throws CmsXmlException {
if (m_descContent.hasLocale(Descriptor.LOCALE)) {
m_descContent.removeLocale(Descriptor.LOCALE);
}
m_descContent.addLocale(m_cms, Descriptor.LOCALE);
int i = 0;
Property<Object> descProp;
... | [
"private",
"void",
"updateBundleDescriptorContent",
"(",
")",
"throws",
"CmsXmlException",
"{",
"if",
"(",
"m_descContent",
".",
"hasLocale",
"(",
"Descriptor",
".",
"LOCALE",
")",
")",
"{",
"m_descContent",
".",
"removeLocale",
"(",
"Descriptor",
".",
"LOCALE",
... | Update the descriptor content with values from the editor.
@throws CmsXmlException thrown if update fails due to a wrong XML structure (should never happen) | [
"Update",
"the",
"descriptor",
"content",
"with",
"values",
"from",
"the",
"editor",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorModel.java#L1977-L2021 | train |
alkacon/opencms-core | src-gwt/org/opencms/ade/sitemap/client/CmsSitemapTreeItem.java | CmsSitemapTreeItem.removeInvalidChildren | protected void removeInvalidChildren() {
if (getLoadState() == LoadState.LOADED) {
List<CmsSitemapTreeItem> toDelete = new ArrayList<CmsSitemapTreeItem>();
for (int i = 0; i < getChildCount(); i++) {
CmsSitemapTreeItem item = (CmsSitemapTreeItem)getChild(i);
... | java | protected void removeInvalidChildren() {
if (getLoadState() == LoadState.LOADED) {
List<CmsSitemapTreeItem> toDelete = new ArrayList<CmsSitemapTreeItem>();
for (int i = 0; i < getChildCount(); i++) {
CmsSitemapTreeItem item = (CmsSitemapTreeItem)getChild(i);
... | [
"protected",
"void",
"removeInvalidChildren",
"(",
")",
"{",
"if",
"(",
"getLoadState",
"(",
")",
"==",
"LoadState",
".",
"LOADED",
")",
"{",
"List",
"<",
"CmsSitemapTreeItem",
">",
"toDelete",
"=",
"new",
"ArrayList",
"<",
"CmsSitemapTreeItem",
">",
"(",
")... | Helper method to remove invalid children that don't have a corresponding CmsSitemapClientEntry. | [
"Helper",
"method",
"to",
"remove",
"invalid",
"children",
"that",
"don",
"t",
"have",
"a",
"corresponding",
"CmsSitemapClientEntry",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/CmsSitemapTreeItem.java#L829-L844 | train |
alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelDailyView.java | CmsPatternPanelDailyView.onEveryDayChange | @UiHandler("m_everyDay")
void onEveryDayChange(ValueChangeEvent<String> event) {
if (handleChange()) {
m_controller.setInterval(m_everyDay.getFormValueAsString());
}
} | java | @UiHandler("m_everyDay")
void onEveryDayChange(ValueChangeEvent<String> event) {
if (handleChange()) {
m_controller.setInterval(m_everyDay.getFormValueAsString());
}
} | [
"@",
"UiHandler",
"(",
"\"m_everyDay\"",
")",
"void",
"onEveryDayChange",
"(",
"ValueChangeEvent",
"<",
"String",
">",
"event",
")",
"{",
"if",
"(",
"handleChange",
"(",
")",
")",
"{",
"m_controller",
".",
"setInterval",
"(",
"m_everyDay",
".",
"getFormValueAs... | Handle interval change.
@param event the change event. | [
"Handle",
"interval",
"change",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelDailyView.java#L168-L175 | train |
alkacon/opencms-core | src/org/opencms/widgets/CmsLocationPickerWidget.java | CmsLocationPickerWidget.getApiKey | private String getApiKey(CmsObject cms, String sitePath) throws CmsException {
String res = cms.readPropertyObject(
sitePath,
CmsPropertyDefinition.PROPERTY_GOOGLE_API_KEY_WORKPLACE,
true).getValue();
if (CmsStringUtil.isEmptyOrWhitespaceOnly(res)) {
res... | java | private String getApiKey(CmsObject cms, String sitePath) throws CmsException {
String res = cms.readPropertyObject(
sitePath,
CmsPropertyDefinition.PROPERTY_GOOGLE_API_KEY_WORKPLACE,
true).getValue();
if (CmsStringUtil.isEmptyOrWhitespaceOnly(res)) {
res... | [
"private",
"String",
"getApiKey",
"(",
"CmsObject",
"cms",
",",
"String",
"sitePath",
")",
"throws",
"CmsException",
"{",
"String",
"res",
"=",
"cms",
".",
"readPropertyObject",
"(",
"sitePath",
",",
"CmsPropertyDefinition",
".",
"PROPERTY_GOOGLE_API_KEY_WORKPLACE",
... | Get the correct google api key.
Tries to read a workplace key first.
@param cms CmsObject
@param sitePath site path
@return key value
@throws CmsException exception | [
"Get",
"the",
"correct",
"google",
"api",
"key",
".",
"Tries",
"to",
"read",
"a",
"workplace",
"key",
"first",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/CmsLocationPickerWidget.java#L309-L321 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/CmsSearchConfiguration.java | CmsSearchConfiguration.propagateFacetNames | private void propagateFacetNames() {
// collect all names and configurations
Collection<String> facetNames = new ArrayList<String>();
Collection<I_CmsSearchConfigurationFacet> facetConfigs = new ArrayList<I_CmsSearchConfigurationFacet>();
facetNames.addAll(m_fieldFacets.keySet());
... | java | private void propagateFacetNames() {
// collect all names and configurations
Collection<String> facetNames = new ArrayList<String>();
Collection<I_CmsSearchConfigurationFacet> facetConfigs = new ArrayList<I_CmsSearchConfigurationFacet>();
facetNames.addAll(m_fieldFacets.keySet());
... | [
"private",
"void",
"propagateFacetNames",
"(",
")",
"{",
"// collect all names and configurations",
"Collection",
"<",
"String",
">",
"facetNames",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"Collection",
"<",
"I_CmsSearchConfigurationFacet",
">",
"... | Propagates the names of all facets to each single facet. | [
"Propagates",
"the",
"names",
"of",
"all",
"facets",
"to",
"each",
"single",
"facet",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/CmsSearchConfiguration.java#L156-L174 | train |
alkacon/opencms-core | src/org/opencms/widgets/serialdate/CmsSerialDateBeanWeekly.java | CmsSerialDateBeanWeekly.getDaysToNextMatch | private int getDaysToNextMatch(WeekDay weekDay) {
for (WeekDay wd : m_weekDays) {
if (wd.compareTo(weekDay) > 0) {
return wd.toInt() - weekDay.toInt();
}
}
return (m_weekDays.iterator().next().toInt() + (m_interval * I_CmsSerialDateValue.NUM_OF_WEEKDAYS))... | java | private int getDaysToNextMatch(WeekDay weekDay) {
for (WeekDay wd : m_weekDays) {
if (wd.compareTo(weekDay) > 0) {
return wd.toInt() - weekDay.toInt();
}
}
return (m_weekDays.iterator().next().toInt() + (m_interval * I_CmsSerialDateValue.NUM_OF_WEEKDAYS))... | [
"private",
"int",
"getDaysToNextMatch",
"(",
"WeekDay",
"weekDay",
")",
"{",
"for",
"(",
"WeekDay",
"wd",
":",
"m_weekDays",
")",
"{",
"if",
"(",
"wd",
".",
"compareTo",
"(",
"weekDay",
")",
">",
"0",
")",
"{",
"return",
"wd",
".",
"toInt",
"(",
")",... | Returns the number of days from the given weekday to the next weekday the event should occur.
@param weekDay the current weekday.
@return the number of days to the next weekday an event could occur. | [
"Returns",
"the",
"number",
"of",
"days",
"from",
"the",
"given",
"weekday",
"to",
"the",
"next",
"weekday",
"the",
"event",
"should",
"occur",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/serialdate/CmsSerialDateBeanWeekly.java#L118-L127 | train |
alkacon/opencms-core | src/org/opencms/util/CmsMacroResolver.java | CmsMacroResolver.newWorkplaceLocaleResolver | public static I_CmsMacroResolver newWorkplaceLocaleResolver(final CmsObject cms) {
// Resolve macros in the property configuration
CmsMacroResolver resolver = new CmsMacroResolver();
resolver.setCmsObject(cms);
CmsUserSettings userSettings = new CmsUserSettings(cms.getRequestContext().g... | java | public static I_CmsMacroResolver newWorkplaceLocaleResolver(final CmsObject cms) {
// Resolve macros in the property configuration
CmsMacroResolver resolver = new CmsMacroResolver();
resolver.setCmsObject(cms);
CmsUserSettings userSettings = new CmsUserSettings(cms.getRequestContext().g... | [
"public",
"static",
"I_CmsMacroResolver",
"newWorkplaceLocaleResolver",
"(",
"final",
"CmsObject",
"cms",
")",
"{",
"// Resolve macros in the property configuration",
"CmsMacroResolver",
"resolver",
"=",
"new",
"CmsMacroResolver",
"(",
")",
";",
"resolver",
".",
"setCmsObje... | Returns a new macro resolver that loads message keys from the workplace bundle in the user setting's language.
@param cms the CmsObject.
@return a new macro resolver with messages from the workplace bundle in the current users locale. | [
"Returns",
"a",
"new",
"macro",
"resolver",
"that",
"loads",
"message",
"keys",
"from",
"the",
"workplace",
"bundle",
"in",
"the",
"user",
"setting",
"s",
"language",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsMacroResolver.java#L495-L507 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.parseMandatoryStringValues | protected static List<String> parseMandatoryStringValues(JSONObject json, String key) throws JSONException {
List<String> list = null;
JSONArray array = json.getJSONArray(key);
list = new ArrayList<String>(array.length());
for (int i = 0; i < array.length(); i++) {
try {
... | java | protected static List<String> parseMandatoryStringValues(JSONObject json, String key) throws JSONException {
List<String> list = null;
JSONArray array = json.getJSONArray(key);
list = new ArrayList<String>(array.length());
for (int i = 0; i < array.length(); i++) {
try {
... | [
"protected",
"static",
"List",
"<",
"String",
">",
"parseMandatoryStringValues",
"(",
"JSONObject",
"json",
",",
"String",
"key",
")",
"throws",
"JSONException",
"{",
"List",
"<",
"String",
">",
"list",
"=",
"null",
";",
"JSONArray",
"array",
"=",
"json",
".... | Helper for reading a mandatory String value list - throwing an Exception if parsing fails.
@param json The JSON object where the list should be read from.
@param key The key of the value to read.
@return The value from the JSON.
@throws JSONException thrown when parsing fails. | [
"Helper",
"for",
"reading",
"a",
"mandatory",
"String",
"value",
"list",
"-",
"throwing",
"an",
"Exception",
"if",
"parsing",
"fails",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L248-L262 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.getEscapeQueryChars | protected Boolean getEscapeQueryChars() {
Boolean isEscape = parseOptionalBooleanValue(m_configObject, JSON_KEY_ESCAPE_QUERY_CHARACTERS);
return (null == isEscape) && (m_baseConfig != null)
? Boolean.valueOf(m_baseConfig.getGeneralConfig().getEscapeQueryChars())
: isEscape;
} | java | protected Boolean getEscapeQueryChars() {
Boolean isEscape = parseOptionalBooleanValue(m_configObject, JSON_KEY_ESCAPE_QUERY_CHARACTERS);
return (null == isEscape) && (m_baseConfig != null)
? Boolean.valueOf(m_baseConfig.getGeneralConfig().getEscapeQueryChars())
: isEscape;
} | [
"protected",
"Boolean",
"getEscapeQueryChars",
"(",
")",
"{",
"Boolean",
"isEscape",
"=",
"parseOptionalBooleanValue",
"(",
"m_configObject",
",",
"JSON_KEY_ESCAPE_QUERY_CHARACTERS",
")",
";",
"return",
"(",
"null",
"==",
"isEscape",
")",
"&&",
"(",
"m_baseConfig",
... | Returns the flag, indicating if the characters in the query string that are commands to Solr should be escaped.
@return the flag, indicating if the characters in the query string that are commands to Solr should be escaped. | [
"Returns",
"the",
"flag",
"indicating",
"if",
"the",
"characters",
"in",
"the",
"query",
"string",
"that",
"are",
"commands",
"to",
"Solr",
"should",
"be",
"escaped",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L588-L594 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.getExtraSolrParams | protected String getExtraSolrParams() {
try {
return m_configObject.getString(JSON_KEY_EXTRASOLRPARAMS);
} catch (JSONException e) {
if (null == m_baseConfig) {
if (LOG.isInfoEnabled()) {
LOG.info(Messages.get().getBundle().key(Messages.LOG_NO... | java | protected String getExtraSolrParams() {
try {
return m_configObject.getString(JSON_KEY_EXTRASOLRPARAMS);
} catch (JSONException e) {
if (null == m_baseConfig) {
if (LOG.isInfoEnabled()) {
LOG.info(Messages.get().getBundle().key(Messages.LOG_NO... | [
"protected",
"String",
"getExtraSolrParams",
"(",
")",
"{",
"try",
"{",
"return",
"m_configObject",
".",
"getString",
"(",
"JSON_KEY_EXTRASOLRPARAMS",
")",
";",
"}",
"catch",
"(",
"JSONException",
"e",
")",
"{",
"if",
"(",
"null",
"==",
"m_baseConfig",
")",
... | Returns the configured extra parameters that should be given to Solr, or the empty string if no parameters are configured.
@return The configured extra parameters that should be given to Solr, or the empty string if no parameters are configured. | [
"Returns",
"the",
"configured",
"extra",
"parameters",
"that",
"should",
"be",
"given",
"to",
"Solr",
"or",
"the",
"empty",
"string",
"if",
"no",
"parameters",
"are",
"configured",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L599-L613 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.getIgnoreExpirationDate | protected Boolean getIgnoreExpirationDate() {
Boolean isIgnoreExpirationDate = parseOptionalBooleanValue(m_configObject, JSON_KEY_IGNORE_EXPIRATION_DATE);
return (null == isIgnoreExpirationDate) && (m_baseConfig != null)
? Boolean.valueOf(m_baseConfig.getGeneralConfig().getIgnoreExpirationDate(... | java | protected Boolean getIgnoreExpirationDate() {
Boolean isIgnoreExpirationDate = parseOptionalBooleanValue(m_configObject, JSON_KEY_IGNORE_EXPIRATION_DATE);
return (null == isIgnoreExpirationDate) && (m_baseConfig != null)
? Boolean.valueOf(m_baseConfig.getGeneralConfig().getIgnoreExpirationDate(... | [
"protected",
"Boolean",
"getIgnoreExpirationDate",
"(",
")",
"{",
"Boolean",
"isIgnoreExpirationDate",
"=",
"parseOptionalBooleanValue",
"(",
"m_configObject",
",",
"JSON_KEY_IGNORE_EXPIRATION_DATE",
")",
";",
"return",
"(",
"null",
"==",
"isIgnoreExpirationDate",
")",
"&... | Returns a flag indicating if also expired resources should be found.
@return A flag indicating if also expired resources should be found. | [
"Returns",
"a",
"flag",
"indicating",
"if",
"also",
"expired",
"resources",
"should",
"be",
"found",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L631-L637 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.getIgnoreQuery | protected Boolean getIgnoreQuery() {
Boolean isIgnoreQuery = parseOptionalBooleanValue(m_configObject, JSON_KEY_IGNORE_QUERY);
return (null == isIgnoreQuery) && (m_baseConfig != null)
? Boolean.valueOf(m_baseConfig.getGeneralConfig().getIgnoreQueryParam())
: isIgnoreQuery;
} | java | protected Boolean getIgnoreQuery() {
Boolean isIgnoreQuery = parseOptionalBooleanValue(m_configObject, JSON_KEY_IGNORE_QUERY);
return (null == isIgnoreQuery) && (m_baseConfig != null)
? Boolean.valueOf(m_baseConfig.getGeneralConfig().getIgnoreQueryParam())
: isIgnoreQuery;
} | [
"protected",
"Boolean",
"getIgnoreQuery",
"(",
")",
"{",
"Boolean",
"isIgnoreQuery",
"=",
"parseOptionalBooleanValue",
"(",
"m_configObject",
",",
"JSON_KEY_IGNORE_QUERY",
")",
";",
"return",
"(",
"null",
"==",
"isIgnoreQuery",
")",
"&&",
"(",
"m_baseConfig",
"!=",
... | Returns a flag indicating if the query given by the parameters should be ignored.
@return A flag indicating if the query given by the parameters should be ignored. | [
"Returns",
"a",
"flag",
"indicating",
"if",
"the",
"query",
"given",
"by",
"the",
"parameters",
"should",
"be",
"ignored",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L642-L648 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.getIgnoreReleaseDate | protected Boolean getIgnoreReleaseDate() {
Boolean isIgnoreReleaseDate = parseOptionalBooleanValue(m_configObject, JSON_KEY_IGNORE_RELEASE_DATE);
return (null == isIgnoreReleaseDate) && (m_baseConfig != null)
? Boolean.valueOf(m_baseConfig.getGeneralConfig().getIgnoreReleaseDate())
: is... | java | protected Boolean getIgnoreReleaseDate() {
Boolean isIgnoreReleaseDate = parseOptionalBooleanValue(m_configObject, JSON_KEY_IGNORE_RELEASE_DATE);
return (null == isIgnoreReleaseDate) && (m_baseConfig != null)
? Boolean.valueOf(m_baseConfig.getGeneralConfig().getIgnoreReleaseDate())
: is... | [
"protected",
"Boolean",
"getIgnoreReleaseDate",
"(",
")",
"{",
"Boolean",
"isIgnoreReleaseDate",
"=",
"parseOptionalBooleanValue",
"(",
"m_configObject",
",",
"JSON_KEY_IGNORE_RELEASE_DATE",
")",
";",
"return",
"(",
"null",
"==",
"isIgnoreReleaseDate",
")",
"&&",
"(",
... | Returns a flag indicating if also unreleased resources should be found.
@return A flag indicating if also unreleased resources should be found. | [
"Returns",
"a",
"flag",
"indicating",
"if",
"also",
"unreleased",
"resources",
"should",
"be",
"found",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L653-L659 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.getPageSizes | protected List<Integer> getPageSizes() {
try {
return Collections.singletonList(Integer.valueOf(m_configObject.getInt(JSON_KEY_PAGESIZE)));
} catch (JSONException e) {
List<Integer> result = null;
String pageSizesString = null;
try {
pageS... | java | protected List<Integer> getPageSizes() {
try {
return Collections.singletonList(Integer.valueOf(m_configObject.getInt(JSON_KEY_PAGESIZE)));
} catch (JSONException e) {
List<Integer> result = null;
String pageSizesString = null;
try {
pageS... | [
"protected",
"List",
"<",
"Integer",
">",
"getPageSizes",
"(",
")",
"{",
"try",
"{",
"return",
"Collections",
".",
"singletonList",
"(",
"Integer",
".",
"valueOf",
"(",
"m_configObject",
".",
"getInt",
"(",
"JSON_KEY_PAGESIZE",
")",
")",
")",
";",
"}",
"ca... | Returns the configured page sizes, or the default page size if no core is configured.
@return The configured page sizes, or the default page size if no core is configured. | [
"Returns",
"the",
"configured",
"page",
"sizes",
"or",
"the",
"default",
"page",
"size",
"if",
"no",
"core",
"is",
"configured",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L714-L743 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.getQueryModifier | protected String getQueryModifier() {
String queryModifier = parseOptionalStringValue(m_configObject, JSON_KEY_QUERY_MODIFIER);
return (null == queryModifier) && (null != m_baseConfig)
? m_baseConfig.getGeneralConfig().getQueryModifier()
: queryModifier;
} | java | protected String getQueryModifier() {
String queryModifier = parseOptionalStringValue(m_configObject, JSON_KEY_QUERY_MODIFIER);
return (null == queryModifier) && (null != m_baseConfig)
? m_baseConfig.getGeneralConfig().getQueryModifier()
: queryModifier;
} | [
"protected",
"String",
"getQueryModifier",
"(",
")",
"{",
"String",
"queryModifier",
"=",
"parseOptionalStringValue",
"(",
"m_configObject",
",",
"JSON_KEY_QUERY_MODIFIER",
")",
";",
"return",
"(",
"null",
"==",
"queryModifier",
")",
"&&",
"(",
"null",
"!=",
"m_ba... | Returns the optional query modifier.
@return the optional query modifier. | [
"Returns",
"the",
"optional",
"query",
"modifier",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L748-L754 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.getQueryParam | protected String getQueryParam() {
String param = parseOptionalStringValue(m_configObject, JSON_KEY_QUERYPARAM);
if (param == null) {
return null != m_baseConfig ? m_baseConfig.getGeneralConfig().getQueryParam() : DEFAULT_QUERY_PARAM;
} else {
return param;
}
... | java | protected String getQueryParam() {
String param = parseOptionalStringValue(m_configObject, JSON_KEY_QUERYPARAM);
if (param == null) {
return null != m_baseConfig ? m_baseConfig.getGeneralConfig().getQueryParam() : DEFAULT_QUERY_PARAM;
} else {
return param;
}
... | [
"protected",
"String",
"getQueryParam",
"(",
")",
"{",
"String",
"param",
"=",
"parseOptionalStringValue",
"(",
"m_configObject",
",",
"JSON_KEY_QUERYPARAM",
")",
";",
"if",
"(",
"param",
"==",
"null",
")",
"{",
"return",
"null",
"!=",
"m_baseConfig",
"?",
"m_... | Returns the configured request parameter for the query string, or the default parameter if no core is configured.
@return The configured request parameter for the query string, or the default parameter if no core is configured. | [
"Returns",
"the",
"configured",
"request",
"parameter",
"for",
"the",
"query",
"string",
"or",
"the",
"default",
"parameter",
"if",
"no",
"core",
"is",
"configured",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L759-L767 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.getSearchForEmptyQuery | protected Boolean getSearchForEmptyQuery() {
Boolean isSearchForEmptyQuery = parseOptionalBooleanValue(m_configObject, JSON_KEY_SEARCH_FOR_EMPTY_QUERY);
return (isSearchForEmptyQuery == null) && (null != m_baseConfig)
? Boolean.valueOf(m_baseConfig.getGeneralConfig().getSearchForEmptyQueryParam... | java | protected Boolean getSearchForEmptyQuery() {
Boolean isSearchForEmptyQuery = parseOptionalBooleanValue(m_configObject, JSON_KEY_SEARCH_FOR_EMPTY_QUERY);
return (isSearchForEmptyQuery == null) && (null != m_baseConfig)
? Boolean.valueOf(m_baseConfig.getGeneralConfig().getSearchForEmptyQueryParam... | [
"protected",
"Boolean",
"getSearchForEmptyQuery",
"(",
")",
"{",
"Boolean",
"isSearchForEmptyQuery",
"=",
"parseOptionalBooleanValue",
"(",
"m_configObject",
",",
"JSON_KEY_SEARCH_FOR_EMPTY_QUERY",
")",
";",
"return",
"(",
"isSearchForEmptyQuery",
"==",
"null",
")",
"&&",... | Returns a flag, indicating if search should be performed using a wildcard if the empty query is given.
@return A flag, indicating if search should be performed using a wildcard if the empty query is given. | [
"Returns",
"a",
"flag",
"indicating",
"if",
"search",
"should",
"be",
"performed",
"using",
"a",
"wildcard",
"if",
"the",
"empty",
"query",
"is",
"given",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L772-L778 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.getSortOptions | protected List<I_CmsSearchConfigurationSortOption> getSortOptions() {
List<I_CmsSearchConfigurationSortOption> options = new LinkedList<I_CmsSearchConfigurationSortOption>();
try {
JSONArray sortOptions = m_configObject.getJSONArray(JSON_KEY_SORTOPTIONS);
for (int i = 0; i < sor... | java | protected List<I_CmsSearchConfigurationSortOption> getSortOptions() {
List<I_CmsSearchConfigurationSortOption> options = new LinkedList<I_CmsSearchConfigurationSortOption>();
try {
JSONArray sortOptions = m_configObject.getJSONArray(JSON_KEY_SORTOPTIONS);
for (int i = 0; i < sor... | [
"protected",
"List",
"<",
"I_CmsSearchConfigurationSortOption",
">",
"getSortOptions",
"(",
")",
"{",
"List",
"<",
"I_CmsSearchConfigurationSortOption",
">",
"options",
"=",
"new",
"LinkedList",
"<",
"I_CmsSearchConfigurationSortOption",
">",
"(",
")",
";",
"try",
"{"... | Returns the list of the configured sort options, or the empty list if no sort options are configured.
@return The list of the configured sort options, or the empty list if no sort options are configured. | [
"Returns",
"the",
"list",
"of",
"the",
"configured",
"sort",
"options",
"or",
"the",
"empty",
"list",
"if",
"no",
"sort",
"options",
"are",
"configured",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L783-L804 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.init | protected void init(String configString, I_CmsSearchConfiguration baseConfig) throws JSONException {
m_configObject = new JSONObject(configString);
m_baseConfig = baseConfig;
} | java | protected void init(String configString, I_CmsSearchConfiguration baseConfig) throws JSONException {
m_configObject = new JSONObject(configString);
m_baseConfig = baseConfig;
} | [
"protected",
"void",
"init",
"(",
"String",
"configString",
",",
"I_CmsSearchConfiguration",
"baseConfig",
")",
"throws",
"JSONException",
"{",
"m_configObject",
"=",
"new",
"JSONObject",
"(",
"configString",
")",
";",
"m_baseConfig",
"=",
"baseConfig",
";",
"}"
] | Initialization that parses the String to a JSON object.
@param configString The JSON as string.
@param baseConfig The optional basic search configuration to overwrite (partly) by the JSON configuration.
@throws JSONException thrown if parsing fails. | [
"Initialization",
"that",
"parses",
"the",
"String",
"to",
"a",
"JSON",
"object",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L819-L823 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.parseFacetQueryItem | protected I_CmsFacetQueryItem parseFacetQueryItem(JSONObject item) {
String query;
try {
query = item.getString(JSON_KEY_QUERY_FACET_QUERY_QUERY);
} catch (JSONException e) {
// TODO: Log
return null;
}
String label = parseOptionalStringValue(... | java | protected I_CmsFacetQueryItem parseFacetQueryItem(JSONObject item) {
String query;
try {
query = item.getString(JSON_KEY_QUERY_FACET_QUERY_QUERY);
} catch (JSONException e) {
// TODO: Log
return null;
}
String label = parseOptionalStringValue(... | [
"protected",
"I_CmsFacetQueryItem",
"parseFacetQueryItem",
"(",
"JSONObject",
"item",
")",
"{",
"String",
"query",
";",
"try",
"{",
"query",
"=",
"item",
".",
"getString",
"(",
"JSON_KEY_QUERY_FACET_QUERY_QUERY",
")",
";",
"}",
"catch",
"(",
"JSONException",
"e",
... | Parses a single query item for the query facet.
@param item JSON object of the query item.
@return the parsed query item, or <code>null</code> if parsing failed. | [
"Parses",
"a",
"single",
"query",
"item",
"for",
"the",
"query",
"facet",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L829-L840 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.parseFacetQueryItems | protected List<I_CmsFacetQueryItem> parseFacetQueryItems(JSONObject queryFacetObject) throws JSONException {
JSONArray items = queryFacetObject.getJSONArray(JSON_KEY_QUERY_FACET_QUERY);
List<I_CmsFacetQueryItem> result = new ArrayList<I_CmsFacetQueryItem>(items.length());
for (int i = 0; i < it... | java | protected List<I_CmsFacetQueryItem> parseFacetQueryItems(JSONObject queryFacetObject) throws JSONException {
JSONArray items = queryFacetObject.getJSONArray(JSON_KEY_QUERY_FACET_QUERY);
List<I_CmsFacetQueryItem> result = new ArrayList<I_CmsFacetQueryItem>(items.length());
for (int i = 0; i < it... | [
"protected",
"List",
"<",
"I_CmsFacetQueryItem",
">",
"parseFacetQueryItems",
"(",
"JSONObject",
"queryFacetObject",
")",
"throws",
"JSONException",
"{",
"JSONArray",
"items",
"=",
"queryFacetObject",
".",
"getJSONArray",
"(",
"JSON_KEY_QUERY_FACET_QUERY",
")",
";",
"Li... | Parses the list of query items for the query facet.
@param queryFacetObject JSON object representing the node with the query facet.
@return list of query options
@throws JSONException if the list cannot be parsed. | [
"Parses",
"the",
"list",
"of",
"query",
"items",
"for",
"the",
"query",
"facet",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L847-L858 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.parseFieldFacet | protected I_CmsSearchConfigurationFacetField parseFieldFacet(JSONObject fieldFacetObject) {
try {
String field = fieldFacetObject.getString(JSON_KEY_FACET_FIELD);
String name = parseOptionalStringValue(fieldFacetObject, JSON_KEY_FACET_NAME);
String label = parseOptionalStrin... | java | protected I_CmsSearchConfigurationFacetField parseFieldFacet(JSONObject fieldFacetObject) {
try {
String field = fieldFacetObject.getString(JSON_KEY_FACET_FIELD);
String name = parseOptionalStringValue(fieldFacetObject, JSON_KEY_FACET_NAME);
String label = parseOptionalStrin... | [
"protected",
"I_CmsSearchConfigurationFacetField",
"parseFieldFacet",
"(",
"JSONObject",
"fieldFacetObject",
")",
"{",
"try",
"{",
"String",
"field",
"=",
"fieldFacetObject",
".",
"getString",
"(",
"JSON_KEY_FACET_FIELD",
")",
";",
"String",
"name",
"=",
"parseOptionalS... | Parses the field facet configurations.
@param fieldFacetObject The JSON sub-node with the field facet configurations.
@return The field facet configurations. | [
"Parses",
"the",
"field",
"facet",
"configurations",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L864-L904 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.parseRangeFacet | protected I_CmsSearchConfigurationFacetRange parseRangeFacet(JSONObject rangeFacetObject) {
try {
String range = rangeFacetObject.getString(JSON_KEY_RANGE_FACET_RANGE);
String name = parseOptionalStringValue(rangeFacetObject, JSON_KEY_FACET_NAME);
String label = parseOptiona... | java | protected I_CmsSearchConfigurationFacetRange parseRangeFacet(JSONObject rangeFacetObject) {
try {
String range = rangeFacetObject.getString(JSON_KEY_RANGE_FACET_RANGE);
String name = parseOptionalStringValue(rangeFacetObject, JSON_KEY_FACET_NAME);
String label = parseOptiona... | [
"protected",
"I_CmsSearchConfigurationFacetRange",
"parseRangeFacet",
"(",
"JSONObject",
"rangeFacetObject",
")",
"{",
"try",
"{",
"String",
"range",
"=",
"rangeFacetObject",
".",
"getString",
"(",
"JSON_KEY_RANGE_FACET_RANGE",
")",
";",
"String",
"name",
"=",
"parseOpt... | Parses the query facet configurations.
@param rangeFacetObject The JSON sub-node with the query facet configurations.
@return The query facet configurations. | [
"Parses",
"the",
"query",
"facet",
"configurations",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L910-L968 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java | CmsJSONSearchConfigurationParser.parseSortOption | protected I_CmsSearchConfigurationSortOption parseSortOption(JSONObject json) {
try {
String solrValue = json.getString(JSON_KEY_SORTOPTION_SOLRVALUE);
String paramValue = parseOptionalStringValue(json, JSON_KEY_SORTOPTION_PARAMVALUE);
paramValue = (paramValue == null) ? sol... | java | protected I_CmsSearchConfigurationSortOption parseSortOption(JSONObject json) {
try {
String solrValue = json.getString(JSON_KEY_SORTOPTION_SOLRVALUE);
String paramValue = parseOptionalStringValue(json, JSON_KEY_SORTOPTION_PARAMVALUE);
paramValue = (paramValue == null) ? sol... | [
"protected",
"I_CmsSearchConfigurationSortOption",
"parseSortOption",
"(",
"JSONObject",
"json",
")",
"{",
"try",
"{",
"String",
"solrValue",
"=",
"json",
".",
"getString",
"(",
"JSON_KEY_SORTOPTION_SOLRVALUE",
")",
";",
"String",
"paramValue",
"=",
"parseOptionalString... | Returns a single sort option configuration as configured via the methods parameter, or null if the parameter does not specify a sort option.
@param json The JSON sort option configuration.
@return The sort option configuration, or null if the JSON could not be read. | [
"Returns",
"a",
"single",
"sort",
"option",
"configuration",
"as",
"configured",
"via",
"the",
"methods",
"parameter",
"or",
"null",
"if",
"the",
"parameter",
"does",
"not",
"specify",
"a",
"sort",
"option",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L974-L989 | train |
alkacon/opencms-core | src/org/opencms/search/extractors/CmsExtractionResult.java | CmsExtractionResult.mergeItem | private Map<String, String> mergeItem(
String item,
Map<String, String> localeValues,
Map<String, String> resultLocaleValues) {
if (resultLocaleValues.get(item) != null) {
if (localeValues.get(item) != null) {
localeValues.put(item, localeValues.get(it... | java | private Map<String, String> mergeItem(
String item,
Map<String, String> localeValues,
Map<String, String> resultLocaleValues) {
if (resultLocaleValues.get(item) != null) {
if (localeValues.get(item) != null) {
localeValues.put(item, localeValues.get(it... | [
"private",
"Map",
"<",
"String",
",",
"String",
">",
"mergeItem",
"(",
"String",
"item",
",",
"Map",
"<",
"String",
",",
"String",
">",
"localeValues",
",",
"Map",
"<",
"String",
",",
"String",
">",
"resultLocaleValues",
")",
"{",
"if",
"(",
"resultLocal... | Merges the item from the resultLocaleValues into the corresponding item of the localeValues.
@param item the item to merge
@param localeValues the values where the item gets merged into
@param resultLocaleValues the values where the item to merge is read from
@return the modified localeValues with the merged item | [
"Merges",
"the",
"item",
"from",
"the",
"resultLocaleValues",
"into",
"the",
"corresponding",
"item",
"of",
"the",
"localeValues",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/extractors/CmsExtractionResult.java#L320-L334 | train |
alkacon/opencms-core | src/org/opencms/ade/galleries/shared/CmsGalleryTabConfiguration.java | CmsGalleryTabConfiguration.resolve | public static CmsGalleryTabConfiguration resolve(String configStr) {
CmsGalleryTabConfiguration tabConfig;
if (CmsStringUtil.isEmptyOrWhitespaceOnly(configStr)) {
configStr = "*sitemap,types,galleries,categories,vfstree,search,results";
}
if (DEFAULT_CONFIGURATIONS != ... | java | public static CmsGalleryTabConfiguration resolve(String configStr) {
CmsGalleryTabConfiguration tabConfig;
if (CmsStringUtil.isEmptyOrWhitespaceOnly(configStr)) {
configStr = "*sitemap,types,galleries,categories,vfstree,search,results";
}
if (DEFAULT_CONFIGURATIONS != ... | [
"public",
"static",
"CmsGalleryTabConfiguration",
"resolve",
"(",
"String",
"configStr",
")",
"{",
"CmsGalleryTabConfiguration",
"tabConfig",
";",
"if",
"(",
"CmsStringUtil",
".",
"isEmptyOrWhitespaceOnly",
"(",
"configStr",
")",
")",
"{",
"configStr",
"=",
"\"*sitema... | Given a string which is either the name of a predefined tab configuration or a configuration string, returns
the corresponding tab configuration.
@param configStr a configuration string or predefined configuration name
@return the gallery tab configuration | [
"Given",
"a",
"string",
"which",
"is",
"either",
"the",
"name",
"of",
"a",
"predefined",
"tab",
"configuration",
"or",
"a",
"configuration",
"string",
"returns",
"the",
"corresponding",
"tab",
"configuration",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/galleries/shared/CmsGalleryTabConfiguration.java#L181-L195 | train |
alkacon/opencms-core | src-setup/org/opencms/setup/ui/CmsSetupStep04Modules.java | CmsSetupStep04Modules.forward | private void forward() {
Set<String> selected = new HashSet<>();
for (CheckBox checkbox : m_componentCheckboxes) {
CmsSetupComponent component = (CmsSetupComponent)(checkbox.getData());
if (checkbox.getValue().booleanValue()) {
selected.add(component.getId());
... | java | private void forward() {
Set<String> selected = new HashSet<>();
for (CheckBox checkbox : m_componentCheckboxes) {
CmsSetupComponent component = (CmsSetupComponent)(checkbox.getData());
if (checkbox.getValue().booleanValue()) {
selected.add(component.getId());
... | [
"private",
"void",
"forward",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"selected",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"for",
"(",
"CheckBox",
"checkbox",
":",
"m_componentCheckboxes",
")",
"{",
"CmsSetupComponent",
"component",
"=",
"(",
"CmsSetu... | Moves to the next step. | [
"Moves",
"to",
"the",
"next",
"step",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/ui/CmsSetupStep04Modules.java#L90-L134 | train |
alkacon/opencms-core | src-setup/org/opencms/setup/ui/CmsSetupStep04Modules.java | CmsSetupStep04Modules.initComponents | private void initComponents(List<CmsSetupComponent> components) {
for (CmsSetupComponent component : components) {
CheckBox checkbox = new CheckBox();
checkbox.setValue(component.isChecked());
checkbox.setCaption(component.getName() + " - " + component.getDescription());
... | java | private void initComponents(List<CmsSetupComponent> components) {
for (CmsSetupComponent component : components) {
CheckBox checkbox = new CheckBox();
checkbox.setValue(component.isChecked());
checkbox.setCaption(component.getName() + " - " + component.getDescription());
... | [
"private",
"void",
"initComponents",
"(",
"List",
"<",
"CmsSetupComponent",
">",
"components",
")",
"{",
"for",
"(",
"CmsSetupComponent",
"component",
":",
"components",
")",
"{",
"CheckBox",
"checkbox",
"=",
"new",
"CheckBox",
"(",
")",
";",
"checkbox",
".",
... | Initializes the components.
@param components the components | [
"Initializes",
"the",
"components",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/ui/CmsSetupStep04Modules.java#L141-L155 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/controller/CmsSearchControllerFacetQuery.java | CmsSearchControllerFacetQuery.addFacetPart | protected void addFacetPart(CmsSolrQuery query) {
query.set("facet", "true");
String excludes = "";
if (m_config.getIgnoreAllFacetFilters()
|| (!m_state.getCheckedEntries().isEmpty() && !m_config.getIsAndFacet())) {
excludes = "{!ex=" + m_config.getIgnoreTags() + "}";
... | java | protected void addFacetPart(CmsSolrQuery query) {
query.set("facet", "true");
String excludes = "";
if (m_config.getIgnoreAllFacetFilters()
|| (!m_state.getCheckedEntries().isEmpty() && !m_config.getIsAndFacet())) {
excludes = "{!ex=" + m_config.getIgnoreTags() + "}";
... | [
"protected",
"void",
"addFacetPart",
"(",
"CmsSolrQuery",
"query",
")",
"{",
"query",
".",
"set",
"(",
"\"facet\"",
",",
"\"true\"",
")",
";",
"String",
"excludes",
"=",
"\"\"",
";",
"if",
"(",
"m_config",
".",
"getIgnoreAllFacetFilters",
"(",
")",
"||",
"... | Add query part for the facet, without filters.
@param query The query part that is extended for the facet | [
"Add",
"query",
"part",
"for",
"the",
"facet",
"without",
"filters",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/controller/CmsSearchControllerFacetQuery.java#L140-L152 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/result/CmsSearchResultWrapper.java | CmsSearchResultWrapper.convertSearchResults | protected void convertSearchResults(final Collection<CmsSearchResource> searchResults) {
m_foundResources = new ArrayList<I_CmsSearchResourceBean>();
for (final CmsSearchResource searchResult : searchResults) {
m_foundResources.add(new CmsSearchResourceBean(searchResult, m_cmsObject));
... | java | protected void convertSearchResults(final Collection<CmsSearchResource> searchResults) {
m_foundResources = new ArrayList<I_CmsSearchResourceBean>();
for (final CmsSearchResource searchResult : searchResults) {
m_foundResources.add(new CmsSearchResourceBean(searchResult, m_cmsObject));
... | [
"protected",
"void",
"convertSearchResults",
"(",
"final",
"Collection",
"<",
"CmsSearchResource",
">",
"searchResults",
")",
"{",
"m_foundResources",
"=",
"new",
"ArrayList",
"<",
"I_CmsSearchResourceBean",
">",
"(",
")",
";",
"for",
"(",
"final",
"CmsSearchResourc... | Converts the search results from CmsSearchResource to CmsSearchResourceBean.
@param searchResults The collection of search results to transform. | [
"Converts",
"the",
"search",
"results",
"from",
"CmsSearchResource",
"to",
"CmsSearchResourceBean",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/result/CmsSearchResultWrapper.java#L487-L493 | train |
alkacon/opencms-core | src/org/opencms/site/CmsSiteManagerImpl.java | CmsSiteManagerImpl.addAliasToConfigSite | public void addAliasToConfigSite(String alias, String redirect, String offset) {
long timeOffset = 0;
try {
timeOffset = Long.parseLong(offset);
} catch (Throwable e) {
// ignore
}
CmsSiteMatcher siteMatcher = new CmsSiteMatcher(alias, timeOffset);
... | java | public void addAliasToConfigSite(String alias, String redirect, String offset) {
long timeOffset = 0;
try {
timeOffset = Long.parseLong(offset);
} catch (Throwable e) {
// ignore
}
CmsSiteMatcher siteMatcher = new CmsSiteMatcher(alias, timeOffset);
... | [
"public",
"void",
"addAliasToConfigSite",
"(",
"String",
"alias",
",",
"String",
"redirect",
",",
"String",
"offset",
")",
"{",
"long",
"timeOffset",
"=",
"0",
";",
"try",
"{",
"timeOffset",
"=",
"Long",
".",
"parseLong",
"(",
"offset",
")",
";",
"}",
"c... | Adds an alias to the currently configured site.
@param alias the URL of the alias server
@param redirect <code>true</code> to always redirect to main URL
@param offset the optional time offset for this alias | [
"Adds",
"an",
"alias",
"to",
"the",
"currently",
"configured",
"site",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/site/CmsSiteManagerImpl.java#L207-L219 | train |
alkacon/opencms-core | src/org/opencms/site/CmsSiteManagerImpl.java | CmsSiteManagerImpl.addServer | private void addServer(CmsSiteMatcher matcher, CmsSite site) {
Map<CmsSiteMatcher, CmsSite> siteMatcherSites = new HashMap<CmsSiteMatcher, CmsSite>(m_siteMatcherSites);
siteMatcherSites.put(matcher, site);
setSiteMatcherSites(siteMatcherSites);
} | java | private void addServer(CmsSiteMatcher matcher, CmsSite site) {
Map<CmsSiteMatcher, CmsSite> siteMatcherSites = new HashMap<CmsSiteMatcher, CmsSite>(m_siteMatcherSites);
siteMatcherSites.put(matcher, site);
setSiteMatcherSites(siteMatcherSites);
} | [
"private",
"void",
"addServer",
"(",
"CmsSiteMatcher",
"matcher",
",",
"CmsSite",
"site",
")",
"{",
"Map",
"<",
"CmsSiteMatcher",
",",
"CmsSite",
">",
"siteMatcherSites",
"=",
"new",
"HashMap",
"<",
"CmsSiteMatcher",
",",
"CmsSite",
">",
"(",
"m_siteMatcherSites... | Adds a new Site matcher object to the map of server names.
@param matcher the SiteMatcher of the server
@param site the site to add | [
"Adds",
"a",
"new",
"Site",
"matcher",
"object",
"to",
"the",
"map",
"of",
"server",
"names",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/site/CmsSiteManagerImpl.java#L1632-L1637 | train |
alkacon/opencms-core | src/org/opencms/ui/apps/sitemanager/CmsSitesWebserverThread.java | CmsSitesWebserverThread.updateLetsEncrypt | private void updateLetsEncrypt() {
getReport().println(Messages.get().container(Messages.RPT_STARTING_LETSENCRYPT_UPDATE_0));
CmsLetsEncryptConfiguration config = OpenCms.getLetsEncryptConfig();
if ((config == null) || !config.isValidAndEnabled()) {
return;
}
CmsSit... | java | private void updateLetsEncrypt() {
getReport().println(Messages.get().container(Messages.RPT_STARTING_LETSENCRYPT_UPDATE_0));
CmsLetsEncryptConfiguration config = OpenCms.getLetsEncryptConfig();
if ((config == null) || !config.isValidAndEnabled()) {
return;
}
CmsSit... | [
"private",
"void",
"updateLetsEncrypt",
"(",
")",
"{",
"getReport",
"(",
")",
".",
"println",
"(",
"Messages",
".",
"get",
"(",
")",
".",
"container",
"(",
"Messages",
".",
"RPT_STARTING_LETSENCRYPT_UPDATE_0",
")",
")",
";",
"CmsLetsEncryptConfiguration",
"confi... | Updates LetsEncrypt configuration. | [
"Updates",
"LetsEncrypt",
"configuration",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/sitemanager/CmsSitesWebserverThread.java#L330-L346 | train |
alkacon/opencms-core | src/org/opencms/ade/contenteditor/CmsContentService.java | CmsContentService.getDynamicAttributeValue | private String getDynamicAttributeValue(
CmsFile file,
I_CmsXmlContentValue value,
String attributeName,
CmsEntity editedLocalEntity) {
if ((null != editedLocalEntity) && (editedLocalEntity.getAttribute(attributeName) != null)) {
getSessionCache().setDynamicValue(
... | java | private String getDynamicAttributeValue(
CmsFile file,
I_CmsXmlContentValue value,
String attributeName,
CmsEntity editedLocalEntity) {
if ((null != editedLocalEntity) && (editedLocalEntity.getAttribute(attributeName) != null)) {
getSessionCache().setDynamicValue(
... | [
"private",
"String",
"getDynamicAttributeValue",
"(",
"CmsFile",
"file",
",",
"I_CmsXmlContentValue",
"value",
",",
"String",
"attributeName",
",",
"CmsEntity",
"editedLocalEntity",
")",
"{",
"if",
"(",
"(",
"null",
"!=",
"editedLocalEntity",
")",
"&&",
"(",
"edit... | Returns the value that has to be set for the dynamic attribute.
@param file the file where the current content is stored
@param value the content value that is represented by the attribute
@param attributeName the attribute's name
@param editedLocalEntity the entities that where edited last
@return the value that has ... | [
"Returns",
"the",
"value",
"that",
"has",
"to",
"be",
"set",
"for",
"the",
"dynamic",
"attribute",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/contenteditor/CmsContentService.java#L1784-L1829 | train |
alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelYearlyController.java | CmsPatternPanelYearlyController.setMonth | public void setMonth(String monthStr) {
final Month month = Month.valueOf(monthStr);
if ((m_model.getMonth() == null) || !m_model.getMonth().equals(monthStr)) {
removeExceptionsOnChange(new Command() {
public void execute() {
m_model.setMonth(month);
... | java | public void setMonth(String monthStr) {
final Month month = Month.valueOf(monthStr);
if ((m_model.getMonth() == null) || !m_model.getMonth().equals(monthStr)) {
removeExceptionsOnChange(new Command() {
public void execute() {
m_model.setMonth(month);
... | [
"public",
"void",
"setMonth",
"(",
"String",
"monthStr",
")",
"{",
"final",
"Month",
"month",
"=",
"Month",
".",
"valueOf",
"(",
"monthStr",
")",
";",
"if",
"(",
"(",
"m_model",
".",
"getMonth",
"(",
")",
"==",
"null",
")",
"||",
"!",
"m_model",
".",... | Set the month.
@param monthStr the month to set. | [
"Set",
"the",
"month",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelYearlyController.java#L65-L79 | train |
alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelYearlyController.java | CmsPatternPanelYearlyController.setPatternScheme | public void setPatternScheme(final boolean isWeekDayBased) {
if (isWeekDayBased ^ (null != m_model.getWeekDay())) {
removeExceptionsOnChange(new Command() {
public void execute() {
if (isWeekDayBased) {
m_model.setWeekDay(getPatternDefau... | java | public void setPatternScheme(final boolean isWeekDayBased) {
if (isWeekDayBased ^ (null != m_model.getWeekDay())) {
removeExceptionsOnChange(new Command() {
public void execute() {
if (isWeekDayBased) {
m_model.setWeekDay(getPatternDefau... | [
"public",
"void",
"setPatternScheme",
"(",
"final",
"boolean",
"isWeekDayBased",
")",
"{",
"if",
"(",
"isWeekDayBased",
"^",
"(",
"null",
"!=",
"m_model",
".",
"getWeekDay",
"(",
")",
")",
")",
"{",
"removeExceptionsOnChange",
"(",
"new",
"Command",
"(",
")"... | Set the pattern scheme.
@param isWeekDayBased flag, indicating if the week day based scheme should be set. | [
"Set",
"the",
"pattern",
"scheme",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelYearlyController.java#L85-L106 | train |
alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelYearlyController.java | CmsPatternPanelYearlyController.setWeekDay | public void setWeekDay(String weekDayStr) {
final WeekDay weekDay = WeekDay.valueOf(weekDayStr);
if ((m_model.getWeekDay() != null) || !m_model.getWeekDay().equals(weekDay)) {
removeExceptionsOnChange(new Command() {
public void execute() {
m_model.setW... | java | public void setWeekDay(String weekDayStr) {
final WeekDay weekDay = WeekDay.valueOf(weekDayStr);
if ((m_model.getWeekDay() != null) || !m_model.getWeekDay().equals(weekDay)) {
removeExceptionsOnChange(new Command() {
public void execute() {
m_model.setW... | [
"public",
"void",
"setWeekDay",
"(",
"String",
"weekDayStr",
")",
"{",
"final",
"WeekDay",
"weekDay",
"=",
"WeekDay",
".",
"valueOf",
"(",
"weekDayStr",
")",
";",
"if",
"(",
"(",
"m_model",
".",
"getWeekDay",
"(",
")",
"!=",
"null",
")",
"||",
"!",
"m_... | Set the week day.
@param weekDayStr the week day to set. | [
"Set",
"the",
"week",
"day",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelYearlyController.java#L112-L127 | train |
alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelYearlyController.java | CmsPatternPanelYearlyController.setWeekOfMonth | public void setWeekOfMonth(String weekOfMonthStr) {
final WeekOfMonth weekOfMonth = WeekOfMonth.valueOf(weekOfMonthStr);
if ((null == m_model.getWeekOfMonth()) || !m_model.getWeekOfMonth().equals(weekOfMonth)) {
removeExceptionsOnChange(new Command() {
public void execute()... | java | public void setWeekOfMonth(String weekOfMonthStr) {
final WeekOfMonth weekOfMonth = WeekOfMonth.valueOf(weekOfMonthStr);
if ((null == m_model.getWeekOfMonth()) || !m_model.getWeekOfMonth().equals(weekOfMonth)) {
removeExceptionsOnChange(new Command() {
public void execute()... | [
"public",
"void",
"setWeekOfMonth",
"(",
"String",
"weekOfMonthStr",
")",
"{",
"final",
"WeekOfMonth",
"weekOfMonth",
"=",
"WeekOfMonth",
".",
"valueOf",
"(",
"weekOfMonthStr",
")",
";",
"if",
"(",
"(",
"null",
"==",
"m_model",
".",
"getWeekOfMonth",
"(",
")",... | Set the week of month.
@param weekOfMonthStr the week of month to set. | [
"Set",
"the",
"week",
"of",
"month",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelYearlyController.java#L133-L147 | train |
alkacon/opencms-core | src/org/opencms/file/CmsProperty.java | CmsProperty.getLocalizedKey | public static String getLocalizedKey(Map<String, ?> propertiesMap, String key, Locale locale) {
List<String> localizedKeys = CmsLocaleManager.getLocaleVariants(key, locale, true, false);
for (String localizedKey : localizedKeys) {
if (propertiesMap.containsKey(localizedKey)) {
... | java | public static String getLocalizedKey(Map<String, ?> propertiesMap, String key, Locale locale) {
List<String> localizedKeys = CmsLocaleManager.getLocaleVariants(key, locale, true, false);
for (String localizedKey : localizedKeys) {
if (propertiesMap.containsKey(localizedKey)) {
... | [
"public",
"static",
"String",
"getLocalizedKey",
"(",
"Map",
"<",
"String",
",",
"?",
">",
"propertiesMap",
",",
"String",
"key",
",",
"Locale",
"locale",
")",
"{",
"List",
"<",
"String",
">",
"localizedKeys",
"=",
"CmsLocaleManager",
".",
"getLocaleVariants",... | Returns the key for the best matching local-specific property version.
@param propertiesMap the "raw" property map
@param key the name of the property to search for
@param locale the locale to search for
@return the key for the best matching local-specific property version. | [
"Returns",
"the",
"key",
"for",
"the",
"best",
"matching",
"local",
"-",
"specific",
"property",
"version",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsProperty.java#L328-L337 | train |
alkacon/opencms-core | src-modules/org/opencms/workplace/tools/searchindex/CmsFieldsList.java | CmsFieldsList.getFields | private List<CmsSearchField> getFields() {
CmsSearchManager manager = OpenCms.getSearchManager();
I_CmsSearchFieldConfiguration fieldConfig = manager.getFieldConfiguration(getParamFieldconfiguration());
List<CmsSearchField> result;
if (fieldConfig != null) {
result = fieldCo... | java | private List<CmsSearchField> getFields() {
CmsSearchManager manager = OpenCms.getSearchManager();
I_CmsSearchFieldConfiguration fieldConfig = manager.getFieldConfiguration(getParamFieldconfiguration());
List<CmsSearchField> result;
if (fieldConfig != null) {
result = fieldCo... | [
"private",
"List",
"<",
"CmsSearchField",
">",
"getFields",
"(",
")",
"{",
"CmsSearchManager",
"manager",
"=",
"OpenCms",
".",
"getSearchManager",
"(",
")",
";",
"I_CmsSearchFieldConfiguration",
"fieldConfig",
"=",
"manager",
".",
"getFieldConfiguration",
"(",
"getP... | Returns the configured fields of the current field configuration.
@return the configured fields of the current field configuration | [
"Returns",
"the",
"configured",
"fields",
"of",
"the",
"current",
"field",
"configuration",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/searchindex/CmsFieldsList.java#L720-L737 | train |
alkacon/opencms-core | src/org/opencms/ade/containerpage/CmsElementUtil.java | CmsElementUtil.createStringTemplateSource | public static Function<String, String> createStringTemplateSource(
I_CmsFormatterBean formatter,
Supplier<CmsXmlContent> contentSupplier) {
return key -> {
String result = null;
if (formatter != null) {
result = formatter.getAttributes().get(key);
... | java | public static Function<String, String> createStringTemplateSource(
I_CmsFormatterBean formatter,
Supplier<CmsXmlContent> contentSupplier) {
return key -> {
String result = null;
if (formatter != null) {
result = formatter.getAttributes().get(key);
... | [
"public",
"static",
"Function",
"<",
"String",
",",
"String",
">",
"createStringTemplateSource",
"(",
"I_CmsFormatterBean",
"formatter",
",",
"Supplier",
"<",
"CmsXmlContent",
">",
"contentSupplier",
")",
"{",
"return",
"key",
"->",
"{",
"String",
"result",
"=",
... | Helper method to create a string template source for a given formatter and content.
@param formatter the formatter
@param contentSupplier the content supplier
@return the string template provider | [
"Helper",
"method",
"to",
"create",
"a",
"string",
"template",
"source",
"for",
"a",
"given",
"formatter",
"and",
"content",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/containerpage/CmsElementUtil.java#L297-L314 | train |
alkacon/opencms-core | src/org/opencms/ade/containerpage/CmsElementUtil.java | CmsElementUtil.getContentsByContainerName | private Map<String, String> getContentsByContainerName(
CmsContainerElementBean element,
Collection<CmsContainer> containers) {
CmsFormatterConfiguration configs = getFormatterConfiguration(element.getResource());
Map<String, String> result = new HashMap<String, String>();
for (... | java | private Map<String, String> getContentsByContainerName(
CmsContainerElementBean element,
Collection<CmsContainer> containers) {
CmsFormatterConfiguration configs = getFormatterConfiguration(element.getResource());
Map<String, String> result = new HashMap<String, String>();
for (... | [
"private",
"Map",
"<",
"String",
",",
"String",
">",
"getContentsByContainerName",
"(",
"CmsContainerElementBean",
"element",
",",
"Collection",
"<",
"CmsContainer",
">",
"containers",
")",
"{",
"CmsFormatterConfiguration",
"configs",
"=",
"getFormatterConfiguration",
"... | Returns the rendered element content for all the given containers.
@param element the element to render
@param containers the containers the element appears in
@return a map from container names to rendered page contents | [
"Returns",
"the",
"rendered",
"element",
"content",
"for",
"all",
"the",
"given",
"containers",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/containerpage/CmsElementUtil.java#L1007-L1021 | train |
alkacon/opencms-core | src-setup/org/opencms/setup/ui/CmsSetupStep03Database.java | CmsSetupStep03Database.setWorkConnection | public void setWorkConnection(CmsSetupDb db) {
db.setConnection(
m_setupBean.getDbDriver(),
m_setupBean.getDbWorkConStr(),
m_setupBean.getDbConStrParams(),
m_setupBean.getDbWorkUser(),
m_setupBean.getDbWorkPwd());
} | java | public void setWorkConnection(CmsSetupDb db) {
db.setConnection(
m_setupBean.getDbDriver(),
m_setupBean.getDbWorkConStr(),
m_setupBean.getDbConStrParams(),
m_setupBean.getDbWorkUser(),
m_setupBean.getDbWorkPwd());
} | [
"public",
"void",
"setWorkConnection",
"(",
"CmsSetupDb",
"db",
")",
"{",
"db",
".",
"setConnection",
"(",
"m_setupBean",
".",
"getDbDriver",
"(",
")",
",",
"m_setupBean",
".",
"getDbWorkConStr",
"(",
")",
",",
"m_setupBean",
".",
"getDbConStrParams",
"(",
")"... | Set work connection.
@param db the db setup bean | [
"Set",
"work",
"connection",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/ui/CmsSetupStep03Database.java#L297-L305 | train |
alkacon/opencms-core | src-setup/org/opencms/setup/ui/CmsSetupStep03Database.java | CmsSetupStep03Database.updateDb | private void updateDb(String dbName, String webapp) {
m_mainLayout.removeAllComponents();
m_setupBean.setDatabase(dbName);
CmsDbSettingsPanel panel = new CmsDbSettingsPanel(m_setupBean);
m_panel[0] = panel;
panel.initFromSetupBean(webapp);
m_mainLayout.addComponent(panel... | java | private void updateDb(String dbName, String webapp) {
m_mainLayout.removeAllComponents();
m_setupBean.setDatabase(dbName);
CmsDbSettingsPanel panel = new CmsDbSettingsPanel(m_setupBean);
m_panel[0] = panel;
panel.initFromSetupBean(webapp);
m_mainLayout.addComponent(panel... | [
"private",
"void",
"updateDb",
"(",
"String",
"dbName",
",",
"String",
"webapp",
")",
"{",
"m_mainLayout",
".",
"removeAllComponents",
"(",
")",
";",
"m_setupBean",
".",
"setDatabase",
"(",
"dbName",
")",
";",
"CmsDbSettingsPanel",
"panel",
"=",
"new",
"CmsDbS... | Switches DB type.
@param dbName the database type
@param webapp the webapp name | [
"Switches",
"DB",
"type",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/ui/CmsSetupStep03Database.java#L334-L342 | train |
alkacon/opencms-core | src/org/opencms/search/solr/CmsSolrQuery.java | CmsSolrQuery.removeExpiration | public void removeExpiration() {
if (getFilterQueries() != null) {
for (String fq : getFilterQueries()) {
if (fq.startsWith(CmsSearchField.FIELD_DATE_EXPIRED + ":")
|| fq.startsWith(CmsSearchField.FIELD_DATE_RELEASED + ":")) {
removeFilterQuer... | java | public void removeExpiration() {
if (getFilterQueries() != null) {
for (String fq : getFilterQueries()) {
if (fq.startsWith(CmsSearchField.FIELD_DATE_EXPIRED + ":")
|| fq.startsWith(CmsSearchField.FIELD_DATE_RELEASED + ":")) {
removeFilterQuer... | [
"public",
"void",
"removeExpiration",
"(",
")",
"{",
"if",
"(",
"getFilterQueries",
"(",
")",
"!=",
"null",
")",
"{",
"for",
"(",
"String",
"fq",
":",
"getFilterQueries",
"(",
")",
")",
"{",
"if",
"(",
"fq",
".",
"startsWith",
"(",
"CmsSearchField",
".... | Removes the expiration flag. | [
"Removes",
"the",
"expiration",
"flag",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/CmsSolrQuery.java#L272-L283 | train |
alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspStandardContextBean.java | CmsJspStandardContextBean.getReadAllSubCategories | public Map<String, CmsJspCategoryAccessBean> getReadAllSubCategories() {
if (null == m_allSubCategories) {
m_allSubCategories = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
@Override
public Object transform(Object categoryPath) {
... | java | public Map<String, CmsJspCategoryAccessBean> getReadAllSubCategories() {
if (null == m_allSubCategories) {
m_allSubCategories = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
@Override
public Object transform(Object categoryPath) {
... | [
"public",
"Map",
"<",
"String",
",",
"CmsJspCategoryAccessBean",
">",
"getReadAllSubCategories",
"(",
")",
"{",
"if",
"(",
"null",
"==",
"m_allSubCategories",
")",
"{",
"m_allSubCategories",
"=",
"CmsCollectionsGenericWrapper",
".",
"createLazyMap",
"(",
"new",
"Tra... | Reads all sub-categories below the provided category.
@return The map from the provided category to it's sub-categories in a {@link CmsJspCategoryAccessBean}. | [
"Reads",
"all",
"sub",
"-",
"categories",
"below",
"the",
"provided",
"category",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspStandardContextBean.java#L1409-L1437 | train |
alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspStandardContextBean.java | CmsJspStandardContextBean.getReadCategory | public Map<String, CmsCategory> getReadCategory() {
if (null == m_categories) {
m_categories = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
public Object transform(Object categoryPath) {
try {
CmsCategoryService catServ... | java | public Map<String, CmsCategory> getReadCategory() {
if (null == m_categories) {
m_categories = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
public Object transform(Object categoryPath) {
try {
CmsCategoryService catServ... | [
"public",
"Map",
"<",
"String",
",",
"CmsCategory",
">",
"getReadCategory",
"(",
")",
"{",
"if",
"(",
"null",
"==",
"m_categories",
")",
"{",
"m_categories",
"=",
"CmsCollectionsGenericWrapper",
".",
"createLazyMap",
"(",
"new",
"Transformer",
"(",
")",
"{",
... | Transforms the category path of a category to the category.
@return a map from root or site path to category. | [
"Transforms",
"the",
"category",
"path",
"of",
"a",
"category",
"to",
"the",
"category",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspStandardContextBean.java#L1452-L1474 | train |
alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspStandardContextBean.java | CmsJspStandardContextBean.getReadResourceCategories | public Map<String, CmsJspCategoryAccessBean> getReadResourceCategories() {
if (null == m_resourceCategories) {
m_resourceCategories = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
public Object transform(Object resourceName) {
try {
... | java | public Map<String, CmsJspCategoryAccessBean> getReadResourceCategories() {
if (null == m_resourceCategories) {
m_resourceCategories = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
public Object transform(Object resourceName) {
try {
... | [
"public",
"Map",
"<",
"String",
",",
"CmsJspCategoryAccessBean",
">",
"getReadResourceCategories",
"(",
")",
"{",
"if",
"(",
"null",
"==",
"m_resourceCategories",
")",
"{",
"m_resourceCategories",
"=",
"CmsCollectionsGenericWrapper",
".",
"createLazyMap",
"(",
"new",
... | Reads the categories assigned to a resource.
@return map from the resource path (root path) to the assigned categories | [
"Reads",
"the",
"categories",
"assigned",
"to",
"a",
"resource",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspStandardContextBean.java#L1528-L1547 | train |
alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspStandardContextBean.java | CmsJspStandardContextBean.getSitePath | public Map<String, String> getSitePath() {
if (m_sitePaths == null) {
m_sitePaths = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
public Object transform(Object rootPath) {
if (rootPath instanceof String) {
return getReq... | java | public Map<String, String> getSitePath() {
if (m_sitePaths == null) {
m_sitePaths = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
public Object transform(Object rootPath) {
if (rootPath instanceof String) {
return getReq... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getSitePath",
"(",
")",
"{",
"if",
"(",
"m_sitePaths",
"==",
"null",
")",
"{",
"m_sitePaths",
"=",
"CmsCollectionsGenericWrapper",
".",
"createLazyMap",
"(",
"new",
"Transformer",
"(",
")",
"{",
"public",
... | Transforms root paths to site paths.
@return lazy map from root paths to site paths.
@see CmsRequestContext#removeSiteRoot(String) | [
"Transforms",
"root",
"paths",
"to",
"site",
"paths",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspStandardContextBean.java#L1591-L1606 | train |
alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspStandardContextBean.java | CmsJspStandardContextBean.getTitleLocale | public Map<String, String> getTitleLocale() {
if (m_localeTitles == null) {
m_localeTitles = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
public Object transform(Object inputLocale) {
Locale locale = null;
if (null != input... | java | public Map<String, String> getTitleLocale() {
if (m_localeTitles == null) {
m_localeTitles = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
public Object transform(Object inputLocale) {
Locale locale = null;
if (null != input... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getTitleLocale",
"(",
")",
"{",
"if",
"(",
"m_localeTitles",
"==",
"null",
")",
"{",
"m_localeTitles",
"=",
"CmsCollectionsGenericWrapper",
".",
"createLazyMap",
"(",
"new",
"Transformer",
"(",
")",
"{",
"... | Get the title and read the Title property according the provided locale.
@return The map from locales to the locale specific titles. | [
"Get",
"the",
"title",
"and",
"read",
"the",
"Title",
"property",
"according",
"the",
"provided",
"locale",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspStandardContextBean.java#L1661-L1686 | train |
alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspStandardContextBean.java | CmsJspStandardContextBean.getLocaleSpecificTitle | protected String getLocaleSpecificTitle(Locale locale) {
String result = null;
try {
if (isDetailRequest()) {
// this is a request to a detail page
CmsResource res = getDetailContent();
CmsFile file = m_cms.readFile(res);
Cms... | java | protected String getLocaleSpecificTitle(Locale locale) {
String result = null;
try {
if (isDetailRequest()) {
// this is a request to a detail page
CmsResource res = getDetailContent();
CmsFile file = m_cms.readFile(res);
Cms... | [
"protected",
"String",
"getLocaleSpecificTitle",
"(",
"Locale",
"locale",
")",
"{",
"String",
"result",
"=",
"null",
";",
"try",
"{",
"if",
"(",
"isDetailRequest",
"(",
")",
")",
"{",
"// this is a request to a detail page",
"CmsResource",
"res",
"=",
"getDetailCo... | Returns the title according to the given locale.
@param locale the locale for which the title should be read.
@return the title according to the given locale | [
"Returns",
"the",
"title",
"according",
"to",
"the",
"given",
"locale",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspStandardContextBean.java#L2010-L2048 | train |
alkacon/opencms-core | src-gwt/org/opencms/gwt/client/ui/input/location/CmsLocationController.java | CmsLocationController.setStringValue | public void setStringValue(String value) {
if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
try {
m_editValue = CmsLocationValue.parse(value);
m_currentValue = m_editValue.cloneValue();
displayValue();
if ((m_popup != null) && m_... | java | public void setStringValue(String value) {
if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
try {
m_editValue = CmsLocationValue.parse(value);
m_currentValue = m_editValue.cloneValue();
displayValue();
if ((m_popup != null) && m_... | [
"public",
"void",
"setStringValue",
"(",
"String",
"value",
")",
"{",
"if",
"(",
"CmsStringUtil",
".",
"isNotEmptyOrWhitespaceOnly",
"(",
"value",
")",
")",
"{",
"try",
"{",
"m_editValue",
"=",
"CmsLocationValue",
".",
"parse",
"(",
"value",
")",
";",
"m_cur... | Sets the location value as string.
@param value the string representation of the location value (JSON) | [
"Sets",
"the",
"location",
"value",
"as",
"string",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/location/CmsLocationController.java#L235-L253 | train |
alkacon/opencms-core | src/org/opencms/jlan/CmsJlanUsers.java | CmsJlanUsers.hashPassword | public static byte[] hashPassword(String password) throws InvalidKeyException, NoSuchAlgorithmException {
PasswordEncryptor encryptor = new PasswordEncryptor();
return encryptor.generateEncryptedPassword(password, null, PasswordEncryptor.MD4, null, null);
} | java | public static byte[] hashPassword(String password) throws InvalidKeyException, NoSuchAlgorithmException {
PasswordEncryptor encryptor = new PasswordEncryptor();
return encryptor.generateEncryptedPassword(password, null, PasswordEncryptor.MD4, null, null);
} | [
"public",
"static",
"byte",
"[",
"]",
"hashPassword",
"(",
"String",
"password",
")",
"throws",
"InvalidKeyException",
",",
"NoSuchAlgorithmException",
"{",
"PasswordEncryptor",
"encryptor",
"=",
"new",
"PasswordEncryptor",
"(",
")",
";",
"return",
"encryptor",
".",... | Computes an MD4 hash for the password.
@param password the password for which to compute the hash
@throws NoSuchAlgorithmException
@throws InvalidKeyException
@return the password hash | [
"Computes",
"an",
"MD4",
"hash",
"for",
"the",
"password",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jlan/CmsJlanUsers.java#L81-L85 | train |
alkacon/opencms-core | src-gwt/org/opencms/gwt/client/super_src/com/google/gwt/http/client/RequestBuilder.java | RequestBuilder.setHeader | public void setHeader(String header, String value) {
StringValidator.throwIfEmptyOrNull("header", header);
StringValidator.throwIfEmptyOrNull("value", value);
if (headers == null) {
headers = new HashMap<String, String>();
}
headers.put(header, value);
} | java | public void setHeader(String header, String value) {
StringValidator.throwIfEmptyOrNull("header", header);
StringValidator.throwIfEmptyOrNull("value", value);
if (headers == null) {
headers = new HashMap<String, String>();
}
headers.put(header, value);
} | [
"public",
"void",
"setHeader",
"(",
"String",
"header",
",",
"String",
"value",
")",
"{",
"StringValidator",
".",
"throwIfEmptyOrNull",
"(",
"\"header\"",
",",
"header",
")",
";",
"StringValidator",
".",
"throwIfEmptyOrNull",
"(",
"\"value\"",
",",
"value",
")",... | Sets a request header with the given name and value. If a header with the
specified name has already been set then the new value overwrites the
current value.
@param header the name of the header
@param value the value of the header
@throws NullPointerException if header or value are null
@throws IllegalArgumentExcep... | [
"Sets",
"a",
"request",
"header",
"with",
"the",
"given",
"name",
"and",
"value",
".",
"If",
"a",
"header",
"with",
"the",
"specified",
"name",
"has",
"already",
"been",
"set",
"then",
"the",
"new",
"value",
"overwrites",
"the",
"current",
"value",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/super_src/com/google/gwt/http/client/RequestBuilder.java#L283-L292 | train |
alkacon/opencms-core | src/org/opencms/db/CmsPublishList.java | CmsPublishList.getTopFolders | protected List<CmsResource> getTopFolders(List<CmsResource> folders) {
List<String> folderPaths = new ArrayList<String>();
List<CmsResource> topFolders = new ArrayList<CmsResource>();
Map<String, CmsResource> foldersByPath = new HashMap<String, CmsResource>();
for (CmsResource folder : ... | java | protected List<CmsResource> getTopFolders(List<CmsResource> folders) {
List<String> folderPaths = new ArrayList<String>();
List<CmsResource> topFolders = new ArrayList<CmsResource>();
Map<String, CmsResource> foldersByPath = new HashMap<String, CmsResource>();
for (CmsResource folder : ... | [
"protected",
"List",
"<",
"CmsResource",
">",
"getTopFolders",
"(",
"List",
"<",
"CmsResource",
">",
"folders",
")",
"{",
"List",
"<",
"String",
">",
"folderPaths",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"List",
"<",
"CmsResource",
"... | Gives the "roots" of a list of folders, i.e. the list of folders which are not descendants of any other folders in the original list
@param folders the original list of folders
@return the root folders of the list | [
"Gives",
"the",
"roots",
"of",
"a",
"list",
"of",
"folders",
"i",
".",
"e",
".",
"the",
"list",
"of",
"folders",
"which",
"are",
"not",
"descendants",
"of",
"any",
"other",
"folders",
"in",
"the",
"original",
"list"
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsPublishList.java#L698-L722 | train |
alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelIndividualController.java | CmsPatternPanelIndividualController.setDates | public void setDates(SortedSet<Date> dates) {
if (!m_model.getIndividualDates().equals(dates)) {
m_model.setIndividualDates(dates);
onValueChange();
}
} | java | public void setDates(SortedSet<Date> dates) {
if (!m_model.getIndividualDates().equals(dates)) {
m_model.setIndividualDates(dates);
onValueChange();
}
} | [
"public",
"void",
"setDates",
"(",
"SortedSet",
"<",
"Date",
">",
"dates",
")",
"{",
"if",
"(",
"!",
"m_model",
".",
"getIndividualDates",
"(",
")",
".",
"equals",
"(",
"dates",
")",
")",
"{",
"m_model",
".",
"setIndividualDates",
"(",
"dates",
")",
";... | Set the individual dates.
@param dates the dates to set. | [
"Set",
"the",
"individual",
"dates",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelIndividualController.java#L62-L69 | train |
alkacon/opencms-core | src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java | CmsSolrSpellchecker.getInstance | public static CmsSolrSpellchecker getInstance(CoreContainer container) {
if (null == instance) {
synchronized (CmsSolrSpellchecker.class) {
if (null == instance) {
@SuppressWarnings("resource")
SolrCore spellcheckCore = container.getCore(CmsSo... | java | public static CmsSolrSpellchecker getInstance(CoreContainer container) {
if (null == instance) {
synchronized (CmsSolrSpellchecker.class) {
if (null == instance) {
@SuppressWarnings("resource")
SolrCore spellcheckCore = container.getCore(CmsSo... | [
"public",
"static",
"CmsSolrSpellchecker",
"getInstance",
"(",
"CoreContainer",
"container",
")",
"{",
"if",
"(",
"null",
"==",
"instance",
")",
"{",
"synchronized",
"(",
"CmsSolrSpellchecker",
".",
"class",
")",
"{",
"if",
"(",
"null",
"==",
"instance",
")",
... | Return an instance of this class.
@param container Solr CoreContainer container object in order to create a server object.
@return instance of CmsSolrSpellchecker | [
"Return",
"an",
"instance",
"of",
"this",
"class",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L155-L175 | train |
alkacon/opencms-core | src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java | CmsSolrSpellchecker.getSpellcheckingResult | public void getSpellcheckingResult(
final HttpServletResponse res,
final ServletRequest servletRequest,
final CmsObject cms)
throws CmsPermissionViolationException, IOException {
// Perform a permission check
performPermissionCheck(cms);
// Set the appropriate respo... | java | public void getSpellcheckingResult(
final HttpServletResponse res,
final ServletRequest servletRequest,
final CmsObject cms)
throws CmsPermissionViolationException, IOException {
// Perform a permission check
performPermissionCheck(cms);
// Set the appropriate respo... | [
"public",
"void",
"getSpellcheckingResult",
"(",
"final",
"HttpServletResponse",
"res",
",",
"final",
"ServletRequest",
"servletRequest",
",",
"final",
"CmsObject",
"cms",
")",
"throws",
"CmsPermissionViolationException",
",",
"IOException",
"{",
"// Perform a permission ch... | Performs spellchecking using Solr and returns the spellchecking results using JSON.
@param res The HttpServletResponse object.
@param servletRequest The ServletRequest object.
@param cms The CmsObject object.
@throws CmsPermissionViolationException in case of the anonymous guest user
@throws IOException if writing th... | [
"Performs",
"spellchecking",
"using",
"Solr",
"and",
"returns",
"the",
"spellchecking",
"results",
"using",
"JSON",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L187-L228 | train |
alkacon/opencms-core | src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java | CmsSolrSpellchecker.parseAndAddDictionaries | public void parseAndAddDictionaries(CmsObject cms) throws CmsRoleViolationException {
OpenCms.getRoleManager().checkRole(cms, CmsRole.ROOT_ADMIN);
CmsSpellcheckDictionaryIndexer.parseAndAddZippedDictionaries(m_solrClient, cms);
CmsSpellcheckDictionaryIndexer.parseAndAddDictionaries(m_solrClient... | java | public void parseAndAddDictionaries(CmsObject cms) throws CmsRoleViolationException {
OpenCms.getRoleManager().checkRole(cms, CmsRole.ROOT_ADMIN);
CmsSpellcheckDictionaryIndexer.parseAndAddZippedDictionaries(m_solrClient, cms);
CmsSpellcheckDictionaryIndexer.parseAndAddDictionaries(m_solrClient... | [
"public",
"void",
"parseAndAddDictionaries",
"(",
"CmsObject",
"cms",
")",
"throws",
"CmsRoleViolationException",
"{",
"OpenCms",
".",
"getRoleManager",
"(",
")",
".",
"checkRole",
"(",
"cms",
",",
"CmsRole",
".",
"ROOT_ADMIN",
")",
";",
"CmsSpellcheckDictionaryInde... | Parses and adds dictionaries to the Solr index.
@param cms the OpenCms object.
@throws CmsRoleViolationException in case the user does not have the required role ROOT_ADMIN | [
"Parses",
"and",
"adds",
"dictionaries",
"to",
"the",
"Solr",
"index",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L237-L242 | train |
alkacon/opencms-core | src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java | CmsSolrSpellchecker.getConvertedResponseAsJson | private JSONObject getConvertedResponseAsJson(SpellCheckResponse response) {
if (null == response) {
return null;
}
final JSONObject suggestions = new JSONObject();
final Map<String, Suggestion> solrSuggestions = response.getSuggestionMap();
// Add suggestions to t... | java | private JSONObject getConvertedResponseAsJson(SpellCheckResponse response) {
if (null == response) {
return null;
}
final JSONObject suggestions = new JSONObject();
final Map<String, Suggestion> solrSuggestions = response.getSuggestionMap();
// Add suggestions to t... | [
"private",
"JSONObject",
"getConvertedResponseAsJson",
"(",
"SpellCheckResponse",
"response",
")",
"{",
"if",
"(",
"null",
"==",
"response",
")",
"{",
"return",
"null",
";",
"}",
"final",
"JSONObject",
"suggestions",
"=",
"new",
"JSONObject",
"(",
")",
";",
"f... | Converts the suggestions from the Solrj format to JSON format.
@param response The SpellCheckResponse object containing the spellcheck results.
@return The spellcheck suggestions as JSON object or null if something goes wrong. | [
"Converts",
"the",
"suggestions",
"from",
"the",
"Solrj",
"format",
"to",
"JSON",
"format",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L250-L286 | train |
alkacon/opencms-core | src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java | CmsSolrSpellchecker.getJsonFormattedSpellcheckResult | private JSONObject getJsonFormattedSpellcheckResult(CmsSpellcheckingRequest request) {
final JSONObject response = new JSONObject();
try {
if (null != request.m_id) {
response.put(JSON_ID, request.m_id);
}
response.put(JSON_RESULT, request.m_wordSug... | java | private JSONObject getJsonFormattedSpellcheckResult(CmsSpellcheckingRequest request) {
final JSONObject response = new JSONObject();
try {
if (null != request.m_id) {
response.put(JSON_ID, request.m_id);
}
response.put(JSON_RESULT, request.m_wordSug... | [
"private",
"JSONObject",
"getJsonFormattedSpellcheckResult",
"(",
"CmsSpellcheckingRequest",
"request",
")",
"{",
"final",
"JSONObject",
"response",
"=",
"new",
"JSONObject",
"(",
")",
";",
"try",
"{",
"if",
"(",
"null",
"!=",
"request",
".",
"m_id",
")",
"{",
... | Returns the result of the performed spellcheck formatted in JSON.
@param request The CmsSpellcheckingRequest.
@return JSONObject that contains the result of the performed spellcheck. | [
"Returns",
"the",
"result",
"of",
"the",
"performed",
"spellcheck",
"formatted",
"in",
"JSON",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L294-L315 | train |
alkacon/opencms-core | src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java | CmsSolrSpellchecker.getRequestBody | private String getRequestBody(ServletRequest request) throws IOException {
final StringBuilder sb = new StringBuilder();
String line = request.getReader().readLine();
while (null != line) {
sb.append(line);
line = request.getReader().readLine();
}
retur... | java | private String getRequestBody(ServletRequest request) throws IOException {
final StringBuilder sb = new StringBuilder();
String line = request.getReader().readLine();
while (null != line) {
sb.append(line);
line = request.getReader().readLine();
}
retur... | [
"private",
"String",
"getRequestBody",
"(",
"ServletRequest",
"request",
")",
"throws",
"IOException",
"{",
"final",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"String",
"line",
"=",
"request",
".",
"getReader",
"(",
")",
".",
"readLine... | Returns the body of the request. This method is used to read posted JSON data.
@param request The request.
@return String representation of the request's body.
@throws IOException in case reading the request fails | [
"Returns",
"the",
"body",
"of",
"the",
"request",
".",
"This",
"method",
"is",
"used",
"to",
"read",
"posted",
"JSON",
"data",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L326-L337 | train |
alkacon/opencms-core | src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java | CmsSolrSpellchecker.parseHttpRequest | private CmsSpellcheckingRequest parseHttpRequest(final ServletRequest req, final CmsObject cms) {
if ((null != cms) && OpenCms.getRoleManager().hasRole(cms, CmsRole.ROOT_ADMIN)) {
try {
if (null != req.getParameter(HTTP_PARAMETER_CHECKREBUILD)) {
if (CmsSpellchec... | java | private CmsSpellcheckingRequest parseHttpRequest(final ServletRequest req, final CmsObject cms) {
if ((null != cms) && OpenCms.getRoleManager().hasRole(cms, CmsRole.ROOT_ADMIN)) {
try {
if (null != req.getParameter(HTTP_PARAMETER_CHECKREBUILD)) {
if (CmsSpellchec... | [
"private",
"CmsSpellcheckingRequest",
"parseHttpRequest",
"(",
"final",
"ServletRequest",
"req",
",",
"final",
"CmsObject",
"cms",
")",
"{",
"if",
"(",
"(",
"null",
"!=",
"cms",
")",
"&&",
"OpenCms",
".",
"getRoleManager",
"(",
")",
".",
"hasRole",
"(",
"cms... | Parse parameters from this request using HTTP.
@param req The ServletRequest containing all request parameters.
@param cms The OpenCms object.
@return CmsSpellcheckingRequest object that contains parsed parameters. | [
"Parse",
"parameters",
"from",
"this",
"request",
"using",
"HTTP",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L346-L390 | train |
alkacon/opencms-core | src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java | CmsSolrSpellchecker.parseJsonRequest | private CmsSpellcheckingRequest parseJsonRequest(JSONObject jsonRequest) {
final String id = jsonRequest.optString(JSON_ID);
final JSONObject params = jsonRequest.optJSONObject(JSON_PARAMS);
if (null == params) {
LOG.debug("Invalid JSON request: No field \"params\" defined. ");
... | java | private CmsSpellcheckingRequest parseJsonRequest(JSONObject jsonRequest) {
final String id = jsonRequest.optString(JSON_ID);
final JSONObject params = jsonRequest.optJSONObject(JSON_PARAMS);
if (null == params) {
LOG.debug("Invalid JSON request: No field \"params\" defined. ");
... | [
"private",
"CmsSpellcheckingRequest",
"parseJsonRequest",
"(",
"JSONObject",
"jsonRequest",
")",
"{",
"final",
"String",
"id",
"=",
"jsonRequest",
".",
"optString",
"(",
"JSON_ID",
")",
";",
"final",
"JSONObject",
"params",
"=",
"jsonRequest",
".",
"optJSONObject",
... | Parse JSON parameters from this request.
@param jsonRequest The request in the JSON format.
@return CmsSpellcheckingRequest object that contains parsed parameters or null, if JSON input is not well
defined. | [
"Parse",
"JSON",
"parameters",
"from",
"this",
"request",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L399-L428 | train |
alkacon/opencms-core | src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java | CmsSolrSpellchecker.performPermissionCheck | private void performPermissionCheck(CmsObject cms) throws CmsPermissionViolationException {
if (cms.getRequestContext().getCurrentUser().isGuestUser()) {
throw new CmsPermissionViolationException(null);
}
} | java | private void performPermissionCheck(CmsObject cms) throws CmsPermissionViolationException {
if (cms.getRequestContext().getCurrentUser().isGuestUser()) {
throw new CmsPermissionViolationException(null);
}
} | [
"private",
"void",
"performPermissionCheck",
"(",
"CmsObject",
"cms",
")",
"throws",
"CmsPermissionViolationException",
"{",
"if",
"(",
"cms",
".",
"getRequestContext",
"(",
")",
".",
"getCurrentUser",
"(",
")",
".",
"isGuestUser",
"(",
")",
")",
"{",
"throw",
... | Perform a security check against OpenCms.
@param cms The OpenCms object.
@throws CmsPermissionViolationException in case of the anonymous guest user | [
"Perform",
"a",
"security",
"check",
"against",
"OpenCms",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L437-L442 | train |
alkacon/opencms-core | src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java | CmsSolrSpellchecker.performSpellcheckQuery | private SpellCheckResponse performSpellcheckQuery(CmsSpellcheckingRequest request) {
if ((null == request) || !request.isInitialized()) {
return null;
}
final String[] wordsToCheck = request.m_wordsToCheck;
final ModifiableSolrParams params = new ModifiableSolrParams();
... | java | private SpellCheckResponse performSpellcheckQuery(CmsSpellcheckingRequest request) {
if ((null == request) || !request.isInitialized()) {
return null;
}
final String[] wordsToCheck = request.m_wordsToCheck;
final ModifiableSolrParams params = new ModifiableSolrParams();
... | [
"private",
"SpellCheckResponse",
"performSpellcheckQuery",
"(",
"CmsSpellcheckingRequest",
"request",
")",
"{",
"if",
"(",
"(",
"null",
"==",
"request",
")",
"||",
"!",
"request",
".",
"isInitialized",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"final",
... | Performs the actual spell check query using Solr.
@param request the spell check request
@return Results of the Solr spell check of type SpellCheckResponse or null if something goes wrong. | [
"Performs",
"the",
"actual",
"spell",
"check",
"query",
"using",
"Solr",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L451-L484 | train |
alkacon/opencms-core | src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java | CmsSolrSpellchecker.sendResponse | private void sendResponse(final HttpServletResponse res, final CmsSpellcheckingRequest request) throws IOException {
final PrintWriter pw = res.getWriter();
final JSONObject response = getJsonFormattedSpellcheckResult(request);
pw.println(response.toString());
pw.close();
} | java | private void sendResponse(final HttpServletResponse res, final CmsSpellcheckingRequest request) throws IOException {
final PrintWriter pw = res.getWriter();
final JSONObject response = getJsonFormattedSpellcheckResult(request);
pw.println(response.toString());
pw.close();
} | [
"private",
"void",
"sendResponse",
"(",
"final",
"HttpServletResponse",
"res",
",",
"final",
"CmsSpellcheckingRequest",
"request",
")",
"throws",
"IOException",
"{",
"final",
"PrintWriter",
"pw",
"=",
"res",
".",
"getWriter",
"(",
")",
";",
"final",
"JSONObject",
... | Sends the JSON-formatted spellchecking results to the client.
@param res The HttpServletResponse object.
@param request The spellchecking request object.
@throws IOException in case writing the response fails | [
"Sends",
"the",
"JSON",
"-",
"formatted",
"spellchecking",
"results",
"to",
"the",
"client",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L494-L500 | train |
alkacon/opencms-core | src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java | CmsSolrSpellchecker.setResponeHeaders | private void setResponeHeaders(HttpServletResponse response) {
response.setHeader("Cache-Control", "no-store, no-cache");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", System.currentTimeMillis());
response.setContentType("text/plain; charset=utf-8");
... | java | private void setResponeHeaders(HttpServletResponse response) {
response.setHeader("Cache-Control", "no-store, no-cache");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", System.currentTimeMillis());
response.setContentType("text/plain; charset=utf-8");
... | [
"private",
"void",
"setResponeHeaders",
"(",
"HttpServletResponse",
"response",
")",
"{",
"response",
".",
"setHeader",
"(",
"\"Cache-Control\"",
",",
"\"no-store, no-cache\"",
")",
";",
"response",
".",
"setHeader",
"(",
"\"Pragma\"",
",",
"\"no-cache\"",
")",
";",... | Sets the appropriate headers to response of this request.
@param response The HttpServletResponse response object. | [
"Sets",
"the",
"appropriate",
"headers",
"to",
"response",
"of",
"this",
"request",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L507-L514 | train |
alkacon/opencms-core | src/org/opencms/acacia/shared/CmsSerialDateUtil.java | CmsSerialDateUtil.toIntWithDefault | public static int toIntWithDefault(String value, int defaultValue) {
int result = defaultValue;
try {
result = Integer.parseInt(value);
} catch (@SuppressWarnings("unused") Exception e) {
// Do nothing, return default.
}
return result;
} | java | public static int toIntWithDefault(String value, int defaultValue) {
int result = defaultValue;
try {
result = Integer.parseInt(value);
} catch (@SuppressWarnings("unused") Exception e) {
// Do nothing, return default.
}
return result;
} | [
"public",
"static",
"int",
"toIntWithDefault",
"(",
"String",
"value",
",",
"int",
"defaultValue",
")",
"{",
"int",
"result",
"=",
"defaultValue",
";",
"try",
"{",
"result",
"=",
"Integer",
".",
"parseInt",
"(",
"value",
")",
";",
"}",
"catch",
"(",
"@",... | Parses int value and returns the provided default if the value can't be parsed.
@param value the int to parse.
@param defaultValue the default value.
@return the parsed int, or the default value if parsing fails. | [
"Parses",
"int",
"value",
"and",
"returns",
"the",
"provided",
"default",
"if",
"the",
"value",
"can",
"t",
"be",
"parsed",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/CmsSerialDateUtil.java#L48-L57 | train |
alkacon/opencms-core | src/org/opencms/search/solr/updateprocessors/CmsSolrCopyModifiedUpateProcessorFactory.java | CmsSolrCopyModifiedUpateProcessorFactory.init | @Override
public void init(NamedList args) {
Object regex = args.remove(PARAM_REGEX);
if (null == regex) {
throw new SolrException(ErrorCode.SERVER_ERROR, "Missing required init parameter: " + PARAM_REGEX);
}
try {
m_regex = Pattern.compile(regex.toString());... | java | @Override
public void init(NamedList args) {
Object regex = args.remove(PARAM_REGEX);
if (null == regex) {
throw new SolrException(ErrorCode.SERVER_ERROR, "Missing required init parameter: " + PARAM_REGEX);
}
try {
m_regex = Pattern.compile(regex.toString());... | [
"@",
"Override",
"public",
"void",
"init",
"(",
"NamedList",
"args",
")",
"{",
"Object",
"regex",
"=",
"args",
".",
"remove",
"(",
"PARAM_REGEX",
")",
";",
"if",
"(",
"null",
"==",
"regex",
")",
"{",
"throw",
"new",
"SolrException",
"(",
"ErrorCode",
"... | Read the parameters on initialization.
@see org.apache.solr.update.processor.UpdateRequestProcessorFactory#init(org.apache.solr.common.util.NamedList) | [
"Read",
"the",
"parameters",
"on",
"initialization",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/updateprocessors/CmsSolrCopyModifiedUpateProcessorFactory.java#L124-L155 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsSimpleSearchConfigurationParser.java | CmsSimpleSearchConfigurationParser.getDefaultReturnFields | String getDefaultReturnFields() {
StringBuffer fields = new StringBuffer("");
fields.append(CmsSearchField.FIELD_PATH);
fields.append(',');
fields.append(CmsSearchField.FIELD_INSTANCEDATE).append('_').append(getSearchLocale().toString()).append("_dt");
fields.append(',');
... | java | String getDefaultReturnFields() {
StringBuffer fields = new StringBuffer("");
fields.append(CmsSearchField.FIELD_PATH);
fields.append(',');
fields.append(CmsSearchField.FIELD_INSTANCEDATE).append('_').append(getSearchLocale().toString()).append("_dt");
fields.append(',');
... | [
"String",
"getDefaultReturnFields",
"(",
")",
"{",
"StringBuffer",
"fields",
"=",
"new",
"StringBuffer",
"(",
"\"\"",
")",
";",
"fields",
".",
"append",
"(",
"CmsSearchField",
".",
"FIELD_PATH",
")",
";",
"fields",
".",
"append",
"(",
"'",
"'",
")",
";",
... | The fields returned by default. Typically the output is done via display formatters and hence nearly no
field is necessary. Returning all fields might cause performance problems.
@return the default return fields. | [
"The",
"fields",
"returned",
"by",
"default",
".",
"Typically",
"the",
"output",
"is",
"done",
"via",
"display",
"formatters",
"and",
"hence",
"nearly",
"no",
"field",
"is",
"necessary",
".",
"Returning",
"all",
"fields",
"might",
"cause",
"performance",
"prob... | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsSimpleSearchConfigurationParser.java#L534-L555 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsSimpleSearchConfigurationParser.java | CmsSimpleSearchConfigurationParser.getDefaultFieldFacets | private Map<String, I_CmsSearchConfigurationFacetField> getDefaultFieldFacets(boolean categoryConjunction) {
Map<String, I_CmsSearchConfigurationFacetField> fieldFacets = new HashMap<String, I_CmsSearchConfigurationFacetField>();
fieldFacets.put(
CmsListManager.FIELD_CATEGORIES,
... | java | private Map<String, I_CmsSearchConfigurationFacetField> getDefaultFieldFacets(boolean categoryConjunction) {
Map<String, I_CmsSearchConfigurationFacetField> fieldFacets = new HashMap<String, I_CmsSearchConfigurationFacetField>();
fieldFacets.put(
CmsListManager.FIELD_CATEGORIES,
... | [
"private",
"Map",
"<",
"String",
",",
"I_CmsSearchConfigurationFacetField",
">",
"getDefaultFieldFacets",
"(",
"boolean",
"categoryConjunction",
")",
"{",
"Map",
"<",
"String",
",",
"I_CmsSearchConfigurationFacetField",
">",
"fieldFacets",
"=",
"new",
"HashMap",
"<",
... | The default field facets.
@param categoryConjunction flag, indicating if category selections in the facet should be "AND" combined.
@return the default field facets. | [
"The",
"default",
"field",
"facets",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsSimpleSearchConfigurationParser.java#L637-L670 | train |
alkacon/opencms-core | src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java | CmsDomUtil.stripHtml | public static String stripHtml(String html) {
if (html == null) {
return null;
}
Element el = DOM.createDiv();
el.setInnerHTML(html);
return el.getInnerText();
} | java | public static String stripHtml(String html) {
if (html == null) {
return null;
}
Element el = DOM.createDiv();
el.setInnerHTML(html);
return el.getInnerText();
} | [
"public",
"static",
"String",
"stripHtml",
"(",
"String",
"html",
")",
"{",
"if",
"(",
"html",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"Element",
"el",
"=",
"DOM",
".",
"createDiv",
"(",
")",
";",
"el",
".",
"setInnerHTML",
"(",
"html",
... | Returns the text content to any HTML.
@param html the HTML
@return the text content | [
"Returns",
"the",
"text",
"content",
"to",
"any",
"HTML",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java#L2081-L2089 | train |
alkacon/opencms-core | src/org/opencms/main/CmsShellCommands.java | CmsShellCommands.setUserInfo | public void setUserInfo(String username, String infoName, String value) throws CmsException {
CmsUser user = m_cms.readUser(username);
user.setAdditionalInfo(infoName, value);
m_cms.writeUser(user);
} | java | public void setUserInfo(String username, String infoName, String value) throws CmsException {
CmsUser user = m_cms.readUser(username);
user.setAdditionalInfo(infoName, value);
m_cms.writeUser(user);
} | [
"public",
"void",
"setUserInfo",
"(",
"String",
"username",
",",
"String",
"infoName",
",",
"String",
"value",
")",
"throws",
"CmsException",
"{",
"CmsUser",
"user",
"=",
"m_cms",
".",
"readUser",
"(",
"username",
")",
";",
"user",
".",
"setAdditionalInfo",
... | Sets a string-valued additional info entry on the user.
@param username the name of the user
@param infoName the additional info key
@param value the additional info value
@throws CmsException if something goes wrong | [
"Sets",
"a",
"string",
"-",
"valued",
"additional",
"info",
"entry",
"on",
"the",
"user",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsShellCommands.java#L1589-L1594 | train |
alkacon/opencms-core | src-modules/org/opencms/workplace/commons/CmsPreferences.java | CmsPreferences.setTimewarpInt | public void setTimewarpInt(String timewarp) {
try {
m_userSettings.setTimeWarp(Long.valueOf(timewarp).longValue());
} catch (Exception e) {
m_userSettings.setTimeWarp(-1);
}
} | java | public void setTimewarpInt(String timewarp) {
try {
m_userSettings.setTimeWarp(Long.valueOf(timewarp).longValue());
} catch (Exception e) {
m_userSettings.setTimeWarp(-1);
}
} | [
"public",
"void",
"setTimewarpInt",
"(",
"String",
"timewarp",
")",
"{",
"try",
"{",
"m_userSettings",
".",
"setTimeWarp",
"(",
"Long",
".",
"valueOf",
"(",
"timewarp",
")",
".",
"longValue",
"(",
")",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
... | Sets the timewarp setting from a numeric string
@param timewarp a numeric string containing the number of milliseconds since the epoch | [
"Sets",
"the",
"timewarp",
"setting",
"from",
"a",
"numeric",
"string"
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsPreferences.java#L2131-L2138 | train |
alkacon/opencms-core | src-modules/org/opencms/workplace/commons/CmsPreferences.java | CmsPreferences.buildSelect | String buildSelect(String htmlAttributes, SelectOptions options) {
return buildSelect(htmlAttributes, options.getOptions(), options.getValues(), options.getSelectedIndex());
} | java | String buildSelect(String htmlAttributes, SelectOptions options) {
return buildSelect(htmlAttributes, options.getOptions(), options.getValues(), options.getSelectedIndex());
} | [
"String",
"buildSelect",
"(",
"String",
"htmlAttributes",
",",
"SelectOptions",
"options",
")",
"{",
"return",
"buildSelect",
"(",
"htmlAttributes",
",",
"options",
".",
"getOptions",
"(",
")",
",",
"options",
".",
"getValues",
"(",
")",
",",
"options",
".",
... | Builds the HTML code for a select widget given a bean containing the select options
@param htmlAttributes html attributes for the select widget
@param options the bean containing the select options
@return the HTML for the select box | [
"Builds",
"the",
"HTML",
"code",
"for",
"a",
"select",
"widget",
"given",
"a",
"bean",
"containing",
"the",
"select",
"options"
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsPreferences.java#L2257-L2260 | train |
alkacon/opencms-core | src/org/opencms/ui/apps/git/CmsGitConfiguration.java | CmsGitConfiguration.getValueFromProp | private String getValueFromProp(final String propValue) {
String value = propValue;
// remove quotes
value = value.trim();
if ((value.startsWith("\"") && value.endsWith("\"")) || (value.startsWith("'") && value.endsWith("'"))) {
value = value.substring(1, value.length() - 1)... | java | private String getValueFromProp(final String propValue) {
String value = propValue;
// remove quotes
value = value.trim();
if ((value.startsWith("\"") && value.endsWith("\"")) || (value.startsWith("'") && value.endsWith("'"))) {
value = value.substring(1, value.length() - 1)... | [
"private",
"String",
"getValueFromProp",
"(",
"final",
"String",
"propValue",
")",
"{",
"String",
"value",
"=",
"propValue",
";",
"// remove quotes",
"value",
"=",
"value",
".",
"trim",
"(",
")",
";",
"if",
"(",
"(",
"value",
".",
"startsWith",
"(",
"\"\\\... | Helper to read a line from the config file.
@param propValue the property value
@return the value of the variable set at this line. | [
"Helper",
"to",
"read",
"a",
"line",
"from",
"the",
"config",
"file",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/git/CmsGitConfiguration.java#L304-L313 | train |
alkacon/opencms-core | src/org/opencms/xml/containerpage/CmsADESessionCache.java | CmsADESessionCache.getDynamicValue | public String getDynamicValue(String attribute) {
return null == m_dynamicValues ? null : m_dynamicValues.get(attribute);
} | java | public String getDynamicValue(String attribute) {
return null == m_dynamicValues ? null : m_dynamicValues.get(attribute);
} | [
"public",
"String",
"getDynamicValue",
"(",
"String",
"attribute",
")",
"{",
"return",
"null",
"==",
"m_dynamicValues",
"?",
"null",
":",
"m_dynamicValues",
".",
"get",
"(",
"attribute",
")",
";",
"}"
] | Get cached value that is dynamically loaded by the Acacia content editor.
@param attribute the attribute to load the value to
@return the cached value | [
"Get",
"cached",
"value",
"that",
"is",
"dynamically",
"loaded",
"by",
"the",
"Acacia",
"content",
"editor",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/containerpage/CmsADESessionCache.java#L289-L292 | train |
alkacon/opencms-core | src/org/opencms/xml/containerpage/CmsADESessionCache.java | CmsADESessionCache.setDynamicValue | public void setDynamicValue(String attribute, String value) {
if (null == m_dynamicValues) {
m_dynamicValues = new ConcurrentHashMap<String, String>();
}
m_dynamicValues.put(attribute, value);
} | java | public void setDynamicValue(String attribute, String value) {
if (null == m_dynamicValues) {
m_dynamicValues = new ConcurrentHashMap<String, String>();
}
m_dynamicValues.put(attribute, value);
} | [
"public",
"void",
"setDynamicValue",
"(",
"String",
"attribute",
",",
"String",
"value",
")",
"{",
"if",
"(",
"null",
"==",
"m_dynamicValues",
")",
"{",
"m_dynamicValues",
"=",
"new",
"ConcurrentHashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"... | Set cached value for the attribute. Used for dynamically loaded values in the Acacia content editor.
@param attribute the attribute for which the value should be cached
@param value the value to cache | [
"Set",
"cached",
"value",
"for",
"the",
"attribute",
".",
"Used",
"for",
"dynamically",
"loaded",
"values",
"in",
"the",
"Acacia",
"content",
"editor",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/containerpage/CmsADESessionCache.java#L429-L435 | train |
alkacon/opencms-core | src/org/opencms/widgets/CmsHtmlWidgetOption.java | CmsHtmlWidgetOption.parseEmbeddedGalleryOptions | public static CmsPair<String, Map<String, String>> parseEmbeddedGalleryOptions(String configuration) {
final Map<String, String> galleryOptions = Maps.newHashMap();
String resultConfig = CmsStringUtil.substitute(
PATTERN_EMBEDDED_GALLERY_CONFIG,
configuration,
new I_... | java | public static CmsPair<String, Map<String, String>> parseEmbeddedGalleryOptions(String configuration) {
final Map<String, String> galleryOptions = Maps.newHashMap();
String resultConfig = CmsStringUtil.substitute(
PATTERN_EMBEDDED_GALLERY_CONFIG,
configuration,
new I_... | [
"public",
"static",
"CmsPair",
"<",
"String",
",",
"Map",
"<",
"String",
",",
"String",
">",
">",
"parseEmbeddedGalleryOptions",
"(",
"String",
"configuration",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"galleryOptions",
"=",
"Maps",
".",
... | Parses and removes embedded gallery configuration strings.
@param configuration the configuration string to parse
@return a map containing both the string resulting from removing the embedded configurations, and the embedded configurations as a a map | [
"Parses",
"and",
"removes",
"embedded",
"gallery",
"configuration",
"strings",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/CmsHtmlWidgetOption.java#L497-L514 | train |
alkacon/opencms-core | src-gwt/org/opencms/ade/galleries/client/preview/CmsFocalPointController.java | CmsFocalPointController.updateScaling | private void updateScaling() {
List<I_CmsTransform> transforms = new ArrayList<>();
CmsCroppingParamBean crop = m_croppingProvider.get();
CmsImageInfoBean info = m_imageInfoProvider.get();
double wv = m_image.getElement().getParentElement().getOffsetWidth();
double hv = m_image... | java | private void updateScaling() {
List<I_CmsTransform> transforms = new ArrayList<>();
CmsCroppingParamBean crop = m_croppingProvider.get();
CmsImageInfoBean info = m_imageInfoProvider.get();
double wv = m_image.getElement().getParentElement().getOffsetWidth();
double hv = m_image... | [
"private",
"void",
"updateScaling",
"(",
")",
"{",
"List",
"<",
"I_CmsTransform",
">",
"transforms",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"CmsCroppingParamBean",
"crop",
"=",
"m_croppingProvider",
".",
"get",
"(",
")",
";",
"CmsImageInfoBean",
"info",... | Sets up the coordinate transformations between the coordinate system of the parent element of the image element and the native coordinate system
of the original image. | [
"Sets",
"up",
"the",
"coordinate",
"transformations",
"between",
"the",
"coordinate",
"system",
"of",
"the",
"parent",
"element",
"of",
"the",
"image",
"element",
"and",
"the",
"native",
"coordinate",
"system",
"of",
"the",
"original",
"image",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/preview/CmsFocalPointController.java#L439-L479 | train |
alkacon/opencms-core | src/org/opencms/util/CmsFileUtil.java | CmsFileUtil.getEncoding | public static String getEncoding(CmsObject cms, CmsResource file) {
CmsProperty encodingProperty = CmsProperty.getNullProperty();
try {
encodingProperty = cms.readPropertyObject(file, CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING, true);
} catch (CmsException e) {
LOG.... | java | public static String getEncoding(CmsObject cms, CmsResource file) {
CmsProperty encodingProperty = CmsProperty.getNullProperty();
try {
encodingProperty = cms.readPropertyObject(file, CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING, true);
} catch (CmsException e) {
LOG.... | [
"public",
"static",
"String",
"getEncoding",
"(",
"CmsObject",
"cms",
",",
"CmsResource",
"file",
")",
"{",
"CmsProperty",
"encodingProperty",
"=",
"CmsProperty",
".",
"getNullProperty",
"(",
")",
";",
"try",
"{",
"encodingProperty",
"=",
"cms",
".",
"readProper... | Returns the encoding of the file.
Encoding is read from the content-encoding property and defaults to the systems default encoding.
Since properties can change without rewriting content, the actual encoding can differ.
@param cms {@link CmsObject} used to read properties of the given file.
@param file the file for whi... | [
"Returns",
"the",
"encoding",
"of",
"the",
"file",
".",
"Encoding",
"is",
"read",
"from",
"the",
"content",
"-",
"encoding",
"property",
"and",
"defaults",
"to",
"the",
"systems",
"default",
"encoding",
".",
"Since",
"properties",
"can",
"change",
"without",
... | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsFileUtil.java#L293-L302 | train |
alkacon/opencms-core | src/org/opencms/workplace/editors/CmsWorkplaceEditorManager.java | CmsWorkplaceEditorManager.getEditorParameter | public String getEditorParameter(CmsObject cms, String editor, String param) {
String path = OpenCms.getSystemInfo().getConfigFilePath(cms, "editors/" + editor + ".properties");
CmsVfsMemoryObjectCache cache = CmsVfsMemoryObjectCache.getVfsMemoryObjectCache();
CmsParameterConfiguration config =... | java | public String getEditorParameter(CmsObject cms, String editor, String param) {
String path = OpenCms.getSystemInfo().getConfigFilePath(cms, "editors/" + editor + ".properties");
CmsVfsMemoryObjectCache cache = CmsVfsMemoryObjectCache.getVfsMemoryObjectCache();
CmsParameterConfiguration config =... | [
"public",
"String",
"getEditorParameter",
"(",
"CmsObject",
"cms",
",",
"String",
"editor",
",",
"String",
"param",
")",
"{",
"String",
"path",
"=",
"OpenCms",
".",
"getSystemInfo",
"(",
")",
".",
"getConfigFilePath",
"(",
"cms",
",",
"\"editors/\"",
"+",
"e... | Gets the value of a global editor configuration parameter.
@param cms the CMS context
@param editor the editor name
@param param the name of the parameter
@return the editor parameter value | [
"Gets",
"the",
"value",
"of",
"a",
"global",
"editor",
"configuration",
"parameter",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/editors/CmsWorkplaceEditorManager.java#L250-L270 | train |
alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspInstanceDateBean.java | CmsJspInstanceDateBean.getEnd | public Date getEnd() {
if (null != m_explicitEnd) {
return isWholeDay() ? adjustForWholeDay(m_explicitEnd, true) : m_explicitEnd;
}
if ((null == m_end) && (m_series.getInstanceDuration() != null)) {
m_end = new Date(m_start.getTime() + m_series.getInstanceDuration().long... | java | public Date getEnd() {
if (null != m_explicitEnd) {
return isWholeDay() ? adjustForWholeDay(m_explicitEnd, true) : m_explicitEnd;
}
if ((null == m_end) && (m_series.getInstanceDuration() != null)) {
m_end = new Date(m_start.getTime() + m_series.getInstanceDuration().long... | [
"public",
"Date",
"getEnd",
"(",
")",
"{",
"if",
"(",
"null",
"!=",
"m_explicitEnd",
")",
"{",
"return",
"isWholeDay",
"(",
")",
"?",
"adjustForWholeDay",
"(",
"m_explicitEnd",
",",
"true",
")",
":",
"m_explicitEnd",
";",
"}",
"if",
"(",
"(",
"null",
"... | Returns the end time of the event.
@return the end time of the event. | [
"Returns",
"the",
"end",
"time",
"of",
"the",
"event",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspInstanceDateBean.java#L239-L248 | train |
alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspInstanceDateBean.java | CmsJspInstanceDateBean.setEnd | public void setEnd(Date endDate) {
if ((null == endDate) || getStart().after(endDate)) {
m_explicitEnd = null;
} else {
m_explicitEnd = endDate;
}
} | java | public void setEnd(Date endDate) {
if ((null == endDate) || getStart().after(endDate)) {
m_explicitEnd = null;
} else {
m_explicitEnd = endDate;
}
} | [
"public",
"void",
"setEnd",
"(",
"Date",
"endDate",
")",
"{",
"if",
"(",
"(",
"null",
"==",
"endDate",
")",
"||",
"getStart",
"(",
")",
".",
"after",
"(",
"endDate",
")",
")",
"{",
"m_explicitEnd",
"=",
"null",
";",
"}",
"else",
"{",
"m_explicitEnd",... | Explicitly set the end time of the event.
If the provided date is <code>null</code> or a date before the start date, the end date defaults to the start date.
@param endDate the end time of the event. | [
"Explicitly",
"set",
"the",
"end",
"time",
"of",
"the",
"event",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspInstanceDateBean.java#L363-L370 | train |
alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspInstanceDateBean.java | CmsJspInstanceDateBean.adjustForWholeDay | private Date adjustForWholeDay(Date date, boolean isEnd) {
Calendar result = new GregorianCalendar();
result.setTime(date);
result.set(Calendar.HOUR_OF_DAY, 0);
result.set(Calendar.MINUTE, 0);
result.set(Calendar.SECOND, 0);
result.set(Calendar.MILLISECOND, 0);
i... | java | private Date adjustForWholeDay(Date date, boolean isEnd) {
Calendar result = new GregorianCalendar();
result.setTime(date);
result.set(Calendar.HOUR_OF_DAY, 0);
result.set(Calendar.MINUTE, 0);
result.set(Calendar.SECOND, 0);
result.set(Calendar.MILLISECOND, 0);
i... | [
"private",
"Date",
"adjustForWholeDay",
"(",
"Date",
"date",
",",
"boolean",
"isEnd",
")",
"{",
"Calendar",
"result",
"=",
"new",
"GregorianCalendar",
"(",
")",
";",
"result",
".",
"setTime",
"(",
"date",
")",
";",
"result",
".",
"set",
"(",
"Calendar",
... | Adjust the date according to the whole day options.
@param date the date to adjust.
@param isEnd flag, indicating if the date is the end of the event (in contrast to the beginning)
@return the adjusted date, which will be exactly the beginning or the end of the provide date's day. | [
"Adjust",
"the",
"date",
"according",
"to",
"the",
"whole",
"day",
"options",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspInstanceDateBean.java#L428-L441 | train |
alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspInstanceDateBean.java | CmsJspInstanceDateBean.isSingleMultiDay | private boolean isSingleMultiDay() {
long duration = getEnd().getTime() - getStart().getTime();
if (duration > I_CmsSerialDateValue.DAY_IN_MILLIS) {
return true;
}
if (isWholeDay() && (duration <= I_CmsSerialDateValue.DAY_IN_MILLIS)) {
return false;
}
... | java | private boolean isSingleMultiDay() {
long duration = getEnd().getTime() - getStart().getTime();
if (duration > I_CmsSerialDateValue.DAY_IN_MILLIS) {
return true;
}
if (isWholeDay() && (duration <= I_CmsSerialDateValue.DAY_IN_MILLIS)) {
return false;
}
... | [
"private",
"boolean",
"isSingleMultiDay",
"(",
")",
"{",
"long",
"duration",
"=",
"getEnd",
"(",
")",
".",
"getTime",
"(",
")",
"-",
"getStart",
"(",
")",
".",
"getTime",
"(",
")",
";",
"if",
"(",
"duration",
">",
"I_CmsSerialDateValue",
".",
"DAY_IN_MIL... | Returns a flag, indicating if the current event is a multi-day event.
The method is only called if the single event has an explicitely set end date
or an explicitely changed whole day option.
@return a flag, indicating if the current event takes lasts over more than one day. | [
"Returns",
"a",
"flag",
"indicating",
"if",
"the",
"current",
"event",
"is",
"a",
"multi",
"-",
"day",
"event",
".",
"The",
"method",
"is",
"only",
"called",
"if",
"the",
"single",
"event",
"has",
"an",
"explicitely",
"set",
"end",
"date",
"or",
"an",
... | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspInstanceDateBean.java#L481-L499 | train |
alkacon/opencms-core | src/org/opencms/ugc/CmsUgcSessionSecurityUtil.java | CmsUgcSessionSecurityUtil.checkCreateUpload | public static void checkCreateUpload(CmsObject cms, CmsUgcConfiguration config, String name, long size)
throws CmsUgcException {
if (!config.getUploadParentFolder().isPresent()) {
String message = Messages.get().container(Messages.ERR_NO_UPLOADS_ALLOWED_0).key(
cms.getRequestCon... | java | public static void checkCreateUpload(CmsObject cms, CmsUgcConfiguration config, String name, long size)
throws CmsUgcException {
if (!config.getUploadParentFolder().isPresent()) {
String message = Messages.get().container(Messages.ERR_NO_UPLOADS_ALLOWED_0).key(
cms.getRequestCon... | [
"public",
"static",
"void",
"checkCreateUpload",
"(",
"CmsObject",
"cms",
",",
"CmsUgcConfiguration",
"config",
",",
"String",
"name",
",",
"long",
"size",
")",
"throws",
"CmsUgcException",
"{",
"if",
"(",
"!",
"config",
".",
"getUploadParentFolder",
"(",
")",
... | Checks whether an uploaded file can be created in the VFS, and throws an exception otherwise.
@param cms the current CMS context
@param config the form configuration
@param name the file name of the uploaded file
@param size the size of the uploaded file
@throws CmsUgcException if something goes wrong | [
"Checks",
"whether",
"an",
"uploaded",
"file",
"can",
"be",
"created",
"in",
"the",
"VFS",
"and",
"throws",
"an",
"exception",
"otherwise",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ugc/CmsUgcSessionSecurityUtil.java#L95-L127 | train |
alkacon/opencms-core | src/org/opencms/jsp/search/controller/CmsSearchControllerFacetRange.java | CmsSearchControllerFacetRange.addFacetPart | protected void addFacetPart(CmsSolrQuery query) {
StringBuffer value = new StringBuffer();
value.append("{!key=").append(m_config.getName());
addFacetOptions(value);
if (m_config.getIgnoreAllFacetFilters()
|| (!m_state.getCheckedEntries().isEmpty() && !m_config.getIsAndFacet... | java | protected void addFacetPart(CmsSolrQuery query) {
StringBuffer value = new StringBuffer();
value.append("{!key=").append(m_config.getName());
addFacetOptions(value);
if (m_config.getIgnoreAllFacetFilters()
|| (!m_state.getCheckedEntries().isEmpty() && !m_config.getIsAndFacet... | [
"protected",
"void",
"addFacetPart",
"(",
"CmsSolrQuery",
"query",
")",
"{",
"StringBuffer",
"value",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"value",
".",
"append",
"(",
"\"{!key=\"",
")",
".",
"append",
"(",
"m_config",
".",
"getName",
"(",
")",
")",
... | Generate query part for the facet, without filters.
@param query The query, where the facet part should be added | [
"Generate",
"query",
"part",
"for",
"the",
"facet",
"without",
"filters",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/controller/CmsSearchControllerFacetRange.java#L162-L174 | train |
alkacon/opencms-core | src/org/opencms/widgets/serialdate/CmsSerialDateBeanYearlyWeekday.java | CmsSerialDateBeanYearlyWeekday.setFittingWeekDay | private void setFittingWeekDay(Calendar date) {
date.set(Calendar.DAY_OF_MONTH, 1);
int weekDayFirst = date.get(Calendar.DAY_OF_WEEK);
int firstFittingWeekDay = (((m_weekDay.toInt() + I_CmsSerialDateValue.NUM_OF_WEEKDAYS) - weekDayFirst)
% I_CmsSerialDateValue.NUM_OF_WEEKDAYS) + 1;
... | java | private void setFittingWeekDay(Calendar date) {
date.set(Calendar.DAY_OF_MONTH, 1);
int weekDayFirst = date.get(Calendar.DAY_OF_WEEK);
int firstFittingWeekDay = (((m_weekDay.toInt() + I_CmsSerialDateValue.NUM_OF_WEEKDAYS) - weekDayFirst)
% I_CmsSerialDateValue.NUM_OF_WEEKDAYS) + 1;
... | [
"private",
"void",
"setFittingWeekDay",
"(",
"Calendar",
"date",
")",
"{",
"date",
".",
"set",
"(",
"Calendar",
".",
"DAY_OF_MONTH",
",",
"1",
")",
";",
"int",
"weekDayFirst",
"=",
"date",
".",
"get",
"(",
"Calendar",
".",
"DAY_OF_WEEK",
")",
";",
"int",... | Adjusts the day in the provided month, that it fits the specified week day.
If there's no match for that provided month, the next possible month is checked.
@param date the date to adjust, with the correct year and month already set. | [
"Adjusts",
"the",
"day",
"in",
"the",
"provided",
"month",
"that",
"it",
"fits",
"the",
"specified",
"week",
"day",
".",
"If",
"there",
"s",
"no",
"match",
"for",
"that",
"provided",
"month",
"the",
"next",
"possible",
"month",
"is",
"checked",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/serialdate/CmsSerialDateBeanYearlyWeekday.java#L134-L145 | train |
alkacon/opencms-core | src/org/opencms/ui/apps/user/CmsUserTable.java | CmsUserTable.getEmptyLayout | public VerticalLayout getEmptyLayout() {
m_emptyLayout = CmsVaadinUtils.getInfoLayout(CmsOuTreeType.USER.getEmptyMessageKey());
setVisible(size() > 0);
m_emptyLayout.setVisible(size() == 0);
return m_emptyLayout;
} | java | public VerticalLayout getEmptyLayout() {
m_emptyLayout = CmsVaadinUtils.getInfoLayout(CmsOuTreeType.USER.getEmptyMessageKey());
setVisible(size() > 0);
m_emptyLayout.setVisible(size() == 0);
return m_emptyLayout;
} | [
"public",
"VerticalLayout",
"getEmptyLayout",
"(",
")",
"{",
"m_emptyLayout",
"=",
"CmsVaadinUtils",
".",
"getInfoLayout",
"(",
"CmsOuTreeType",
".",
"USER",
".",
"getEmptyMessageKey",
"(",
")",
")",
";",
"setVisible",
"(",
"size",
"(",
")",
">",
"0",
")",
"... | Layout which gets displayed if table is empty.
@see org.opencms.ui.apps.user.I_CmsFilterableTable#getEmptyLayout() | [
"Layout",
"which",
"gets",
"displayed",
"if",
"table",
"is",
"empty",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/user/CmsUserTable.java#L964-L970 | train |
alkacon/opencms-core | src/org/opencms/ui/apps/user/CmsUserTable.java | CmsUserTable.getVisibleUser | public List<CmsUser> getVisibleUser() {
if (!m_fullyLoaded) {
return m_users;
}
if (size() == m_users.size()) {
return m_users;
}
List<CmsUser> directs = new ArrayList<CmsUser>();
for (CmsUser user : m_users) {
if (!m_indirects.contain... | java | public List<CmsUser> getVisibleUser() {
if (!m_fullyLoaded) {
return m_users;
}
if (size() == m_users.size()) {
return m_users;
}
List<CmsUser> directs = new ArrayList<CmsUser>();
for (CmsUser user : m_users) {
if (!m_indirects.contain... | [
"public",
"List",
"<",
"CmsUser",
">",
"getVisibleUser",
"(",
")",
"{",
"if",
"(",
"!",
"m_fullyLoaded",
")",
"{",
"return",
"m_users",
";",
"}",
"if",
"(",
"size",
"(",
")",
"==",
"m_users",
".",
"size",
"(",
")",
")",
"{",
"return",
"m_users",
";... | Gets currently visible user.
@return List of user | [
"Gets",
"currently",
"visible",
"user",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/user/CmsUserTable.java#L977-L992 | train |
alkacon/opencms-core | src/org/opencms/ui/apps/user/CmsUserTable.java | CmsUserTable.getStatus | String getStatus(CmsUser user, boolean disabled, boolean newUser) {
if (disabled) {
return CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_DISABLED_0);
}
if (newUser) {
return CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_INACTIVE_0);
... | java | String getStatus(CmsUser user, boolean disabled, boolean newUser) {
if (disabled) {
return CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_DISABLED_0);
}
if (newUser) {
return CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_INACTIVE_0);
... | [
"String",
"getStatus",
"(",
"CmsUser",
"user",
",",
"boolean",
"disabled",
",",
"boolean",
"newUser",
")",
"{",
"if",
"(",
"disabled",
")",
"{",
"return",
"CmsVaadinUtils",
".",
"getMessageText",
"(",
"Messages",
".",
"GUI_USERMANAGEMENT_USER_DISABLED_0",
")",
"... | Returns status message.
@param user CmsUser
@param disabled boolean
@param newUser boolean
@return String | [
"Returns",
"status",
"message",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/user/CmsUserTable.java#L1351-L1366 | train |
alkacon/opencms-core | src/org/opencms/ui/apps/user/CmsUserTable.java | CmsUserTable.getStatusHelp | String getStatusHelp(CmsUser user, boolean disabled, boolean newUser) {
if (disabled) {
return CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_DISABLED_HELP_0);
}
if (newUser) {
return CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_INACTIVE... | java | String getStatusHelp(CmsUser user, boolean disabled, boolean newUser) {
if (disabled) {
return CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_DISABLED_HELP_0);
}
if (newUser) {
return CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_INACTIVE... | [
"String",
"getStatusHelp",
"(",
"CmsUser",
"user",
",",
"boolean",
"disabled",
",",
"boolean",
"newUser",
")",
"{",
"if",
"(",
"disabled",
")",
"{",
"return",
"CmsVaadinUtils",
".",
"getMessageText",
"(",
"Messages",
".",
"GUI_USERMANAGEMENT_USER_DISABLED_HELP_0",
... | Returns status help message.
@param user CmsUser
@param disabled boolean
@param newUser boolean
@return String | [
"Returns",
"status",
"help",
"message",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/user/CmsUserTable.java#L1376-L1391 | train |
alkacon/opencms-core | src/org/opencms/ui/apps/user/CmsUserTable.java | CmsUserTable.isUserPasswordReset | boolean isUserPasswordReset(CmsUser user) {
if (USER_PASSWORD_STATUS.containsKey(user.getId())) { //Check if user was checked before
if (!USER_PASSWORD_STATUS.get(user.getId()).booleanValue()) { // was false before, false->true is never done without changing map
return false;
... | java | boolean isUserPasswordReset(CmsUser user) {
if (USER_PASSWORD_STATUS.containsKey(user.getId())) { //Check if user was checked before
if (!USER_PASSWORD_STATUS.get(user.getId()).booleanValue()) { // was false before, false->true is never done without changing map
return false;
... | [
"boolean",
"isUserPasswordReset",
"(",
"CmsUser",
"user",
")",
"{",
"if",
"(",
"USER_PASSWORD_STATUS",
".",
"containsKey",
"(",
"user",
".",
"getId",
"(",
")",
")",
")",
"{",
"//Check if user was checked before",
"if",
"(",
"!",
"USER_PASSWORD_STATUS",
".",
"get... | Is the user password reset?
@param user User to check
@return boolean | [
"Is",
"the",
"user",
"password",
"reset?"
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/user/CmsUserTable.java#L1417-L1443 | train |
alkacon/opencms-core | src/org/opencms/search/galleries/CmsGallerySearchParameters.java | CmsGallerySearchParameters.getQuery | public CmsSolrQuery getQuery(CmsObject cms) {
final CmsSolrQuery query = new CmsSolrQuery();
// set categories
query.setCategories(m_categories);
// set container types
if (null != m_containerTypes) {
query.addFilterQuery(CmsSearchField.FIELD_CONTAINER_TYPES, m_con... | java | public CmsSolrQuery getQuery(CmsObject cms) {
final CmsSolrQuery query = new CmsSolrQuery();
// set categories
query.setCategories(m_categories);
// set container types
if (null != m_containerTypes) {
query.addFilterQuery(CmsSearchField.FIELD_CONTAINER_TYPES, m_con... | [
"public",
"CmsSolrQuery",
"getQuery",
"(",
"CmsObject",
"cms",
")",
"{",
"final",
"CmsSolrQuery",
"query",
"=",
"new",
"CmsSolrQuery",
"(",
")",
";",
"// set categories",
"query",
".",
"setCategories",
"(",
"m_categories",
")",
";",
"// set container types",
"if",... | Returns a CmsSolrQuery representation of this class.
@param cms the openCms object.
@return CmsSolrQuery representation of this class. | [
"Returns",
"a",
"CmsSolrQuery",
"representation",
"of",
"this",
"class",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/galleries/CmsGallerySearchParameters.java#L361-L463 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.