id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
158,100 | alkacon/opencms-core | src/org/opencms/ui/favorites/CmsFavoriteDialog.java | CmsFavoriteDialog.doSave | protected void doSave() {
List<CmsFavoriteEntry> entries = getEntries();
try {
m_favDao.saveFavorites(entries);
} catch (Exception e) {
CmsErrorDialog.showErrorDialog(e);
}
} | java | protected void doSave() {
List<CmsFavoriteEntry> entries = getEntries();
try {
m_favDao.saveFavorites(entries);
} catch (Exception e) {
CmsErrorDialog.showErrorDialog(e);
}
} | [
"protected",
"void",
"doSave",
"(",
")",
"{",
"List",
"<",
"CmsFavoriteEntry",
">",
"entries",
"=",
"getEntries",
"(",
")",
";",
"try",
"{",
"m_favDao",
".",
"saveFavorites",
"(",
"entries",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"Cms... | Saves the list of currently displayed favorites. | [
"Saves",
"the",
"list",
"of",
"currently",
"displayed",
"favorites",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/favorites/CmsFavoriteDialog.java#L273-L281 |
158,101 | alkacon/opencms-core | src/org/opencms/ui/favorites/CmsFavoriteDialog.java | CmsFavoriteDialog.getEntries | List<CmsFavoriteEntry> getEntries() {
List<CmsFavoriteEntry> result = new ArrayList<>();
for (I_CmsEditableGroupRow row : m_group.getRows()) {
CmsFavoriteEntry entry = ((CmsFavInfo)row).getEntry();
result.add(entry);
}
return result;
} | java | List<CmsFavoriteEntry> getEntries() {
List<CmsFavoriteEntry> result = new ArrayList<>();
for (I_CmsEditableGroupRow row : m_group.getRows()) {
CmsFavoriteEntry entry = ((CmsFavInfo)row).getEntry();
result.add(entry);
}
return result;
} | [
"List",
"<",
"CmsFavoriteEntry",
">",
"getEntries",
"(",
")",
"{",
"List",
"<",
"CmsFavoriteEntry",
">",
"result",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"I_CmsEditableGroupRow",
"row",
":",
"m_group",
".",
"getRows",
"(",
")",
")",
"{... | Gets the favorite entries corresponding to the currently displayed favorite widgets.
@return the list of favorite entries | [
"Gets",
"the",
"favorite",
"entries",
"corresponding",
"to",
"the",
"currently",
"displayed",
"favorite",
"widgets",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/favorites/CmsFavoriteDialog.java#L296-L304 |
158,102 | alkacon/opencms-core | src/org/opencms/ui/favorites/CmsFavoriteDialog.java | CmsFavoriteDialog.createFavInfo | private CmsFavInfo createFavInfo(CmsFavoriteEntry entry) throws CmsException {
String title = "";
String subtitle = "";
CmsFavInfo result = new CmsFavInfo(entry);
CmsObject cms = A_CmsUI.getCmsObject();
String project = getProject(cms, entry);
String site = getSite(cms, ... | java | private CmsFavInfo createFavInfo(CmsFavoriteEntry entry) throws CmsException {
String title = "";
String subtitle = "";
CmsFavInfo result = new CmsFavInfo(entry);
CmsObject cms = A_CmsUI.getCmsObject();
String project = getProject(cms, entry);
String site = getSite(cms, ... | [
"private",
"CmsFavInfo",
"createFavInfo",
"(",
"CmsFavoriteEntry",
"entry",
")",
"throws",
"CmsException",
"{",
"String",
"title",
"=",
"\"\"",
";",
"String",
"subtitle",
"=",
"\"\"",
";",
"CmsFavInfo",
"result",
"=",
"new",
"CmsFavInfo",
"(",
"entry",
")",
";... | Creates a favorite widget for a favorite entry.
@param entry the favorite entry
@return the favorite widget
@throws CmsException if something goes wrong | [
"Creates",
"a",
"favorite",
"widget",
"for",
"a",
"favorite",
"entry",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/favorites/CmsFavoriteDialog.java#L314-L349 |
158,103 | alkacon/opencms-core | src/org/opencms/ui/favorites/CmsFavoriteDialog.java | CmsFavoriteDialog.getEntry | private CmsFavoriteEntry getEntry(Component row) {
if (row instanceof CmsFavInfo) {
return ((CmsFavInfo)row).getEntry();
}
return null;
} | java | private CmsFavoriteEntry getEntry(Component row) {
if (row instanceof CmsFavInfo) {
return ((CmsFavInfo)row).getEntry();
}
return null;
} | [
"private",
"CmsFavoriteEntry",
"getEntry",
"(",
"Component",
"row",
")",
"{",
"if",
"(",
"row",
"instanceof",
"CmsFavInfo",
")",
"{",
"return",
"(",
"(",
"CmsFavInfo",
")",
"row",
")",
".",
"getEntry",
"(",
")",
";",
"}",
"return",
"null",
";",
"}"
] | Gets the favorite entry for a given row.
@param row the widget used to display the favorite
@return the favorite entry for the widget | [
"Gets",
"the",
"favorite",
"entry",
"for",
"a",
"given",
"row",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/favorites/CmsFavoriteDialog.java#L357-L366 |
158,104 | alkacon/opencms-core | src/org/opencms/ui/favorites/CmsFavoriteDialog.java | CmsFavoriteDialog.getProject | private String getProject(CmsObject cms, CmsFavoriteEntry entry) throws CmsException {
String result = m_projectLabels.get(entry.getProjectId());
if (result == null) {
result = cms.readProject(entry.getProjectId()).getName();
m_projectLabels.put(entry.getProjectId(), result);
... | java | private String getProject(CmsObject cms, CmsFavoriteEntry entry) throws CmsException {
String result = m_projectLabels.get(entry.getProjectId());
if (result == null) {
result = cms.readProject(entry.getProjectId()).getName();
m_projectLabels.put(entry.getProjectId(), result);
... | [
"private",
"String",
"getProject",
"(",
"CmsObject",
"cms",
",",
"CmsFavoriteEntry",
"entry",
")",
"throws",
"CmsException",
"{",
"String",
"result",
"=",
"m_projectLabels",
".",
"get",
"(",
"entry",
".",
"getProjectId",
"(",
")",
")",
";",
"if",
"(",
"resul... | Gets the project name for a favorite entry.
@param cms the CMS context
@param entry the favorite entry
@return the project name for the favorite entry
@throws CmsException if something goes wrong | [
"Gets",
"the",
"project",
"name",
"for",
"a",
"favorite",
"entry",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/favorites/CmsFavoriteDialog.java#L376-L384 |
158,105 | alkacon/opencms-core | src/org/opencms/ui/favorites/CmsFavoriteDialog.java | CmsFavoriteDialog.getSite | private String getSite(CmsObject cms, CmsFavoriteEntry entry) {
CmsSite site = OpenCms.getSiteManager().getSiteForRootPath(entry.getSiteRoot());
Item item = m_sitesContainer.getItem(entry.getSiteRoot());
if (item != null) {
return (String)(item.getItemProperty("caption").getValue())... | java | private String getSite(CmsObject cms, CmsFavoriteEntry entry) {
CmsSite site = OpenCms.getSiteManager().getSiteForRootPath(entry.getSiteRoot());
Item item = m_sitesContainer.getItem(entry.getSiteRoot());
if (item != null) {
return (String)(item.getItemProperty("caption").getValue())... | [
"private",
"String",
"getSite",
"(",
"CmsObject",
"cms",
",",
"CmsFavoriteEntry",
"entry",
")",
"{",
"CmsSite",
"site",
"=",
"OpenCms",
".",
"getSiteManager",
"(",
")",
".",
"getSiteForRootPath",
"(",
"entry",
".",
"getSiteRoot",
"(",
")",
")",
";",
"Item",
... | Gets the site label for the entry.
@param cms the current CMS context
@param entry the entry
@return the site label for the entry | [
"Gets",
"the",
"site",
"label",
"for",
"the",
"entry",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/favorites/CmsFavoriteDialog.java#L393-L407 |
158,106 | alkacon/opencms-core | src/org/opencms/ui/favorites/CmsFavoriteDialog.java | CmsFavoriteDialog.onClickAdd | private void onClickAdd() {
if (m_currentLocation.isPresent()) {
CmsFavoriteEntry entry = m_currentLocation.get();
List<CmsFavoriteEntry> entries = getEntries();
entries.add(entry);
try {
m_favDao.saveFavorites(entries);
} catch (Excep... | java | private void onClickAdd() {
if (m_currentLocation.isPresent()) {
CmsFavoriteEntry entry = m_currentLocation.get();
List<CmsFavoriteEntry> entries = getEntries();
entries.add(entry);
try {
m_favDao.saveFavorites(entries);
} catch (Excep... | [
"private",
"void",
"onClickAdd",
"(",
")",
"{",
"if",
"(",
"m_currentLocation",
".",
"isPresent",
"(",
")",
")",
"{",
"CmsFavoriteEntry",
"entry",
"=",
"m_currentLocation",
".",
"get",
"(",
")",
";",
"List",
"<",
"CmsFavoriteEntry",
">",
"entries",
"=",
"g... | The click handler for the add button. | [
"The",
"click",
"handler",
"for",
"the",
"add",
"button",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/favorites/CmsFavoriteDialog.java#L412-L425 |
158,107 | alkacon/opencms-core | src/org/opencms/jsp/CmsJspTagNavigation.java | CmsJspTagNavigation.setLocale | public void setLocale(String locale) {
try {
m_locale = LocaleUtils.toLocale(locale);
} catch (IllegalArgumentException e) {
LOG.error(Messages.get().getBundle().key(Messages.ERR_TAG_INVALID_LOCALE_1, "cms:navigation"), e);
m_locale = null;
}
} | java | public void setLocale(String locale) {
try {
m_locale = LocaleUtils.toLocale(locale);
} catch (IllegalArgumentException e) {
LOG.error(Messages.get().getBundle().key(Messages.ERR_TAG_INVALID_LOCALE_1, "cms:navigation"), e);
m_locale = null;
}
} | [
"public",
"void",
"setLocale",
"(",
"String",
"locale",
")",
"{",
"try",
"{",
"m_locale",
"=",
"LocaleUtils",
".",
"toLocale",
"(",
"locale",
")",
";",
"}",
"catch",
"(",
"IllegalArgumentException",
"e",
")",
"{",
"LOG",
".",
"error",
"(",
"Messages",
".... | Sets the locale for which the property should be read.
@param locale the locale for which the property should be read. | [
"Sets",
"the",
"locale",
"for",
"which",
"the",
"property",
"should",
"be",
"read",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspTagNavigation.java#L220-L228 |
158,108 | alkacon/opencms-core | src/org/opencms/ui/favorites/CmsFavoriteDAO.java | CmsFavoriteDAO.loadFavorites | public List<CmsFavoriteEntry> loadFavorites() throws CmsException {
List<CmsFavoriteEntry> result = new ArrayList<>();
try {
CmsUser user = readUser();
String data = (String)user.getAdditionalInfo(ADDINFO_KEY);
if (CmsStringUtil.isEmptyOrWhitespaceOnly(data)) {
... | java | public List<CmsFavoriteEntry> loadFavorites() throws CmsException {
List<CmsFavoriteEntry> result = new ArrayList<>();
try {
CmsUser user = readUser();
String data = (String)user.getAdditionalInfo(ADDINFO_KEY);
if (CmsStringUtil.isEmptyOrWhitespaceOnly(data)) {
... | [
"public",
"List",
"<",
"CmsFavoriteEntry",
">",
"loadFavorites",
"(",
")",
"throws",
"CmsException",
"{",
"List",
"<",
"CmsFavoriteEntry",
">",
"result",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"try",
"{",
"CmsUser",
"user",
"=",
"readUser",
"(",
")"... | Loads the favorite list.
@return the list of favorites
@throws CmsException if something goes wrong | [
"Loads",
"the",
"favorite",
"list",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/favorites/CmsFavoriteDAO.java#L120-L147 |
158,109 | alkacon/opencms-core | src/org/opencms/ui/favorites/CmsFavoriteDAO.java | CmsFavoriteDAO.saveFavorites | public void saveFavorites(List<CmsFavoriteEntry> favorites) throws CmsException {
try {
JSONObject json = new JSONObject();
JSONArray array = new JSONArray();
for (CmsFavoriteEntry entry : favorites) {
array.put(entry.toJson());
}
json... | java | public void saveFavorites(List<CmsFavoriteEntry> favorites) throws CmsException {
try {
JSONObject json = new JSONObject();
JSONArray array = new JSONArray();
for (CmsFavoriteEntry entry : favorites) {
array.put(entry.toJson());
}
json... | [
"public",
"void",
"saveFavorites",
"(",
"List",
"<",
"CmsFavoriteEntry",
">",
"favorites",
")",
"throws",
"CmsException",
"{",
"try",
"{",
"JSONObject",
"json",
"=",
"new",
"JSONObject",
"(",
")",
";",
"JSONArray",
"array",
"=",
"new",
"JSONArray",
"(",
")",... | Saves the favorites.
@param favorites the list of favorites to save
@throws CmsException if something goes wrong | [
"Saves",
"the",
"favorites",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/favorites/CmsFavoriteDAO.java#L155-L172 |
158,110 | alkacon/opencms-core | src/org/opencms/ui/favorites/CmsFavoriteDAO.java | CmsFavoriteDAO.validate | private boolean validate(CmsFavoriteEntry entry) {
try {
String siteRoot = entry.getSiteRoot();
if (!m_okSiteRoots.contains(siteRoot)) {
m_rootCms.readResource(siteRoot);
m_okSiteRoots.add(siteRoot);
}
CmsUUID project = entry.getPr... | java | private boolean validate(CmsFavoriteEntry entry) {
try {
String siteRoot = entry.getSiteRoot();
if (!m_okSiteRoots.contains(siteRoot)) {
m_rootCms.readResource(siteRoot);
m_okSiteRoots.add(siteRoot);
}
CmsUUID project = entry.getPr... | [
"private",
"boolean",
"validate",
"(",
"CmsFavoriteEntry",
"entry",
")",
"{",
"try",
"{",
"String",
"siteRoot",
"=",
"entry",
".",
"getSiteRoot",
"(",
")",
";",
"if",
"(",
"!",
"m_okSiteRoots",
".",
"contains",
"(",
"siteRoot",
")",
")",
"{",
"m_rootCms",
... | Validates a favorite entry.
<p>If the favorite entry references a resource or project that can't be read, this will return false.
@param entry the favorite entry
@return the | [
"Validates",
"a",
"favorite",
"entry",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/favorites/CmsFavoriteDAO.java#L188-L214 |
158,111 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.showCurrentDates | public void showCurrentDates(Collection<CmsPair<Date, Boolean>> dates) {
m_overviewList.setDatesWithCheckState(dates);
m_overviewPopup.center();
} | java | public void showCurrentDates(Collection<CmsPair<Date, Boolean>> dates) {
m_overviewList.setDatesWithCheckState(dates);
m_overviewPopup.center();
} | [
"public",
"void",
"showCurrentDates",
"(",
"Collection",
"<",
"CmsPair",
"<",
"Date",
",",
"Boolean",
">",
">",
"dates",
")",
"{",
"m_overviewList",
".",
"setDatesWithCheckState",
"(",
"dates",
")",
";",
"m_overviewPopup",
".",
"center",
"(",
")",
";",
"}"
] | Shows the provided list of dates as current dates.
@param dates the current dates to show, accompanied with the information if they are exceptions or not. | [
"Shows",
"the",
"provided",
"list",
"of",
"dates",
"as",
"current",
"dates",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L339-L344 |
158,112 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.updateExceptions | public void updateExceptions() {
m_exceptionsList.setDates(m_model.getExceptions());
if (m_model.getExceptions().size() > 0) {
m_exceptionsPanel.setVisible(true);
} else {
m_exceptionsPanel.setVisible(false);
}
} | java | public void updateExceptions() {
m_exceptionsList.setDates(m_model.getExceptions());
if (m_model.getExceptions().size() > 0) {
m_exceptionsPanel.setVisible(true);
} else {
m_exceptionsPanel.setVisible(false);
}
} | [
"public",
"void",
"updateExceptions",
"(",
")",
"{",
"m_exceptionsList",
".",
"setDates",
"(",
"m_model",
".",
"getExceptions",
"(",
")",
")",
";",
"if",
"(",
"m_model",
".",
"getExceptions",
"(",
")",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"m_exce... | Updates the exceptions panel. | [
"Updates",
"the",
"exceptions",
"panel",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L349-L357 |
158,113 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.onCurrentTillEndChange | @UiHandler("m_currentTillEndCheckBox")
void onCurrentTillEndChange(ValueChangeEvent<Boolean> event) {
if (handleChange()) {
m_controller.setCurrentTillEnd(event.getValue());
}
} | java | @UiHandler("m_currentTillEndCheckBox")
void onCurrentTillEndChange(ValueChangeEvent<Boolean> event) {
if (handleChange()) {
m_controller.setCurrentTillEnd(event.getValue());
}
} | [
"@",
"UiHandler",
"(",
"\"m_currentTillEndCheckBox\"",
")",
"void",
"onCurrentTillEndChange",
"(",
"ValueChangeEvent",
"<",
"Boolean",
">",
"event",
")",
"{",
"if",
"(",
"handleChange",
"(",
")",
")",
"{",
"m_controller",
".",
"setCurrentTillEnd",
"(",
"event",
... | Handle a "current till end" change event.
@param event the change event. | [
"Handle",
"a",
"current",
"till",
"end",
"change",
"event",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L372-L378 |
158,114 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.onEndTimeChange | @UiHandler("m_endTime")
void onEndTimeChange(CmsDateBoxEvent event) {
if (handleChange() && !event.isUserTyping()) {
m_controller.setEndTime(event.getDate());
}
} | java | @UiHandler("m_endTime")
void onEndTimeChange(CmsDateBoxEvent event) {
if (handleChange() && !event.isUserTyping()) {
m_controller.setEndTime(event.getDate());
}
} | [
"@",
"UiHandler",
"(",
"\"m_endTime\"",
")",
"void",
"onEndTimeChange",
"(",
"CmsDateBoxEvent",
"event",
")",
"{",
"if",
"(",
"handleChange",
"(",
")",
"&&",
"!",
"event",
".",
"isUserTyping",
"(",
")",
")",
"{",
"m_controller",
".",
"setEndTime",
"(",
"ev... | Handle an end time change.
@param event the change event. | [
"Handle",
"an",
"end",
"time",
"change",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L384-L390 |
158,115 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.onEndTypeChange | void onEndTypeChange() {
EndType endType = m_model.getEndType();
m_groupDuration.selectButton(getDurationButtonForType(endType));
switch (endType) {
case DATE:
case TIMES:
m_durationPanel.setVisible(true);
m_seriesEndDate.setValue(m_model.... | java | void onEndTypeChange() {
EndType endType = m_model.getEndType();
m_groupDuration.selectButton(getDurationButtonForType(endType));
switch (endType) {
case DATE:
case TIMES:
m_durationPanel.setVisible(true);
m_seriesEndDate.setValue(m_model.... | [
"void",
"onEndTypeChange",
"(",
")",
"{",
"EndType",
"endType",
"=",
"m_model",
".",
"getEndType",
"(",
")",
";",
"m_groupDuration",
".",
"selectButton",
"(",
"getDurationButtonForType",
"(",
"endType",
")",
")",
";",
"switch",
"(",
"endType",
")",
"{",
"cas... | Called when the end type is changed. | [
"Called",
"when",
"the",
"end",
"type",
"is",
"changed",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L395-L414 |
158,116 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.onPatternChange | void onPatternChange() {
PatternType patternType = m_model.getPatternType();
boolean isSeries = !patternType.equals(PatternType.NONE);
setSerialOptionsVisible(isSeries);
m_seriesCheckBox.setChecked(isSeries);
if (isSeries) {
m_groupPattern.selectButton(m_patternButto... | java | void onPatternChange() {
PatternType patternType = m_model.getPatternType();
boolean isSeries = !patternType.equals(PatternType.NONE);
setSerialOptionsVisible(isSeries);
m_seriesCheckBox.setChecked(isSeries);
if (isSeries) {
m_groupPattern.selectButton(m_patternButto... | [
"void",
"onPatternChange",
"(",
")",
"{",
"PatternType",
"patternType",
"=",
"m_model",
".",
"getPatternType",
"(",
")",
";",
"boolean",
"isSeries",
"=",
"!",
"patternType",
".",
"equals",
"(",
"PatternType",
".",
"NONE",
")",
";",
"setSerialOptionsVisible",
"... | Called when the pattern has changed. | [
"Called",
"when",
"the",
"pattern",
"has",
"changed",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L457-L470 |
158,117 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.onSeriesChange | @UiHandler("m_seriesCheckBox")
void onSeriesChange(ValueChangeEvent<Boolean> event) {
if (handleChange()) {
m_controller.setIsSeries(event.getValue());
}
} | java | @UiHandler("m_seriesCheckBox")
void onSeriesChange(ValueChangeEvent<Boolean> event) {
if (handleChange()) {
m_controller.setIsSeries(event.getValue());
}
} | [
"@",
"UiHandler",
"(",
"\"m_seriesCheckBox\"",
")",
"void",
"onSeriesChange",
"(",
"ValueChangeEvent",
"<",
"Boolean",
">",
"event",
")",
"{",
"if",
"(",
"handleChange",
"(",
")",
")",
"{",
"m_controller",
".",
"setIsSeries",
"(",
"event",
".",
"getValue",
"... | Handle changes of the series check box.
@param event the change event. | [
"Handle",
"changes",
"of",
"the",
"series",
"check",
"box",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L476-L482 |
158,118 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.onStartTimeChange | @UiHandler("m_startTime")
void onStartTimeChange(CmsDateBoxEvent event) {
if (handleChange() && !event.isUserTyping()) {
m_controller.setStartTime(event.getDate());
}
} | java | @UiHandler("m_startTime")
void onStartTimeChange(CmsDateBoxEvent event) {
if (handleChange() && !event.isUserTyping()) {
m_controller.setStartTime(event.getDate());
}
} | [
"@",
"UiHandler",
"(",
"\"m_startTime\"",
")",
"void",
"onStartTimeChange",
"(",
"CmsDateBoxEvent",
"event",
")",
"{",
"if",
"(",
"handleChange",
"(",
")",
"&&",
"!",
"event",
".",
"isUserTyping",
"(",
")",
")",
"{",
"m_controller",
".",
"setStartTime",
"(",... | Handle a start time change.
@param event the change event | [
"Handle",
"a",
"start",
"time",
"change",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L512-L518 |
158,119 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.onWholeDayChange | @UiHandler("m_wholeDayCheckBox")
void onWholeDayChange(ValueChangeEvent<Boolean> event) {
//TODO: Improve - adjust time selections?
if (handleChange()) {
m_controller.setWholeDay(event.getValue());
}
} | java | @UiHandler("m_wholeDayCheckBox")
void onWholeDayChange(ValueChangeEvent<Boolean> event) {
//TODO: Improve - adjust time selections?
if (handleChange()) {
m_controller.setWholeDay(event.getValue());
}
} | [
"@",
"UiHandler",
"(",
"\"m_wholeDayCheckBox\"",
")",
"void",
"onWholeDayChange",
"(",
"ValueChangeEvent",
"<",
"Boolean",
">",
"event",
")",
"{",
"//TODO: Improve - adjust time selections?",
"if",
"(",
"handleChange",
"(",
")",
")",
"{",
"m_controller",
".",
"setWh... | Handle a whole day change event.
@param event the change event. | [
"Handle",
"a",
"whole",
"day",
"change",
"event",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L524-L531 |
158,120 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.createAndAddButton | private void createAndAddButton(PatternType pattern, String messageKey) {
CmsRadioButton btn = new CmsRadioButton(pattern.toString(), Messages.get().key(messageKey));
btn.addStyleName(I_CmsWidgetsLayoutBundle.INSTANCE.widgetCss().radioButtonlabel());
btn.setGroup(m_groupPattern);
m_patt... | java | private void createAndAddButton(PatternType pattern, String messageKey) {
CmsRadioButton btn = new CmsRadioButton(pattern.toString(), Messages.get().key(messageKey));
btn.addStyleName(I_CmsWidgetsLayoutBundle.INSTANCE.widgetCss().radioButtonlabel());
btn.setGroup(m_groupPattern);
m_patt... | [
"private",
"void",
"createAndAddButton",
"(",
"PatternType",
"pattern",
",",
"String",
"messageKey",
")",
"{",
"CmsRadioButton",
"btn",
"=",
"new",
"CmsRadioButton",
"(",
"pattern",
".",
"toString",
"(",
")",
",",
"Messages",
".",
"get",
"(",
")",
".",
"key"... | Creates a pattern choice radio button and adds it where necessary.
@param pattern the pattern that should be chosen by the button.
@param messageKey the message key for the button's label. | [
"Creates",
"a",
"pattern",
"choice",
"radio",
"button",
"and",
"adds",
"it",
"where",
"necessary",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L552-L560 |
158,121 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.initDatesPanel | private void initDatesPanel() {
m_startLabel.setText(Messages.get().key(Messages.GUI_SERIALDATE_TIME_STARTTIME_0));
m_startTime.setAllowInvalidValue(true);
m_startTime.setValue(m_model.getStart());
m_endLabel.setText(Messages.get().key(Messages.GUI_SERIALDATE_TIME_ENDTIME_0));
m... | java | private void initDatesPanel() {
m_startLabel.setText(Messages.get().key(Messages.GUI_SERIALDATE_TIME_STARTTIME_0));
m_startTime.setAllowInvalidValue(true);
m_startTime.setValue(m_model.getStart());
m_endLabel.setText(Messages.get().key(Messages.GUI_SERIALDATE_TIME_ENDTIME_0));
m... | [
"private",
"void",
"initDatesPanel",
"(",
")",
"{",
"m_startLabel",
".",
"setText",
"(",
"Messages",
".",
"get",
"(",
")",
".",
"key",
"(",
"Messages",
".",
"GUI_SERIALDATE_TIME_STARTTIME_0",
")",
")",
";",
"m_startTime",
".",
"setAllowInvalidValue",
"(",
"tru... | Initialize dates panel elements. | [
"Initialize",
"dates",
"panel",
"elements",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L580-L593 |
158,122 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.initDeactivationPanel | private void initDeactivationPanel() {
m_deactivationPanel.setVisible(false);
m_deactivationText.setText(Messages.get().key(Messages.GUI_SERIALDATE_DEACTIVE_TEXT_0));
} | java | private void initDeactivationPanel() {
m_deactivationPanel.setVisible(false);
m_deactivationText.setText(Messages.get().key(Messages.GUI_SERIALDATE_DEACTIVE_TEXT_0));
} | [
"private",
"void",
"initDeactivationPanel",
"(",
")",
"{",
"m_deactivationPanel",
".",
"setVisible",
"(",
"false",
")",
";",
"m_deactivationText",
".",
"setText",
"(",
"Messages",
".",
"get",
"(",
")",
".",
"key",
"(",
"Messages",
".",
"GUI_SERIALDATE_DEACTIVE_T... | Initialize elements of the panel displayed for the deactivated widget. | [
"Initialize",
"elements",
"of",
"the",
"panel",
"displayed",
"for",
"the",
"deactivated",
"widget",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L598-L603 |
158,123 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.initDurationButtonGroup | private void initDurationButtonGroup() {
m_groupDuration = new CmsRadioButtonGroup();
m_endsAfterRadioButton = new CmsRadioButton(
EndType.TIMES.toString(),
Messages.get().key(Messages.GUI_SERIALDATE_DURATION_ENDTYPE_OCC_0));
m_endsAfterRadioButton.setGroup(m_groupDurat... | java | private void initDurationButtonGroup() {
m_groupDuration = new CmsRadioButtonGroup();
m_endsAfterRadioButton = new CmsRadioButton(
EndType.TIMES.toString(),
Messages.get().key(Messages.GUI_SERIALDATE_DURATION_ENDTYPE_OCC_0));
m_endsAfterRadioButton.setGroup(m_groupDurat... | [
"private",
"void",
"initDurationButtonGroup",
"(",
")",
"{",
"m_groupDuration",
"=",
"new",
"CmsRadioButtonGroup",
"(",
")",
";",
"m_endsAfterRadioButton",
"=",
"new",
"CmsRadioButton",
"(",
"EndType",
".",
"TIMES",
".",
"toString",
"(",
")",
",",
"Messages",
".... | Configure all UI elements in the "ending"-options panel. | [
"Configure",
"all",
"UI",
"elements",
"in",
"the",
"ending",
"-",
"options",
"panel",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L608-L633 |
158,124 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.initDurationPanel | private void initDurationPanel() {
m_durationPrefixLabel.setText(Messages.get().key(Messages.GUI_SERIALDATE_DURATION_PREFIX_0));
m_durationAfterPostfixLabel.setText(Messages.get().key(Messages.GUI_SERIALDATE_DURATION_ENDTYPE_OCC_POSTFIX_0));
m_seriesEndDate.setDateOnly(true);
m_seriesEn... | java | private void initDurationPanel() {
m_durationPrefixLabel.setText(Messages.get().key(Messages.GUI_SERIALDATE_DURATION_PREFIX_0));
m_durationAfterPostfixLabel.setText(Messages.get().key(Messages.GUI_SERIALDATE_DURATION_ENDTYPE_OCC_POSTFIX_0));
m_seriesEndDate.setDateOnly(true);
m_seriesEn... | [
"private",
"void",
"initDurationPanel",
"(",
")",
"{",
"m_durationPrefixLabel",
".",
"setText",
"(",
"Messages",
".",
"get",
"(",
")",
".",
"key",
"(",
"Messages",
".",
"GUI_SERIALDATE_DURATION_PREFIX_0",
")",
")",
";",
"m_durationAfterPostfixLabel",
".",
"setText... | Initialize elements from the duration panel. | [
"Initialize",
"elements",
"from",
"the",
"duration",
"panel",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L636-L653 |
158,125 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.initExceptionsPanel | private void initExceptionsPanel() {
m_exceptionsPanel.setLegend(Messages.get().key(Messages.GUI_SERIALDATE_PANEL_EXCEPTIONS_0));
m_exceptionsPanel.addCloseHandler(this);
m_exceptionsPanel.setVisible(false);
} | java | private void initExceptionsPanel() {
m_exceptionsPanel.setLegend(Messages.get().key(Messages.GUI_SERIALDATE_PANEL_EXCEPTIONS_0));
m_exceptionsPanel.addCloseHandler(this);
m_exceptionsPanel.setVisible(false);
} | [
"private",
"void",
"initExceptionsPanel",
"(",
")",
"{",
"m_exceptionsPanel",
".",
"setLegend",
"(",
"Messages",
".",
"get",
"(",
")",
".",
"key",
"(",
"Messages",
".",
"GUI_SERIALDATE_PANEL_EXCEPTIONS_0",
")",
")",
";",
"m_exceptionsPanel",
".",
"addCloseHandler"... | Configure all UI elements in the exceptions panel. | [
"Configure",
"all",
"UI",
"elements",
"in",
"the",
"exceptions",
"panel",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L658-L663 |
158,126 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.initManagementPart | private void initManagementPart() {
m_manageExceptionsButton.setText(Messages.get().key(Messages.GUI_SERIALDATE_BUTTON_MANAGE_EXCEPTIONS_0));
m_manageExceptionsButton.getElement().getStyle().setFloat(Style.Float.RIGHT);
} | java | private void initManagementPart() {
m_manageExceptionsButton.setText(Messages.get().key(Messages.GUI_SERIALDATE_BUTTON_MANAGE_EXCEPTIONS_0));
m_manageExceptionsButton.getElement().getStyle().setFloat(Style.Float.RIGHT);
} | [
"private",
"void",
"initManagementPart",
"(",
")",
"{",
"m_manageExceptionsButton",
".",
"setText",
"(",
"Messages",
".",
"get",
"(",
")",
".",
"key",
"(",
"Messages",
".",
"GUI_SERIALDATE_BUTTON_MANAGE_EXCEPTIONS_0",
")",
")",
";",
"m_manageExceptionsButton",
".",
... | Initialize the ui elements for the management part. | [
"Initialize",
"the",
"ui",
"elements",
"for",
"the",
"management",
"part",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L668-L672 |
158,127 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.initPatternButtonGroup | private void initPatternButtonGroup() {
m_groupPattern = new CmsRadioButtonGroup();
m_patternButtons = new HashMap<>();
createAndAddButton(PatternType.DAILY, Messages.GUI_SERIALDATE_TYPE_DAILY_0);
m_patternButtons.put(PatternType.NONE, m_patternButtons.get(PatternType.DAILY));
... | java | private void initPatternButtonGroup() {
m_groupPattern = new CmsRadioButtonGroup();
m_patternButtons = new HashMap<>();
createAndAddButton(PatternType.DAILY, Messages.GUI_SERIALDATE_TYPE_DAILY_0);
m_patternButtons.put(PatternType.NONE, m_patternButtons.get(PatternType.DAILY));
... | [
"private",
"void",
"initPatternButtonGroup",
"(",
")",
"{",
"m_groupPattern",
"=",
"new",
"CmsRadioButtonGroup",
"(",
")",
";",
"m_patternButtons",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"createAndAddButton",
"(",
"PatternType",
".",
"DAILY",
",",
"Messages... | Initialize the pattern choice button group. | [
"Initialize",
"the",
"pattern",
"choice",
"button",
"group",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L711-L736 |
158,128 | alkacon/opencms-core | src/org/opencms/ui/apps/CmsAppView.java | CmsAppView.injectAdditionalStyles | private void injectAdditionalStyles() {
try {
Collection<String> stylesheets = OpenCms.getWorkplaceAppManager().getAdditionalStyleSheets();
for (String stylesheet : stylesheets) {
A_CmsUI.get().getPage().addDependency(new Dependency(Type.STYLESHEET, stylesheet));
... | java | private void injectAdditionalStyles() {
try {
Collection<String> stylesheets = OpenCms.getWorkplaceAppManager().getAdditionalStyleSheets();
for (String stylesheet : stylesheets) {
A_CmsUI.get().getPage().addDependency(new Dependency(Type.STYLESHEET, stylesheet));
... | [
"private",
"void",
"injectAdditionalStyles",
"(",
")",
"{",
"try",
"{",
"Collection",
"<",
"String",
">",
"stylesheets",
"=",
"OpenCms",
".",
"getWorkplaceAppManager",
"(",
")",
".",
"getAdditionalStyleSheets",
"(",
")",
";",
"for",
"(",
"String",
"stylesheet",
... | Inject external stylesheets. | [
"Inject",
"external",
"stylesheets",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/CmsAppView.java#L396-L406 |
158,129 | alkacon/opencms-core | src/org/opencms/ugc/CmsUgcActionElement.java | CmsUgcActionElement.createSessionForResource | public String createSessionForResource(String configPath, String fileName) throws CmsUgcException {
CmsUgcSession formSession = CmsUgcSessionFactory.getInstance().createSessionForFile(
getCmsObject(),
getRequest(),
configPath,
fileName);
return "" + formS... | java | public String createSessionForResource(String configPath, String fileName) throws CmsUgcException {
CmsUgcSession formSession = CmsUgcSessionFactory.getInstance().createSessionForFile(
getCmsObject(),
getRequest(),
configPath,
fileName);
return "" + formS... | [
"public",
"String",
"createSessionForResource",
"(",
"String",
"configPath",
",",
"String",
"fileName",
")",
"throws",
"CmsUgcException",
"{",
"CmsUgcSession",
"formSession",
"=",
"CmsUgcSessionFactory",
".",
"getInstance",
"(",
")",
".",
"createSessionForFile",
"(",
... | Creates a new form session to edit the file with the given name using the given form configuration.
@param configPath the site path of the form configuration
@param fileName the name (not path) of the XML content to edit
@return the id of the newly created form session
@throws CmsUgcException if something goes wrong | [
"Creates",
"a",
"new",
"form",
"session",
"to",
"edit",
"the",
"file",
"with",
"the",
"given",
"name",
"using",
"the",
"given",
"form",
"configuration",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ugc/CmsUgcActionElement.java#L63-L71 |
158,130 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java | CmsSerialDateValue.setValue | public final void setValue(String value) {
if ((null == value) || value.isEmpty()) {
setDefaultValue();
} else {
try {
tryToSetParsedValue(value);
} catch (@SuppressWarnings("unused") Exception e) {
CmsDebugLog.consoleLog("Could not se... | java | public final void setValue(String value) {
if ((null == value) || value.isEmpty()) {
setDefaultValue();
} else {
try {
tryToSetParsedValue(value);
} catch (@SuppressWarnings("unused") Exception e) {
CmsDebugLog.consoleLog("Could not se... | [
"public",
"final",
"void",
"setValue",
"(",
"String",
"value",
")",
"{",
"if",
"(",
"(",
"null",
"==",
"value",
")",
"||",
"value",
".",
"isEmpty",
"(",
")",
")",
"{",
"setDefaultValue",
"(",
")",
";",
"}",
"else",
"{",
"try",
"{",
"tryToSetParsedVal... | Set the value as provided.
@param value the serial date value as JSON string. | [
"Set",
"the",
"value",
"as",
"provided",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java#L75-L88 |
158,131 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java | CmsSerialDateValue.datesToJsonArray | private JSONValue datesToJsonArray(Collection<Date> dates) {
if (null != dates) {
JSONArray result = new JSONArray();
for (Date d : dates) {
result.set(result.size(), dateToJson(d));
}
return result;
}
return null;
} | java | private JSONValue datesToJsonArray(Collection<Date> dates) {
if (null != dates) {
JSONArray result = new JSONArray();
for (Date d : dates) {
result.set(result.size(), dateToJson(d));
}
return result;
}
return null;
} | [
"private",
"JSONValue",
"datesToJsonArray",
"(",
"Collection",
"<",
"Date",
">",
"dates",
")",
"{",
"if",
"(",
"null",
"!=",
"dates",
")",
"{",
"JSONArray",
"result",
"=",
"new",
"JSONArray",
"(",
")",
";",
"for",
"(",
"Date",
"d",
":",
"dates",
")",
... | Converts a collection of dates to a JSON array with the long representation of the dates as strings.
@param dates the list to convert.
@return JSON array with long values of dates as string | [
"Converts",
"a",
"collection",
"of",
"dates",
"to",
"a",
"JSON",
"array",
"with",
"the",
"long",
"representation",
"of",
"the",
"dates",
"as",
"strings",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java#L156-L166 |
158,132 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java | CmsSerialDateValue.dateToJson | private JSONValue dateToJson(Date d) {
return null != d ? new JSONString(Long.toString(d.getTime())) : null;
} | java | private JSONValue dateToJson(Date d) {
return null != d ? new JSONString(Long.toString(d.getTime())) : null;
} | [
"private",
"JSONValue",
"dateToJson",
"(",
"Date",
"d",
")",
"{",
"return",
"null",
"!=",
"d",
"?",
"new",
"JSONString",
"(",
"Long",
".",
"toString",
"(",
"d",
".",
"getTime",
"(",
")",
")",
")",
":",
"null",
";",
"}"
] | Convert a date to the String representation we use in the JSON.
@param d the date to convert
@return the String representation we use in the JSON. | [
"Convert",
"a",
"date",
"to",
"the",
"String",
"representation",
"we",
"use",
"in",
"the",
"JSON",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java#L173-L176 |
158,133 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java | CmsSerialDateValue.readOptionalBoolean | private Boolean readOptionalBoolean(JSONValue val) {
JSONBoolean b = null == val ? null : val.isBoolean();
if (b != null) {
return Boolean.valueOf(b.booleanValue());
}
return null;
} | java | private Boolean readOptionalBoolean(JSONValue val) {
JSONBoolean b = null == val ? null : val.isBoolean();
if (b != null) {
return Boolean.valueOf(b.booleanValue());
}
return null;
} | [
"private",
"Boolean",
"readOptionalBoolean",
"(",
"JSONValue",
"val",
")",
"{",
"JSONBoolean",
"b",
"=",
"null",
"==",
"val",
"?",
"null",
":",
"val",
".",
"isBoolean",
"(",
")",
";",
"if",
"(",
"b",
"!=",
"null",
")",
"{",
"return",
"Boolean",
".",
... | Read an optional boolean value form a JSON value.
@param val the JSON value that should represent the boolean.
@return the boolean from the JSON or null if reading the boolean fails. | [
"Read",
"an",
"optional",
"boolean",
"value",
"form",
"a",
"JSON",
"value",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java#L265-L272 |
158,134 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java | CmsSerialDateValue.readOptionalDate | private Date readOptionalDate(JSONValue val) {
JSONString str = null == val ? null : val.isString();
if (str != null) {
try {
return new Date(Long.parseLong(str.stringValue()));
} catch (@SuppressWarnings("unused") NumberFormatException e) {
// do... | java | private Date readOptionalDate(JSONValue val) {
JSONString str = null == val ? null : val.isString();
if (str != null) {
try {
return new Date(Long.parseLong(str.stringValue()));
} catch (@SuppressWarnings("unused") NumberFormatException e) {
// do... | [
"private",
"Date",
"readOptionalDate",
"(",
"JSONValue",
"val",
")",
"{",
"JSONString",
"str",
"=",
"null",
"==",
"val",
"?",
"null",
":",
"val",
".",
"isString",
"(",
")",
";",
"if",
"(",
"str",
"!=",
"null",
")",
"{",
"try",
"{",
"return",
"new",
... | Read an optional Date value form a JSON value.
@param val the JSON value that should represent the Date as long value in a string.
@return the Date from the JSON or null if reading the date fails. | [
"Read",
"an",
"optional",
"Date",
"value",
"form",
"a",
"JSON",
"value",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java#L279-L290 |
158,135 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java | CmsSerialDateValue.readOptionalInt | private int readOptionalInt(JSONValue val) {
JSONString str = null == val ? null : val.isString();
if (str != null) {
try {
return Integer.valueOf(str.stringValue()).intValue();
} catch (@SuppressWarnings("unused") NumberFormatException e) {
// Do... | java | private int readOptionalInt(JSONValue val) {
JSONString str = null == val ? null : val.isString();
if (str != null) {
try {
return Integer.valueOf(str.stringValue()).intValue();
} catch (@SuppressWarnings("unused") NumberFormatException e) {
// Do... | [
"private",
"int",
"readOptionalInt",
"(",
"JSONValue",
"val",
")",
"{",
"JSONString",
"str",
"=",
"null",
"==",
"val",
"?",
"null",
":",
"val",
".",
"isString",
"(",
")",
";",
"if",
"(",
"str",
"!=",
"null",
")",
"{",
"try",
"{",
"return",
"Integer",... | Read an optional int value form a JSON value.
@param val the JSON value that should represent the int.
@return the int from the JSON or 0 reading the int fails. | [
"Read",
"an",
"optional",
"int",
"value",
"form",
"a",
"JSON",
"value",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java#L297-L308 |
158,136 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java | CmsSerialDateValue.readOptionalMonth | private Month readOptionalMonth(JSONValue val) {
String str = readOptionalString(val);
if (null != str) {
try {
return Month.valueOf(str);
} catch (@SuppressWarnings("unused") IllegalArgumentException e) {
// Do nothing -return the default value
... | java | private Month readOptionalMonth(JSONValue val) {
String str = readOptionalString(val);
if (null != str) {
try {
return Month.valueOf(str);
} catch (@SuppressWarnings("unused") IllegalArgumentException e) {
// Do nothing -return the default value
... | [
"private",
"Month",
"readOptionalMonth",
"(",
"JSONValue",
"val",
")",
"{",
"String",
"str",
"=",
"readOptionalString",
"(",
"val",
")",
";",
"if",
"(",
"null",
"!=",
"str",
")",
"{",
"try",
"{",
"return",
"Month",
".",
"valueOf",
"(",
"str",
")",
";",... | Read an optional month value form a JSON value.
@param val the JSON value that should represent the month.
@return the month from the JSON or null if reading the month fails. | [
"Read",
"an",
"optional",
"month",
"value",
"form",
"a",
"JSON",
"value",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java#L315-L326 |
158,137 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java | CmsSerialDateValue.readOptionalString | private String readOptionalString(JSONValue val) {
JSONString str = null == val ? null : val.isString();
if (str != null) {
return str.stringValue();
}
return null;
} | java | private String readOptionalString(JSONValue val) {
JSONString str = null == val ? null : val.isString();
if (str != null) {
return str.stringValue();
}
return null;
} | [
"private",
"String",
"readOptionalString",
"(",
"JSONValue",
"val",
")",
"{",
"JSONString",
"str",
"=",
"null",
"==",
"val",
"?",
"null",
":",
"val",
".",
"isString",
"(",
")",
";",
"if",
"(",
"str",
"!=",
"null",
")",
"{",
"return",
"str",
".",
"str... | Read an optional string value form a JSON value.
@param val the JSON value that should represent the string.
@return the string from the JSON or null if reading the string fails. | [
"Read",
"an",
"optional",
"string",
"value",
"form",
"a",
"JSON",
"value",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java#L333-L340 |
158,138 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java | CmsSerialDateValue.readWeekDay | private WeekDay readWeekDay(JSONValue val) throws IllegalArgumentException {
String str = readOptionalString(val);
if (null != str) {
return WeekDay.valueOf(str);
}
throw new IllegalArgumentException();
} | java | private WeekDay readWeekDay(JSONValue val) throws IllegalArgumentException {
String str = readOptionalString(val);
if (null != str) {
return WeekDay.valueOf(str);
}
throw new IllegalArgumentException();
} | [
"private",
"WeekDay",
"readWeekDay",
"(",
"JSONValue",
"val",
")",
"throws",
"IllegalArgumentException",
"{",
"String",
"str",
"=",
"readOptionalString",
"(",
"val",
")",
";",
"if",
"(",
"null",
"!=",
"str",
")",
"{",
"return",
"WeekDay",
".",
"valueOf",
"("... | Read a single weekday from the provided JSON value.
@param val the value to read the week day from.
@return the week day read
@throws IllegalArgumentException thrown if the provided JSON value is not the representation of a week day. | [
"Read",
"a",
"single",
"weekday",
"from",
"the",
"provided",
"JSON",
"value",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java#L401-L408 |
158,139 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java | CmsSerialDateValue.toJsonStringList | private JSONValue toJsonStringList(Collection<? extends Object> list) {
if (null != list) {
JSONArray array = new JSONArray();
for (Object o : list) {
array.set(array.size(), new JSONString(o.toString()));
}
return array;
} else {
... | java | private JSONValue toJsonStringList(Collection<? extends Object> list) {
if (null != list) {
JSONArray array = new JSONArray();
for (Object o : list) {
array.set(array.size(), new JSONString(o.toString()));
}
return array;
} else {
... | [
"private",
"JSONValue",
"toJsonStringList",
"(",
"Collection",
"<",
"?",
"extends",
"Object",
">",
"list",
")",
"{",
"if",
"(",
"null",
"!=",
"list",
")",
"{",
"JSONArray",
"array",
"=",
"new",
"JSONArray",
"(",
")",
";",
"for",
"(",
"Object",
"o",
":"... | Convert a list of objects to a JSON array with the string representations of that objects.
@param list the list of objects.
@return the JSON array with the string representations. | [
"Convert",
"a",
"list",
"of",
"objects",
"to",
"a",
"JSON",
"array",
"with",
"the",
"string",
"representations",
"of",
"that",
"objects",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java#L461-L472 |
158,140 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java | CmsSerialDateValue.tryToSetParsedValue | private void tryToSetParsedValue(String value) throws Exception {
JSONObject json = JSONParser.parseStrict(value).isObject();
JSONValue val = json.get(JsonKey.START);
setStart(readOptionalDate(val));
val = json.get(JsonKey.END);
setEnd(readOptionalDate(val));
setWholeDay... | java | private void tryToSetParsedValue(String value) throws Exception {
JSONObject json = JSONParser.parseStrict(value).isObject();
JSONValue val = json.get(JsonKey.START);
setStart(readOptionalDate(val));
val = json.get(JsonKey.END);
setEnd(readOptionalDate(val));
setWholeDay... | [
"private",
"void",
"tryToSetParsedValue",
"(",
"String",
"value",
")",
"throws",
"Exception",
"{",
"JSONObject",
"json",
"=",
"JSONParser",
".",
"parseStrict",
"(",
"value",
")",
".",
"isObject",
"(",
")",
";",
"JSONValue",
"val",
"=",
"json",
".",
"get",
... | Try to set the value from the provided Json string.
@param value the value to set.
@throws Exception thrown if parsing fails. | [
"Try",
"to",
"set",
"the",
"value",
"from",
"the",
"provided",
"Json",
"string",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java#L479-L496 |
158,141 | alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspCategoryAccessBean.java | CmsJspCategoryAccessBean.getCategories | private static List<CmsCategory> getCategories(CmsObject cms, CmsResource resource) {
if ((null != resource) && (null != cms)) {
try {
return CmsCategoryService.getInstance().readResourceCategories(cms, resource);
} catch (CmsException e) {
LOG.error(e.ge... | java | private static List<CmsCategory> getCategories(CmsObject cms, CmsResource resource) {
if ((null != resource) && (null != cms)) {
try {
return CmsCategoryService.getInstance().readResourceCategories(cms, resource);
} catch (CmsException e) {
LOG.error(e.ge... | [
"private",
"static",
"List",
"<",
"CmsCategory",
">",
"getCategories",
"(",
"CmsObject",
"cms",
",",
"CmsResource",
"resource",
")",
"{",
"if",
"(",
"(",
"null",
"!=",
"resource",
")",
"&&",
"(",
"null",
"!=",
"cms",
")",
")",
"{",
"try",
"{",
"return"... | Reads the categories for the given resource.
@param cms the {@link CmsObject} used for reading the categories.
@param resource the resource for which the categories should be read.
@return the categories assigned to the given resource. | [
"Reads",
"the",
"categories",
"for",
"the",
"given",
"resource",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspCategoryAccessBean.java#L113-L123 |
158,142 | alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspCategoryAccessBean.java | CmsJspCategoryAccessBean.getLeafItems | public List<CmsCategory> getLeafItems() {
List<CmsCategory> result = new ArrayList<CmsCategory>();
if (m_categories.isEmpty()) {
return result;
}
Iterator<CmsCategory> it = m_categories.iterator();
CmsCategory current = it.next();
while (it.hasNext()) {
... | java | public List<CmsCategory> getLeafItems() {
List<CmsCategory> result = new ArrayList<CmsCategory>();
if (m_categories.isEmpty()) {
return result;
}
Iterator<CmsCategory> it = m_categories.iterator();
CmsCategory current = it.next();
while (it.hasNext()) {
... | [
"public",
"List",
"<",
"CmsCategory",
">",
"getLeafItems",
"(",
")",
"{",
"List",
"<",
"CmsCategory",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"CmsCategory",
">",
"(",
")",
";",
"if",
"(",
"m_categories",
".",
"isEmpty",
"(",
")",
")",
"{",
"return... | Returns only the leaf categories of the wrapped categories.
The method assumes that categories are ordered in the list, i.e., parents are directly followed by their children.
NOTE: In the complete category tree a leaf of the wrapped tree part may not be a leaf.
@return only the leaf categories of the wrapped categor... | [
"Returns",
"only",
"the",
"leaf",
"categories",
"of",
"the",
"wrapped",
"categories",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspCategoryAccessBean.java#L154-L171 |
158,143 | alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspCategoryAccessBean.java | CmsJspCategoryAccessBean.getSubCategories | public Map<String, CmsJspCategoryAccessBean> getSubCategories() {
if (m_subCategories == null) {
m_subCategories = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
@SuppressWarnings("synthetic-access")
public Object transform(Object pathPrefix) {
... | java | public Map<String, CmsJspCategoryAccessBean> getSubCategories() {
if (m_subCategories == null) {
m_subCategories = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
@SuppressWarnings("synthetic-access")
public Object transform(Object pathPrefix) {
... | [
"public",
"Map",
"<",
"String",
",",
"CmsJspCategoryAccessBean",
">",
"getSubCategories",
"(",
")",
"{",
"if",
"(",
"m_subCategories",
"==",
"null",
")",
"{",
"m_subCategories",
"=",
"CmsCollectionsGenericWrapper",
".",
"createLazyMap",
"(",
"new",
"Transformer",
... | Returns a map from a category path to the wrapper of all the sub-categories of the category with the path given as key.
@return a map from a category path to all sub-categories of the path's category. | [
"Returns",
"a",
"map",
"from",
"a",
"category",
"path",
"to",
"the",
"wrapper",
"of",
"all",
"the",
"sub",
"-",
"categories",
"of",
"the",
"category",
"with",
"the",
"path",
"given",
"as",
"key",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspCategoryAccessBean.java#L178-L192 |
158,144 | alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspCategoryAccessBean.java | CmsJspCategoryAccessBean.getTopItems | public List<CmsCategory> getTopItems() {
List<CmsCategory> categories = new ArrayList<CmsCategory>();
String matcher = Pattern.quote(m_mainCategoryPath) + "[^/]*/";
for (CmsCategory category : m_categories) {
if (category.getPath().matches(matcher)) {
categories.add(... | java | public List<CmsCategory> getTopItems() {
List<CmsCategory> categories = new ArrayList<CmsCategory>();
String matcher = Pattern.quote(m_mainCategoryPath) + "[^/]*/";
for (CmsCategory category : m_categories) {
if (category.getPath().matches(matcher)) {
categories.add(... | [
"public",
"List",
"<",
"CmsCategory",
">",
"getTopItems",
"(",
")",
"{",
"List",
"<",
"CmsCategory",
">",
"categories",
"=",
"new",
"ArrayList",
"<",
"CmsCategory",
">",
"(",
")",
";",
"String",
"matcher",
"=",
"Pattern",
".",
"quote",
"(",
"m_mainCategory... | Returns all categories that are direct children of the current main category.
@return all categories that are direct children of the current main category. | [
"Returns",
"all",
"categories",
"that",
"are",
"direct",
"children",
"of",
"the",
"current",
"main",
"category",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspCategoryAccessBean.java#L199-L209 |
158,145 | alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspImageBean.java | CmsJspImageBean.addHiDpiImage | public void addHiDpiImage(String factor, CmsJspImageBean image) {
if (m_hiDpiImages == null) {
m_hiDpiImages = CmsCollectionsGenericWrapper.createLazyMap(new CmsScaleHiDpiTransformer());
}
m_hiDpiImages.put(factor, image);
} | java | public void addHiDpiImage(String factor, CmsJspImageBean image) {
if (m_hiDpiImages == null) {
m_hiDpiImages = CmsCollectionsGenericWrapper.createLazyMap(new CmsScaleHiDpiTransformer());
}
m_hiDpiImages.put(factor, image);
} | [
"public",
"void",
"addHiDpiImage",
"(",
"String",
"factor",
",",
"CmsJspImageBean",
"image",
")",
"{",
"if",
"(",
"m_hiDpiImages",
"==",
"null",
")",
"{",
"m_hiDpiImages",
"=",
"CmsCollectionsGenericWrapper",
".",
"createLazyMap",
"(",
"new",
"CmsScaleHiDpiTransform... | adds a CmsJspImageBean as hi-DPI variant to this image
@param factor the variant multiplier, e.g. "2x" (the common retina multiplier)
@param image the image to be used for this variant | [
"adds",
"a",
"CmsJspImageBean",
"as",
"hi",
"-",
"DPI",
"variant",
"to",
"this",
"image"
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspImageBean.java#L362-L368 |
158,146 | alkacon/opencms-core | src/org/opencms/search/galleries/CmsGallerySearchResult.java | CmsGallerySearchResult.getRequiredSolrFields | public static final String[] getRequiredSolrFields() {
if (null == m_requiredSolrFields) {
List<Locale> locales = OpenCms.getLocaleManager().getAvailableLocales();
m_requiredSolrFields = new String[14 + (locales.size() * 6)];
int count = 0;
m_requiredSolrFields[c... | java | public static final String[] getRequiredSolrFields() {
if (null == m_requiredSolrFields) {
List<Locale> locales = OpenCms.getLocaleManager().getAvailableLocales();
m_requiredSolrFields = new String[14 + (locales.size() * 6)];
int count = 0;
m_requiredSolrFields[c... | [
"public",
"static",
"final",
"String",
"[",
"]",
"getRequiredSolrFields",
"(",
")",
"{",
"if",
"(",
"null",
"==",
"m_requiredSolrFields",
")",
"{",
"List",
"<",
"Locale",
">",
"locales",
"=",
"OpenCms",
".",
"getLocaleManager",
"(",
")",
".",
"getAvailableLo... | Returns the list of Solr fields a search result must have to initialize the gallery search result correctly.
@return the list of Solr fields. | [
"Returns",
"the",
"list",
"of",
"Solr",
"fields",
"a",
"search",
"result",
"must",
"have",
"to",
"initialize",
"the",
"gallery",
"search",
"result",
"correctly",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/galleries/CmsGallerySearchResult.java#L297-L339 |
158,147 | alkacon/opencms-core | src/org/opencms/ui/favorites/CmsPageEditorFavoriteContext.java | CmsPageEditorFavoriteContext.toUuid | private static CmsUUID toUuid(String uuid) {
if ("null".equals(uuid) || CmsStringUtil.isEmpty(uuid)) {
return null;
}
return new CmsUUID(uuid);
} | java | private static CmsUUID toUuid(String uuid) {
if ("null".equals(uuid) || CmsStringUtil.isEmpty(uuid)) {
return null;
}
return new CmsUUID(uuid);
} | [
"private",
"static",
"CmsUUID",
"toUuid",
"(",
"String",
"uuid",
")",
"{",
"if",
"(",
"\"null\"",
".",
"equals",
"(",
"uuid",
")",
"||",
"CmsStringUtil",
".",
"isEmpty",
"(",
"uuid",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"new",
"CmsUUID"... | Converts string to UUID and returns it, or null if the conversion is not possible.
@param uuid the potential UUID string
@return the UUID, or null if conversion is not possible | [
"Converts",
"string",
"to",
"UUID",
"and",
"returns",
"it",
"or",
"null",
"if",
"the",
"conversion",
"is",
"not",
"possible",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/favorites/CmsPageEditorFavoriteContext.java#L85-L92 |
158,148 | alkacon/opencms-core | src/org/opencms/search/CmsSearchManager.java | CmsSearchManager.ensureIndexIsUnlocked | private void ensureIndexIsUnlocked(String dataDir) {
Collection<File> lockFiles = new ArrayList<File>(2);
lockFiles.add(
new File(
CmsFileUtil.addTrailingSeparator(CmsFileUtil.addTrailingSeparator(dataDir) + "index") + "write.lock"));
lockFiles.add(
new F... | java | private void ensureIndexIsUnlocked(String dataDir) {
Collection<File> lockFiles = new ArrayList<File>(2);
lockFiles.add(
new File(
CmsFileUtil.addTrailingSeparator(CmsFileUtil.addTrailingSeparator(dataDir) + "index") + "write.lock"));
lockFiles.add(
new F... | [
"private",
"void",
"ensureIndexIsUnlocked",
"(",
"String",
"dataDir",
")",
"{",
"Collection",
"<",
"File",
">",
"lockFiles",
"=",
"new",
"ArrayList",
"<",
"File",
">",
"(",
"2",
")",
";",
"lockFiles",
".",
"add",
"(",
"new",
"File",
"(",
"CmsFileUtil",
"... | Remove write.lock file in the data directory to ensure the index is unlocked.
@param dataDir the data directory of the Solr index that should be unlocked. | [
"Remove",
"write",
".",
"lock",
"file",
"in",
"the",
"data",
"directory",
"to",
"ensure",
"the",
"index",
"is",
"unlocked",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/CmsSearchManager.java#L3157-L3178 |
158,149 | alkacon/opencms-core | src-gwt/org/opencms/gwt/client/ui/CmsScrollPanelImpl.java | CmsScrollPanelImpl.maybeUpdateScrollbarPositions | private void maybeUpdateScrollbarPositions() {
if (!isAttached()) {
return;
}
if (m_scrollbar != null) {
int vPos = getVerticalScrollPosition();
if (m_scrollbar.getVerticalScrollPosition() != vPos) {
m_scrollbar.setVerticalScrollPosi... | java | private void maybeUpdateScrollbarPositions() {
if (!isAttached()) {
return;
}
if (m_scrollbar != null) {
int vPos = getVerticalScrollPosition();
if (m_scrollbar.getVerticalScrollPosition() != vPos) {
m_scrollbar.setVerticalScrollPosi... | [
"private",
"void",
"maybeUpdateScrollbarPositions",
"(",
")",
"{",
"if",
"(",
"!",
"isAttached",
"(",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"m_scrollbar",
"!=",
"null",
")",
"{",
"int",
"vPos",
"=",
"getVerticalScrollPosition",
"(",
")",
";",
"if... | Synchronize the scroll positions of the scrollbars with the actual scroll
position of the content. | [
"Synchronize",
"the",
"scroll",
"positions",
"of",
"the",
"scrollbars",
"with",
"the",
"actual",
"scroll",
"position",
"of",
"the",
"content",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsScrollPanelImpl.java#L351-L363 |
158,150 | alkacon/opencms-core | src-gwt/org/opencms/gwt/client/ui/CmsScrollPanelImpl.java | CmsScrollPanelImpl.setVerticalScrollbar | private void setVerticalScrollbar(final CmsScrollBar scrollbar, int width) {
// Validate.
if ((scrollbar == m_scrollbar) || (scrollbar == null)) {
return;
}
// Detach new child.
scrollbar.asWidget().removeFromParent();
// Remove old child.
... | java | private void setVerticalScrollbar(final CmsScrollBar scrollbar, int width) {
// Validate.
if ((scrollbar == m_scrollbar) || (scrollbar == null)) {
return;
}
// Detach new child.
scrollbar.asWidget().removeFromParent();
// Remove old child.
... | [
"private",
"void",
"setVerticalScrollbar",
"(",
"final",
"CmsScrollBar",
"scrollbar",
",",
"int",
"width",
")",
"{",
"// Validate.\r",
"if",
"(",
"(",
"scrollbar",
"==",
"m_scrollbar",
")",
"||",
"(",
"scrollbar",
"==",
"null",
")",
")",
"{",
"return",
";",
... | Set the scrollbar used for vertical scrolling.
@param scrollbar the scrollbar, or null to clear it
@param width the width of the scrollbar in pixels | [
"Set",
"the",
"scrollbar",
"used",
"for",
"vertical",
"scrolling",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsScrollPanelImpl.java#L416-L454 |
158,151 | alkacon/opencms-core | src/org/opencms/jsp/util/UAgentInfo.java | UAgentInfo.detectBlackBerryHigh | public boolean detectBlackBerryHigh() {
//Disambiguate for BlackBerry OS 6 or 7 (WebKit) browser
if (detectBlackBerryWebKit()) {
return false;
}
if (detectBlackBerry()) {
if (detectBlackBerryTouch()
|| (userAgent.indexOf(deviceBBBold) != -... | java | public boolean detectBlackBerryHigh() {
//Disambiguate for BlackBerry OS 6 or 7 (WebKit) browser
if (detectBlackBerryWebKit()) {
return false;
}
if (detectBlackBerry()) {
if (detectBlackBerryTouch()
|| (userAgent.indexOf(deviceBBBold) != -... | [
"public",
"boolean",
"detectBlackBerryHigh",
"(",
")",
"{",
"//Disambiguate for BlackBerry OS 6 or 7 (WebKit) browser\r",
"if",
"(",
"detectBlackBerryWebKit",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"detectBlackBerry",
"(",
")",
")",
"{",
"if",
... | Detects if the current browser is a BlackBerry device AND
has a more capable recent browser. Excludes the Playbook.
Examples, Storm, Bold, Tour, Curve2
Excludes the new BlackBerry OS 6 and 7 browser!!
@return detection of a Blackberry device with a better browser | [
"Detects",
"if",
"the",
"current",
"browser",
"is",
"a",
"BlackBerry",
"device",
"AND",
"has",
"a",
"more",
"capable",
"recent",
"browser",
".",
"Excludes",
"the",
"Playbook",
".",
"Examples",
"Storm",
"Bold",
"Tour",
"Curve2",
"Excludes",
"the",
"new",
"Bla... | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/UAgentInfo.java#L382-L400 |
158,152 | alkacon/opencms-core | src/org/opencms/jsp/util/UAgentInfo.java | UAgentInfo.detectBlackBerryTouch | public boolean detectBlackBerryTouch() {
if (detectBlackBerry()
&& ((userAgent.indexOf(deviceBBStorm) != -1)
|| (userAgent.indexOf(deviceBBTorch) != -1)
|| (userAgent.indexOf(deviceBBBoldTouch) != -1)
|| (userAgent.indexOf(deviceBBCurveTouch) !=... | java | public boolean detectBlackBerryTouch() {
if (detectBlackBerry()
&& ((userAgent.indexOf(deviceBBStorm) != -1)
|| (userAgent.indexOf(deviceBBTorch) != -1)
|| (userAgent.indexOf(deviceBBBoldTouch) != -1)
|| (userAgent.indexOf(deviceBBCurveTouch) !=... | [
"public",
"boolean",
"detectBlackBerryTouch",
"(",
")",
"{",
"if",
"(",
"detectBlackBerry",
"(",
")",
"&&",
"(",
"(",
"userAgent",
".",
"indexOf",
"(",
"deviceBBStorm",
")",
"!=",
"-",
"1",
")",
"||",
"(",
"userAgent",
".",
"indexOf",
"(",
"deviceBBTorch",... | Detects if the current browser is a BlackBerry Touch
device, such as the Storm, Torch, and Bold Touch. Excludes the Playbook.
@return detection of a Blackberry touchscreen device | [
"Detects",
"if",
"the",
"current",
"browser",
"is",
"a",
"BlackBerry",
"Touch",
"device",
"such",
"as",
"the",
"Storm",
"Torch",
"and",
"Bold",
"Touch",
".",
"Excludes",
"the",
"Playbook",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/UAgentInfo.java#L440-L450 |
158,153 | alkacon/opencms-core | src/org/opencms/jsp/util/UAgentInfo.java | UAgentInfo.detectMobileQuick | public boolean detectMobileQuick() {
//Let's exclude tablets
if (isTierTablet) {
return false;
}
//Most mobile browsing is done on smartphones
if (detectSmartphone()) {
return true;
}
//Catch-all for many mobile devices
... | java | public boolean detectMobileQuick() {
//Let's exclude tablets
if (isTierTablet) {
return false;
}
//Most mobile browsing is done on smartphones
if (detectSmartphone()) {
return true;
}
//Catch-all for many mobile devices
... | [
"public",
"boolean",
"detectMobileQuick",
"(",
")",
"{",
"//Let's exclude tablets\r",
"if",
"(",
"isTierTablet",
")",
"{",
"return",
"false",
";",
"}",
"//Most mobile browsing is done on smartphones\r",
"if",
"(",
"detectSmartphone",
"(",
")",
")",
"{",
"return",
"t... | Detects if the current device is a mobile device.
This method catches most of the popular modern devices.
Excludes Apple iPads and other modern tablets.
@return detection of any mobile device using the quicker method | [
"Detects",
"if",
"the",
"current",
"device",
"is",
"a",
"mobile",
"device",
".",
"This",
"method",
"catches",
"most",
"of",
"the",
"popular",
"modern",
"devices",
".",
"Excludes",
"Apple",
"iPads",
"and",
"other",
"modern",
"tablets",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/UAgentInfo.java#L763-L797 |
158,154 | alkacon/opencms-core | src/org/opencms/jsp/util/UAgentInfo.java | UAgentInfo.detectNintendo | public boolean detectNintendo() {
if ((userAgent.indexOf(deviceNintendo) != -1)
|| (userAgent.indexOf(deviceWii) != -1)
|| (userAgent.indexOf(deviceNintendoDs) != -1)) {
return true;
}
return false;
} | java | public boolean detectNintendo() {
if ((userAgent.indexOf(deviceNintendo) != -1)
|| (userAgent.indexOf(deviceWii) != -1)
|| (userAgent.indexOf(deviceNintendoDs) != -1)) {
return true;
}
return false;
} | [
"public",
"boolean",
"detectNintendo",
"(",
")",
"{",
"if",
"(",
"(",
"userAgent",
".",
"indexOf",
"(",
"deviceNintendo",
")",
"!=",
"-",
"1",
")",
"||",
"(",
"userAgent",
".",
"indexOf",
"(",
"deviceWii",
")",
"!=",
"-",
"1",
")",
"||",
"(",
"userAg... | Detects if the current device is a Nintendo game device.
@return detection of Nintendo | [
"Detects",
"if",
"the",
"current",
"device",
"is",
"a",
"Nintendo",
"game",
"device",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/UAgentInfo.java#L803-L811 |
158,155 | alkacon/opencms-core | src/org/opencms/jsp/util/UAgentInfo.java | UAgentInfo.detectOperaMobile | public boolean detectOperaMobile() {
if ((userAgent.indexOf(engineOpera) != -1)
&& ((userAgent.indexOf(mini) != -1) || (userAgent.indexOf(mobi) != -1))) {
return true;
}
return false;
} | java | public boolean detectOperaMobile() {
if ((userAgent.indexOf(engineOpera) != -1)
&& ((userAgent.indexOf(mini) != -1) || (userAgent.indexOf(mobi) != -1))) {
return true;
}
return false;
} | [
"public",
"boolean",
"detectOperaMobile",
"(",
")",
"{",
"if",
"(",
"(",
"userAgent",
".",
"indexOf",
"(",
"engineOpera",
")",
"!=",
"-",
"1",
")",
"&&",
"(",
"(",
"userAgent",
".",
"indexOf",
"(",
"mini",
")",
"!=",
"-",
"1",
")",
"||",
"(",
"user... | Detects Opera Mobile or Opera Mini.
@return detection of an Opera browser for a mobile device | [
"Detects",
"Opera",
"Mobile",
"or",
"Opera",
"Mini",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/UAgentInfo.java#L817-L824 |
158,156 | alkacon/opencms-core | src/org/opencms/jsp/util/UAgentInfo.java | UAgentInfo.detectSonyMylo | public boolean detectSonyMylo() {
if ((userAgent.indexOf(manuSony) != -1)
&& ((userAgent.indexOf(qtembedded) != -1) || (userAgent.indexOf(mylocom2) != -1))) {
return true;
}
return false;
} | java | public boolean detectSonyMylo() {
if ((userAgent.indexOf(manuSony) != -1)
&& ((userAgent.indexOf(qtembedded) != -1) || (userAgent.indexOf(mylocom2) != -1))) {
return true;
}
return false;
} | [
"public",
"boolean",
"detectSonyMylo",
"(",
")",
"{",
"if",
"(",
"(",
"userAgent",
".",
"indexOf",
"(",
"manuSony",
")",
"!=",
"-",
"1",
")",
"&&",
"(",
"(",
"userAgent",
".",
"indexOf",
"(",
"qtembedded",
")",
"!=",
"-",
"1",
")",
"||",
"(",
"user... | Detects if the current browser is a Sony Mylo device.
@return detection of a Sony Mylo device | [
"Detects",
"if",
"the",
"current",
"browser",
"is",
"a",
"Sony",
"Mylo",
"device",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/UAgentInfo.java#L918-L925 |
158,157 | alkacon/opencms-core | src/org/opencms/jsp/util/UAgentInfo.java | UAgentInfo.detectTierIphone | public boolean detectTierIphone() {
if (detectIphoneOrIpod()
|| detectAndroidPhone()
|| detectWindowsPhone()
|| detectBlackBerry10Phone()
|| (detectBlackBerryWebKit() && detectBlackBerryTouch())
|| detectPalmWebOS()
|| detectBada()... | java | public boolean detectTierIphone() {
if (detectIphoneOrIpod()
|| detectAndroidPhone()
|| detectWindowsPhone()
|| detectBlackBerry10Phone()
|| (detectBlackBerryWebKit() && detectBlackBerryTouch())
|| detectPalmWebOS()
|| detectBada()... | [
"public",
"boolean",
"detectTierIphone",
"(",
")",
"{",
"if",
"(",
"detectIphoneOrIpod",
"(",
")",
"||",
"detectAndroidPhone",
"(",
")",
"||",
"detectWindowsPhone",
"(",
")",
"||",
"detectBlackBerry10Phone",
"(",
")",
"||",
"(",
"detectBlackBerryWebKit",
"(",
")... | The quick way to detect for a tier of devices.
This method detects for devices which can
display iPhone-optimized web content.
Includes iPhone, iPod Touch, Android, Windows Phone 7 and 8, BB10, WebOS, Playstation Vita, etc.
@return detection of any device in the iPhone/Android/Windows Phone/BlackBerry/WebOS Tier | [
"The",
"quick",
"way",
"to",
"detect",
"for",
"a",
"tier",
"of",
"devices",
".",
"This",
"method",
"detects",
"for",
"devices",
"which",
"can",
"display",
"iPhone",
"-",
"optimized",
"web",
"content",
".",
"Includes",
"iPhone",
"iPod",
"Touch",
"Android",
... | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/UAgentInfo.java#L965-L982 |
158,158 | alkacon/opencms-core | src/org/opencms/jsp/util/UAgentInfo.java | UAgentInfo.detectTierRichCss | public boolean detectTierRichCss() {
boolean result = false;
//The following devices are explicitly ok.
//Note: 'High' BlackBerry devices ONLY
if (detectMobileQuick()) {
//Exclude iPhone Tier and e-Ink Kindle devices.
if (!detectTierIphone() && !detectKi... | java | public boolean detectTierRichCss() {
boolean result = false;
//The following devices are explicitly ok.
//Note: 'High' BlackBerry devices ONLY
if (detectMobileQuick()) {
//Exclude iPhone Tier and e-Ink Kindle devices.
if (!detectTierIphone() && !detectKi... | [
"public",
"boolean",
"detectTierRichCss",
"(",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"//The following devices are explicitly ok.\r",
"//Note: 'High' BlackBerry devices ONLY\r",
"if",
"(",
"detectMobileQuick",
"(",
")",
")",
"{",
"//Exclude iPhone Tier and e-Ink Ki... | The quick way to detect for a tier of devices.
This method detects for devices which are likely to be capable
of viewing CSS content optimized for the iPhone,
but may not necessarily support JavaScript.
Excludes all iPhone Tier devices.
@return detection of any device in the 'Rich CSS' Tier | [
"The",
"quick",
"way",
"to",
"detect",
"for",
"a",
"tier",
"of",
"devices",
".",
"This",
"method",
"detects",
"for",
"devices",
"which",
"are",
"likely",
"to",
"be",
"capable",
"of",
"viewing",
"CSS",
"content",
"optimized",
"for",
"the",
"iPhone",
"but",
... | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/UAgentInfo.java#L1007-L1030 |
158,159 | alkacon/opencms-core | src/org/opencms/widgets/serialdate/CmsSerialDateBeanMonthly.java | CmsSerialDateBeanMonthly.setCorrectDay | private void setCorrectDay(Calendar date) {
if (monthHasNotDay(date)) {
date.set(Calendar.DAY_OF_MONTH, date.getActualMaximum(Calendar.DAY_OF_MONTH));
} else {
date.set(Calendar.DAY_OF_MONTH, m_dayOfMonth);
}
} | java | private void setCorrectDay(Calendar date) {
if (monthHasNotDay(date)) {
date.set(Calendar.DAY_OF_MONTH, date.getActualMaximum(Calendar.DAY_OF_MONTH));
} else {
date.set(Calendar.DAY_OF_MONTH, m_dayOfMonth);
}
} | [
"private",
"void",
"setCorrectDay",
"(",
"Calendar",
"date",
")",
"{",
"if",
"(",
"monthHasNotDay",
"(",
"date",
")",
")",
"{",
"date",
".",
"set",
"(",
"Calendar",
".",
"DAY_OF_MONTH",
",",
"date",
".",
"getActualMaximum",
"(",
"Calendar",
".",
"DAY_OF_MO... | Set the correct day for the date with year and month already fixed.
@param date the date, where year and month are already correct. | [
"Set",
"the",
"correct",
"day",
"for",
"the",
"date",
"with",
"year",
"and",
"month",
"already",
"fixed",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/serialdate/CmsSerialDateBeanMonthly.java#L126-L133 |
158,160 | alkacon/opencms-core | src-setup/org/opencms/setup/CmsSetupBean.java | CmsSetupBean.getDbProperty | public String getDbProperty(String key) {
// extract the database key out of the entire key
String databaseKey = key.substring(0, key.indexOf('.'));
Properties databaseProperties = getDatabaseProperties().get(databaseKey);
return databaseProperties.getProperty(key, "");
} | java | public String getDbProperty(String key) {
// extract the database key out of the entire key
String databaseKey = key.substring(0, key.indexOf('.'));
Properties databaseProperties = getDatabaseProperties().get(databaseKey);
return databaseProperties.getProperty(key, "");
} | [
"public",
"String",
"getDbProperty",
"(",
"String",
"key",
")",
"{",
"// extract the database key out of the entire key",
"String",
"databaseKey",
"=",
"key",
".",
"substring",
"(",
"0",
",",
"key",
".",
"indexOf",
"(",
"'",
"'",
")",
")",
";",
"Properties",
"... | Returns the value for a given key from the database properties.
@param key the property key
@return the string value for a given key | [
"Returns",
"the",
"value",
"for",
"a",
"given",
"key",
"from",
"the",
"database",
"properties",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/CmsSetupBean.java#L714-L721 |
158,161 | alkacon/opencms-core | src-setup/org/opencms/setup/CmsSetupBean.java | CmsSetupBean.isChecked | public String isChecked(String value1, String value2) {
if ((value1 == null) || (value2 == null)) {
return "";
}
if (value1.trim().equalsIgnoreCase(value2.trim())) {
return "checked";
}
return "";
} | java | public String isChecked(String value1, String value2) {
if ((value1 == null) || (value2 == null)) {
return "";
}
if (value1.trim().equalsIgnoreCase(value2.trim())) {
return "checked";
}
return "";
} | [
"public",
"String",
"isChecked",
"(",
"String",
"value1",
",",
"String",
"value2",
")",
"{",
"if",
"(",
"(",
"value1",
"==",
"null",
")",
"||",
"(",
"value2",
"==",
"null",
")",
")",
"{",
"return",
"\"\"",
";",
"}",
"if",
"(",
"value1",
".",
"trim"... | Over simplistic helper to compare two strings to check radio buttons.
@param value1 the first value
@param value2 the second value
@return "checked" if both values are equal, the empty String "" otherwise | [
"Over",
"simplistic",
"helper",
"to",
"compare",
"two",
"strings",
"to",
"check",
"radio",
"buttons",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/CmsSetupBean.java#L1393-L1404 |
158,162 | alkacon/opencms-core | src/org/opencms/db/CmsLoginManager.java | CmsLoginManager.canLockBecauseOfInactivity | public boolean canLockBecauseOfInactivity(CmsObject cms, CmsUser user) {
return !user.isManaged()
&& !user.isWebuser()
&& !OpenCms.getDefaultUsers().isDefaultUser(user.getName())
&& !OpenCms.getRoleManager().hasRole(cms, user.getName(), CmsRole.ROOT_ADMIN);
} | java | public boolean canLockBecauseOfInactivity(CmsObject cms, CmsUser user) {
return !user.isManaged()
&& !user.isWebuser()
&& !OpenCms.getDefaultUsers().isDefaultUser(user.getName())
&& !OpenCms.getRoleManager().hasRole(cms, user.getName(), CmsRole.ROOT_ADMIN);
} | [
"public",
"boolean",
"canLockBecauseOfInactivity",
"(",
"CmsObject",
"cms",
",",
"CmsUser",
"user",
")",
"{",
"return",
"!",
"user",
".",
"isManaged",
"(",
")",
"&&",
"!",
"user",
".",
"isWebuser",
"(",
")",
"&&",
"!",
"OpenCms",
".",
"getDefaultUsers",
"(... | Checks whether a user account can be locked because of inactivity.
@param cms the CMS context
@param user the user to check
@return true if the user may be locked after being inactive for too long | [
"Checks",
"whether",
"a",
"user",
"account",
"can",
"be",
"locked",
"because",
"of",
"inactivity",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsLoginManager.java#L265-L271 |
158,163 | alkacon/opencms-core | src/org/opencms/ui/apps/logfile/CmsLogFileApp.java | CmsLogFileApp.addDownloadButton | private void addDownloadButton(final CmsLogFileView view) {
Button button = CmsToolBar.createButton(
FontOpenCms.DOWNLOAD,
CmsVaadinUtils.getMessageText(Messages.GUI_LOGFILE_DOWNLOAD_0));
button.addClickListener(new ClickListener() {
private static final long serial... | java | private void addDownloadButton(final CmsLogFileView view) {
Button button = CmsToolBar.createButton(
FontOpenCms.DOWNLOAD,
CmsVaadinUtils.getMessageText(Messages.GUI_LOGFILE_DOWNLOAD_0));
button.addClickListener(new ClickListener() {
private static final long serial... | [
"private",
"void",
"addDownloadButton",
"(",
"final",
"CmsLogFileView",
"view",
")",
"{",
"Button",
"button",
"=",
"CmsToolBar",
".",
"createButton",
"(",
"FontOpenCms",
".",
"DOWNLOAD",
",",
"CmsVaadinUtils",
".",
"getMessageText",
"(",
"Messages",
".",
"GUI_LOGF... | Adds the download button.
@param view layout which displays the log file | [
"Adds",
"the",
"download",
"button",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/logfile/CmsLogFileApp.java#L253-L271 |
158,164 | alkacon/opencms-core | src/org/opencms/cmis/CmsCmisUtil.java | CmsCmisUtil.addPropertyDefault | @SuppressWarnings("unchecked")
public static boolean addPropertyDefault(PropertiesImpl props, PropertyDefinition<?> propDef) {
if ((props == null) || (props.getProperties() == null)) {
throw new IllegalArgumentException("Props must not be null!");
}
if (propDef == null) ... | java | @SuppressWarnings("unchecked")
public static boolean addPropertyDefault(PropertiesImpl props, PropertyDefinition<?> propDef) {
if ((props == null) || (props.getProperties() == null)) {
throw new IllegalArgumentException("Props must not be null!");
}
if (propDef == null) ... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"boolean",
"addPropertyDefault",
"(",
"PropertiesImpl",
"props",
",",
"PropertyDefinition",
"<",
"?",
">",
"propDef",
")",
"{",
"if",
"(",
"(",
"props",
"==",
"null",
")",
"||",
"(",
"pr... | Adds the default value of property if defined.
@param props the Properties object
@param propDef the property definition
@return true if the property could be added | [
"Adds",
"the",
"default",
"value",
"of",
"property",
"if",
"defined",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/cmis/CmsCmisUtil.java#L215-L261 |
158,165 | alkacon/opencms-core | src/org/opencms/cmis/CmsCmisUtil.java | CmsCmisUtil.checkAddProperty | public static boolean checkAddProperty(
CmsCmisTypeManager typeManager,
Properties properties,
String typeId,
Set<String> filter,
String id) {
if ((properties == null) || (properties.getProperties() == null)) {
throw new IllegalArgumentException("Prop... | java | public static boolean checkAddProperty(
CmsCmisTypeManager typeManager,
Properties properties,
String typeId,
Set<String> filter,
String id) {
if ((properties == null) || (properties.getProperties() == null)) {
throw new IllegalArgumentException("Prop... | [
"public",
"static",
"boolean",
"checkAddProperty",
"(",
"CmsCmisTypeManager",
"typeManager",
",",
"Properties",
"properties",
",",
"String",
"typeId",
",",
"Set",
"<",
"String",
">",
"filter",
",",
"String",
"id",
")",
"{",
"if",
"(",
"(",
"properties",
"==",
... | Checks whether a property can be added to a Properties.
@param typeManager
@param properties the properties object
@param typeId the type id
@param filter the property filter
@param id the property id
@return true if the property should be added | [
"Checks",
"whether",
"a",
"property",
"can",
"be",
"added",
"to",
"a",
"Properties",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/cmis/CmsCmisUtil.java#L373-L407 |
158,166 | alkacon/opencms-core | src/org/opencms/cmis/CmsCmisUtil.java | CmsCmisUtil.millisToCalendar | public static GregorianCalendar millisToCalendar(long millis) {
GregorianCalendar result = new GregorianCalendar();
result.setTimeZone(TimeZone.getTimeZone("GMT"));
result.setTimeInMillis((long)(Math.ceil(millis / 1000) * 1000));
return result;
} | java | public static GregorianCalendar millisToCalendar(long millis) {
GregorianCalendar result = new GregorianCalendar();
result.setTimeZone(TimeZone.getTimeZone("GMT"));
result.setTimeInMillis((long)(Math.ceil(millis / 1000) * 1000));
return result;
} | [
"public",
"static",
"GregorianCalendar",
"millisToCalendar",
"(",
"long",
"millis",
")",
"{",
"GregorianCalendar",
"result",
"=",
"new",
"GregorianCalendar",
"(",
")",
";",
"result",
".",
"setTimeZone",
"(",
"TimeZone",
".",
"getTimeZone",
"(",
"\"GMT\"",
")",
"... | Converts milliseconds into a calendar object.
@param millis a time given in milliseconds after epoch
@return the calendar object for the given time | [
"Converts",
"milliseconds",
"into",
"a",
"calendar",
"object",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/cmis/CmsCmisUtil.java#L580-L586 |
158,167 | alkacon/opencms-core | src-gwt/org/opencms/gwt/client/ui/input/CmsTextArea.java | CmsTextArea.updateGhostStyle | private void updateGhostStyle() {
if (CmsStringUtil.isEmpty(m_realValue)) {
if (CmsStringUtil.isEmpty(m_ghostValue)) {
updateTextArea(m_realValue);
return;
}
if (!m_focus) {
setGhostStyleEnabled(true);
updateTex... | java | private void updateGhostStyle() {
if (CmsStringUtil.isEmpty(m_realValue)) {
if (CmsStringUtil.isEmpty(m_ghostValue)) {
updateTextArea(m_realValue);
return;
}
if (!m_focus) {
setGhostStyleEnabled(true);
updateTex... | [
"private",
"void",
"updateGhostStyle",
"(",
")",
"{",
"if",
"(",
"CmsStringUtil",
".",
"isEmpty",
"(",
"m_realValue",
")",
")",
"{",
"if",
"(",
"CmsStringUtil",
".",
"isEmpty",
"(",
"m_ghostValue",
")",
")",
"{",
"updateTextArea",
"(",
"m_realValue",
")",
... | Updates the styling and content of the internal text area based on the real value, the ghost value, and whether
it has focus. | [
"Updates",
"the",
"styling",
"and",
"content",
"of",
"the",
"internal",
"text",
"area",
"based",
"on",
"the",
"real",
"value",
"the",
"ghost",
"value",
"and",
"whether",
"it",
"has",
"focus",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/CmsTextArea.java#L618-L636 |
158,168 | alkacon/opencms-core | src/org/opencms/widgets/CmsCategoryWidget.java | CmsCategoryWidget.generateCommonConfigPart | private Map<String, String> generateCommonConfigPart() {
Map<String, String> result = new HashMap<>();
if (m_category != null) {
result.put(CONFIGURATION_CATEGORY, m_category);
}
// append 'only leafs' to configuration
if (m_onlyLeafs) {
result.put(CONFIG... | java | private Map<String, String> generateCommonConfigPart() {
Map<String, String> result = new HashMap<>();
if (m_category != null) {
result.put(CONFIGURATION_CATEGORY, m_category);
}
// append 'only leafs' to configuration
if (m_onlyLeafs) {
result.put(CONFIG... | [
"private",
"Map",
"<",
"String",
",",
"String",
">",
"generateCommonConfigPart",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"result",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"if",
"(",
"m_category",
"!=",
"null",
")",
"{",
"result",
... | Helper to generate the common configuration part for client-side and server-side widget.
@return the common configuration options as map | [
"Helper",
"to",
"generate",
"the",
"common",
"configuration",
"part",
"for",
"client",
"-",
"side",
"and",
"server",
"-",
"side",
"widget",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/CmsCategoryWidget.java#L642-L661 |
158,169 | alkacon/opencms-core | src/org/opencms/importexport/CmsImportExportManager.java | CmsImportExportManager.getDefaultTimestampModes | public Map<TimestampMode, List<String>> getDefaultTimestampModes() {
Map<TimestampMode, List<String>> result = new HashMap<TimestampMode, List<String>>();
for (String resourcetype : m_defaultTimestampModes.keySet()) {
TimestampMode mode = m_defaultTimestampModes.get(resourcetype);
... | java | public Map<TimestampMode, List<String>> getDefaultTimestampModes() {
Map<TimestampMode, List<String>> result = new HashMap<TimestampMode, List<String>>();
for (String resourcetype : m_defaultTimestampModes.keySet()) {
TimestampMode mode = m_defaultTimestampModes.get(resourcetype);
... | [
"public",
"Map",
"<",
"TimestampMode",
",",
"List",
"<",
"String",
">",
">",
"getDefaultTimestampModes",
"(",
")",
"{",
"Map",
"<",
"TimestampMode",
",",
"List",
"<",
"String",
">",
">",
"result",
"=",
"new",
"HashMap",
"<",
"TimestampMode",
",",
"List",
... | Returns the map from resourcetype names to default timestamp modes.
@return the map from resourcetype names to default timestamp modes. | [
"Returns",
"the",
"map",
"from",
"resourcetype",
"names",
"to",
"default",
"timestamp",
"modes",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsImportExportManager.java#L679-L693 |
158,170 | alkacon/opencms-core | src-gwt/org/opencms/acacia/client/CmsValidationHandler.java | CmsValidationHandler.addHandler | protected <H extends EventHandler> HandlerRegistration addHandler(final H handler, GwtEvent.Type<H> type) {
return ensureHandlers().addHandlerToSource(type, this, handler);
} | java | protected <H extends EventHandler> HandlerRegistration addHandler(final H handler, GwtEvent.Type<H> type) {
return ensureHandlers().addHandlerToSource(type, this, handler);
} | [
"protected",
"<",
"H",
"extends",
"EventHandler",
">",
"HandlerRegistration",
"addHandler",
"(",
"final",
"H",
"handler",
",",
"GwtEvent",
".",
"Type",
"<",
"H",
">",
"type",
")",
"{",
"return",
"ensureHandlers",
"(",
")",
".",
"addHandlerToSource",
"(",
"ty... | Adds this handler to the widget.
@param <H> the type of handler to add
@param type the event type
@param handler the handler
@return {@link HandlerRegistration} used to remove the handler | [
"Adds",
"this",
"handler",
"to",
"the",
"widget",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/CmsValidationHandler.java#L308-L311 |
158,171 | alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java | CmsXMLSearchConfigurationParser.parseFacetQueryItems | protected List<I_CmsFacetQueryItem> parseFacetQueryItems(final String path) throws Exception {
final List<I_CmsXmlContentValue> values = m_xml.getValues(path, m_locale);
if (values == null) {
return null;
} else {
List<I_CmsFacetQueryItem> parsedItems = new ArrayList<I_C... | java | protected List<I_CmsFacetQueryItem> parseFacetQueryItems(final String path) throws Exception {
final List<I_CmsXmlContentValue> values = m_xml.getValues(path, m_locale);
if (values == null) {
return null;
} else {
List<I_CmsFacetQueryItem> parsedItems = new ArrayList<I_C... | [
"protected",
"List",
"<",
"I_CmsFacetQueryItem",
">",
"parseFacetQueryItems",
"(",
"final",
"String",
"path",
")",
"throws",
"Exception",
"{",
"final",
"List",
"<",
"I_CmsXmlContentValue",
">",
"values",
"=",
"m_xml",
".",
"getValues",
"(",
"path",
",",
"m_local... | Helper to read a mandatory String value list.
@param path The XML path of the element to read.
@return The String list stored in the XML, or <code>null</code> if the value could not be read.
@throws Exception thrown if the list of String values can not be read. | [
"Helper",
"to",
"read",
"a",
"mandatory",
"String",
"value",
"list",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java#L411-L428 |
158,172 | alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java | CmsXMLSearchConfigurationParser.parseFieldFacet | protected I_CmsSearchConfigurationFacetField parseFieldFacet(final String pathPrefix) {
try {
final String field = parseMandatoryStringValue(pathPrefix + XML_ELEMENT_FACET_FIELD);
final String name = parseOptionalStringValue(pathPrefix + XML_ELEMENT_FACET_NAME);
final String... | java | protected I_CmsSearchConfigurationFacetField parseFieldFacet(final String pathPrefix) {
try {
final String field = parseMandatoryStringValue(pathPrefix + XML_ELEMENT_FACET_FIELD);
final String name = parseOptionalStringValue(pathPrefix + XML_ELEMENT_FACET_NAME);
final String... | [
"protected",
"I_CmsSearchConfigurationFacetField",
"parseFieldFacet",
"(",
"final",
"String",
"pathPrefix",
")",
"{",
"try",
"{",
"final",
"String",
"field",
"=",
"parseMandatoryStringValue",
"(",
"pathPrefix",
"+",
"XML_ELEMENT_FACET_FIELD",
")",
";",
"final",
"String"... | Reads the configuration of a field facet.
@param pathPrefix The XML Path that leads to the field facet configuration, or <code>null</code> if the XML was not correctly structured.
@return The read configuration, or <code>null</code> if the XML was not correctly structured. | [
"Reads",
"the",
"configuration",
"of",
"a",
"field",
"facet",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java#L434-L476 |
158,173 | alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java | CmsXMLSearchConfigurationParser.parseOptionalBooleanValue | protected Boolean parseOptionalBooleanValue(final String path) {
final I_CmsXmlContentValue value = m_xml.getValue(path, m_locale);
if (value == null) {
return null;
} else {
final String stringValue = value.getStringValue(null);
try {
final B... | java | protected Boolean parseOptionalBooleanValue(final String path) {
final I_CmsXmlContentValue value = m_xml.getValue(path, m_locale);
if (value == null) {
return null;
} else {
final String stringValue = value.getStringValue(null);
try {
final B... | [
"protected",
"Boolean",
"parseOptionalBooleanValue",
"(",
"final",
"String",
"path",
")",
"{",
"final",
"I_CmsXmlContentValue",
"value",
"=",
"m_xml",
".",
"getValue",
"(",
"path",
",",
"m_locale",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"retur... | Helper to read an optional Boolean value.
@param path The XML path of the element to read.
@return The Boolean value stored in the XML, or <code>null</code> if the value could not be read. | [
"Helper",
"to",
"read",
"an",
"optional",
"Boolean",
"value",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java#L482-L497 |
158,174 | alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java | CmsXMLSearchConfigurationParser.parseOptionalIntValue | protected Integer parseOptionalIntValue(final String path) {
final I_CmsXmlContentValue value = m_xml.getValue(path, m_locale);
if (value == null) {
return null;
} else {
final String stringValue = value.getStringValue(null);
try {
final Integ... | java | protected Integer parseOptionalIntValue(final String path) {
final I_CmsXmlContentValue value = m_xml.getValue(path, m_locale);
if (value == null) {
return null;
} else {
final String stringValue = value.getStringValue(null);
try {
final Integ... | [
"protected",
"Integer",
"parseOptionalIntValue",
"(",
"final",
"String",
"path",
")",
"{",
"final",
"I_CmsXmlContentValue",
"value",
"=",
"m_xml",
".",
"getValue",
"(",
"path",
",",
"m_locale",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
... | Helper to read an optional Integer value.
@param path The XML path of the element to read.
@return The Integer value stored in the XML, or <code>null</code> if the value could not be read. | [
"Helper",
"to",
"read",
"an",
"optional",
"Integer",
"value",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java#L503-L518 |
158,175 | alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java | CmsXMLSearchConfigurationParser.parseOptionalStringValue | protected String parseOptionalStringValue(final String path) {
final I_CmsXmlContentValue value = m_xml.getValue(path, m_locale);
if (value == null) {
return null;
} else {
return value.getStringValue(null);
}
} | java | protected String parseOptionalStringValue(final String path) {
final I_CmsXmlContentValue value = m_xml.getValue(path, m_locale);
if (value == null) {
return null;
} else {
return value.getStringValue(null);
}
} | [
"protected",
"String",
"parseOptionalStringValue",
"(",
"final",
"String",
"path",
")",
"{",
"final",
"I_CmsXmlContentValue",
"value",
"=",
"m_xml",
".",
"getValue",
"(",
"path",
",",
"m_locale",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return"... | Helper to read an optional String value.
@param path The XML path of the element to read.
@return The String value stored in the XML, or <code>null</code> if the value could not be read. | [
"Helper",
"to",
"read",
"an",
"optional",
"String",
"value",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java#L524-L532 |
158,176 | alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java | CmsXMLSearchConfigurationParser.parseOptionalStringValues | protected List<String> parseOptionalStringValues(final String path) {
final List<I_CmsXmlContentValue> values = m_xml.getValues(path, m_locale);
if (values == null) {
return null;
} else {
List<String> stringValues = new ArrayList<String>(values.size());
for ... | java | protected List<String> parseOptionalStringValues(final String path) {
final List<I_CmsXmlContentValue> values = m_xml.getValues(path, m_locale);
if (values == null) {
return null;
} else {
List<String> stringValues = new ArrayList<String>(values.size());
for ... | [
"protected",
"List",
"<",
"String",
">",
"parseOptionalStringValues",
"(",
"final",
"String",
"path",
")",
"{",
"final",
"List",
"<",
"I_CmsXmlContentValue",
">",
"values",
"=",
"m_xml",
".",
"getValues",
"(",
"path",
",",
"m_locale",
")",
";",
"if",
"(",
... | Helper to read an optional String value list.
@param path The XML path of the element to read.
@return The String list stored in the XML, or <code>null</code> if the value could not be read. | [
"Helper",
"to",
"read",
"an",
"optional",
"String",
"value",
"list",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java#L538-L550 |
158,177 | alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java | CmsXMLSearchConfigurationParser.parseRangeFacet | protected I_CmsSearchConfigurationFacetRange parseRangeFacet(String pathPrefix) {
try {
final String range = parseMandatoryStringValue(pathPrefix + XML_ELEMENT_RANGE_FACET_RANGE);
final String name = parseOptionalStringValue(pathPrefix + XML_ELEMENT_FACET_NAME);
final String... | java | protected I_CmsSearchConfigurationFacetRange parseRangeFacet(String pathPrefix) {
try {
final String range = parseMandatoryStringValue(pathPrefix + XML_ELEMENT_RANGE_FACET_RANGE);
final String name = parseOptionalStringValue(pathPrefix + XML_ELEMENT_FACET_NAME);
final String... | [
"protected",
"I_CmsSearchConfigurationFacetRange",
"parseRangeFacet",
"(",
"String",
"pathPrefix",
")",
"{",
"try",
"{",
"final",
"String",
"range",
"=",
"parseMandatoryStringValue",
"(",
"pathPrefix",
"+",
"XML_ELEMENT_RANGE_FACET_RANGE",
")",
";",
"final",
"String",
"... | Reads the configuration of a range facet.
@param pathPrefix The XML Path that leads to the range facet configuration, or <code>null</code> if the XML was not correctly structured.
@return The read configuration, or <code>null</code> if the XML was not correctly structured. | [
"Reads",
"the",
"configuration",
"of",
"a",
"range",
"facet",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java#L556-L614 |
158,178 | alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java | CmsXMLSearchConfigurationParser.getPageSizes | private List<Integer> getPageSizes() {
final String pageSizes = parseOptionalStringValue(XML_ELEMENT_PAGESIZE);
if (pageSizes != null) {
String[] pageSizesArray = pageSizes.split("-");
if (pageSizesArray.length > 0) {
try {
List<Integer> resul... | java | private List<Integer> getPageSizes() {
final String pageSizes = parseOptionalStringValue(XML_ELEMENT_PAGESIZE);
if (pageSizes != null) {
String[] pageSizesArray = pageSizes.split("-");
if (pageSizesArray.length > 0) {
try {
List<Integer> resul... | [
"private",
"List",
"<",
"Integer",
">",
"getPageSizes",
"(",
")",
"{",
"final",
"String",
"pageSizes",
"=",
"parseOptionalStringValue",
"(",
"XML_ELEMENT_PAGESIZE",
")",
";",
"if",
"(",
"pageSizes",
"!=",
"null",
")",
"{",
"String",
"[",
"]",
"pageSizesArray",... | Returns the configured page size, or the default page size if it is not configured.
@return The configured page size, or the default page size if it is not configured. | [
"Returns",
"the",
"configured",
"page",
"size",
"or",
"the",
"default",
"page",
"size",
"if",
"it",
"is",
"not",
"configured",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java#L742-L760 |
158,179 | alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java | CmsXMLSearchConfigurationParser.getQueryParam | private String getQueryParam() {
final String param = parseOptionalStringValue(XML_ELEMENT_QUERYPARAM);
if (param == null) {
return DEFAULT_QUERY_PARAM;
} else {
return param;
}
} | java | private String getQueryParam() {
final String param = parseOptionalStringValue(XML_ELEMENT_QUERYPARAM);
if (param == null) {
return DEFAULT_QUERY_PARAM;
} else {
return param;
}
} | [
"private",
"String",
"getQueryParam",
"(",
")",
"{",
"final",
"String",
"param",
"=",
"parseOptionalStringValue",
"(",
"XML_ELEMENT_QUERYPARAM",
")",
";",
"if",
"(",
"param",
"==",
"null",
")",
"{",
"return",
"DEFAULT_QUERY_PARAM",
";",
"}",
"else",
"{",
"retu... | Returns the configured request parameter for the current query string, or the default parameter if the core is not specified.
@return The configured request parameter for the current query string, or the default parameter if the core is not specified. | [
"Returns",
"the",
"configured",
"request",
"parameter",
"for",
"the",
"current",
"query",
"string",
"or",
"the",
"default",
"parameter",
"if",
"the",
"core",
"is",
"not",
"specified",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java#L773-L781 |
158,180 | alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java | CmsXMLSearchConfigurationParser.getSortOptions | private List<I_CmsSearchConfigurationSortOption> getSortOptions() {
final List<I_CmsSearchConfigurationSortOption> options = new ArrayList<I_CmsSearchConfigurationSortOption>();
final CmsXmlContentValueSequence sortOptions = m_xml.getValueSequence(XML_ELEMENT_SORTOPTIONS, m_locale);
if (sortOpt... | java | private List<I_CmsSearchConfigurationSortOption> getSortOptions() {
final List<I_CmsSearchConfigurationSortOption> options = new ArrayList<I_CmsSearchConfigurationSortOption>();
final CmsXmlContentValueSequence sortOptions = m_xml.getValueSequence(XML_ELEMENT_SORTOPTIONS, m_locale);
if (sortOpt... | [
"private",
"List",
"<",
"I_CmsSearchConfigurationSortOption",
">",
"getSortOptions",
"(",
")",
"{",
"final",
"List",
"<",
"I_CmsSearchConfigurationSortOption",
">",
"options",
"=",
"new",
"ArrayList",
"<",
"I_CmsSearchConfigurationSortOption",
">",
"(",
")",
";",
"fin... | Returns the configured sort options, or the empty list if no such options are configured.
@return The configured sort options, or the empty list if no such options are configured. | [
"Returns",
"the",
"configured",
"sort",
"options",
"or",
"the",
"empty",
"list",
"if",
"no",
"such",
"options",
"are",
"configured",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java#L794-L810 |
158,181 | alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java | CmsXMLSearchConfigurationParser.parseFacetQueryItem | private I_CmsFacetQueryItem parseFacetQueryItem(final String prefix) {
I_CmsXmlContentValue query = m_xml.getValue(prefix + XML_ELEMENT_QUERY_FACET_QUERY_QUERY, m_locale);
if (null != query) {
String queryString = query.getStringValue(null);
I_CmsXmlContentValue label = m_xml.ge... | java | private I_CmsFacetQueryItem parseFacetQueryItem(final String prefix) {
I_CmsXmlContentValue query = m_xml.getValue(prefix + XML_ELEMENT_QUERY_FACET_QUERY_QUERY, m_locale);
if (null != query) {
String queryString = query.getStringValue(null);
I_CmsXmlContentValue label = m_xml.ge... | [
"private",
"I_CmsFacetQueryItem",
"parseFacetQueryItem",
"(",
"final",
"String",
"prefix",
")",
"{",
"I_CmsXmlContentValue",
"query",
"=",
"m_xml",
".",
"getValue",
"(",
"prefix",
"+",
"XML_ELEMENT_QUERY_FACET_QUERY_QUERY",
",",
"m_locale",
")",
";",
"if",
"(",
"nul... | Parses a single query facet item with query and label.
@param prefix path to the query facet item (with trailing '/').
@return the query facet item. | [
"Parses",
"a",
"single",
"query",
"facet",
"item",
"with",
"query",
"and",
"label",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java#L824-L835 |
158,182 | alkacon/opencms-core | src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java | CmsXMLSearchConfigurationParser.parseMandatoryStringValue | private String parseMandatoryStringValue(final String path) throws Exception {
final String value = parseOptionalStringValue(path);
if (value == null) {
throw new Exception();
}
return value;
} | java | private String parseMandatoryStringValue(final String path) throws Exception {
final String value = parseOptionalStringValue(path);
if (value == null) {
throw new Exception();
}
return value;
} | [
"private",
"String",
"parseMandatoryStringValue",
"(",
"final",
"String",
"path",
")",
"throws",
"Exception",
"{",
"final",
"String",
"value",
"=",
"parseOptionalStringValue",
"(",
"path",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"throw",
"new",
... | Helper to read a mandatory String value.
@param path The XML path of the element to read.
@return The String value stored in the XML.
@throws Exception thrown if the value could not be read. | [
"Helper",
"to",
"read",
"a",
"mandatory",
"String",
"value",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java#L842-L849 |
158,183 | alkacon/opencms-core | src/org/opencms/search/CmsIndexingThread.java | CmsIndexingThread.createDefaultIndexDocument | protected I_CmsSearchDocument createDefaultIndexDocument() {
try {
return m_index.getFieldConfiguration().createDocument(m_cms, m_res, m_index, null);
} catch (CmsException e) {
LOG.error(
"Default document for "
+ m_res.getRootPath()
... | java | protected I_CmsSearchDocument createDefaultIndexDocument() {
try {
return m_index.getFieldConfiguration().createDocument(m_cms, m_res, m_index, null);
} catch (CmsException e) {
LOG.error(
"Default document for "
+ m_res.getRootPath()
... | [
"protected",
"I_CmsSearchDocument",
"createDefaultIndexDocument",
"(",
")",
"{",
"try",
"{",
"return",
"m_index",
".",
"getFieldConfiguration",
"(",
")",
".",
"createDocument",
"(",
"m_cms",
",",
"m_res",
",",
"m_index",
",",
"null",
")",
";",
"}",
"catch",
"(... | Creates a document for the resource without extracting the content. The aim is to get a content indexed,
even if extraction runs into a timeout.
@return the document for the resource generated if the content is discarded,
i.e., only meta information are indexed. | [
"Creates",
"a",
"document",
"for",
"the",
"resource",
"without",
"extracting",
"the",
"content",
".",
"The",
"aim",
"is",
"to",
"get",
"a",
"content",
"indexed",
"even",
"if",
"extraction",
"runs",
"into",
"a",
"timeout",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/CmsIndexingThread.java#L197-L211 |
158,184 | alkacon/opencms-core | src/org/opencms/jsp/util/A_CmsJspValueWrapper.java | A_CmsJspValueWrapper.getToInstanceDate | public CmsJspInstanceDateBean getToInstanceDate() {
if (m_instanceDate == null) {
m_instanceDate = new CmsJspInstanceDateBean(getToDate(), m_cms.getRequestContext().getLocale());
}
return m_instanceDate;
} | java | public CmsJspInstanceDateBean getToInstanceDate() {
if (m_instanceDate == null) {
m_instanceDate = new CmsJspInstanceDateBean(getToDate(), m_cms.getRequestContext().getLocale());
}
return m_instanceDate;
} | [
"public",
"CmsJspInstanceDateBean",
"getToInstanceDate",
"(",
")",
"{",
"if",
"(",
"m_instanceDate",
"==",
"null",
")",
"{",
"m_instanceDate",
"=",
"new",
"CmsJspInstanceDateBean",
"(",
"getToDate",
"(",
")",
",",
"m_cms",
".",
"getRequestContext",
"(",
")",
"."... | Converts a date to an instance date bean.
@return the instance date bean. | [
"Converts",
"a",
"date",
"to",
"an",
"instance",
"date",
"bean",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/A_CmsJspValueWrapper.java#L448-L454 |
158,185 | alkacon/opencms-core | src/org/opencms/workplace/galleries/Messages.java | Messages.getGalleryNotFoundKey | public static String getGalleryNotFoundKey(String gallery) {
StringBuffer sb = new StringBuffer(ERROR_REASON_NO_PREFIX);
sb.append(gallery.toUpperCase());
sb.append(GUI_TITLE_POSTFIX);
return sb.toString();
} | java | public static String getGalleryNotFoundKey(String gallery) {
StringBuffer sb = new StringBuffer(ERROR_REASON_NO_PREFIX);
sb.append(gallery.toUpperCase());
sb.append(GUI_TITLE_POSTFIX);
return sb.toString();
} | [
"public",
"static",
"String",
"getGalleryNotFoundKey",
"(",
"String",
"gallery",
")",
"{",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
"ERROR_REASON_NO_PREFIX",
")",
";",
"sb",
".",
"append",
"(",
"gallery",
".",
"toUpperCase",
"(",
")",
")",
";",
... | Convert gallery name to not found error key.
@param gallery gallery name for example "downloadgallery"
@return key as string "ERR_REASON_NO_DOWNLOADGALLERY_0" | [
"Convert",
"gallery",
"name",
"to",
"not",
"found",
"error",
"key",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/galleries/Messages.java#L499-L505 |
158,186 | alkacon/opencms-core | src/org/opencms/workplace/galleries/Messages.java | Messages.getTitleGalleryKey | public static String getTitleGalleryKey(String gallery) {
StringBuffer sb = new StringBuffer(GUI_TITLE_PREFIX);
sb.append(gallery.toUpperCase());
sb.append(GUI_TITLE_POSTFIX);
return sb.toString();
} | java | public static String getTitleGalleryKey(String gallery) {
StringBuffer sb = new StringBuffer(GUI_TITLE_PREFIX);
sb.append(gallery.toUpperCase());
sb.append(GUI_TITLE_POSTFIX);
return sb.toString();
} | [
"public",
"static",
"String",
"getTitleGalleryKey",
"(",
"String",
"gallery",
")",
"{",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
"GUI_TITLE_PREFIX",
")",
";",
"sb",
".",
"append",
"(",
"gallery",
".",
"toUpperCase",
"(",
")",
")",
";",
"sb",
... | Convert gallery name to title key.
@param gallery gallery name for example "downloadgallery"
@return key as string "ERR_REASON_NO_DOWNLOADGALLERY_0" | [
"Convert",
"gallery",
"name",
"to",
"title",
"key",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/galleries/Messages.java#L512-L518 |
158,187 | alkacon/opencms-core | src/org/opencms/xml/templatemapper/CmsTemplateMapper.java | CmsTemplateMapper.getTemplateMapperConfig | public static String getTemplateMapperConfig(ServletRequest request) {
String result = null;
CmsTemplateContext templateContext = (CmsTemplateContext)request.getAttribute(
CmsTemplateContextManager.ATTR_TEMPLATE_CONTEXT);
if (templateContext != null) {
I_CmsTemplateConte... | java | public static String getTemplateMapperConfig(ServletRequest request) {
String result = null;
CmsTemplateContext templateContext = (CmsTemplateContext)request.getAttribute(
CmsTemplateContextManager.ATTR_TEMPLATE_CONTEXT);
if (templateContext != null) {
I_CmsTemplateConte... | [
"public",
"static",
"String",
"getTemplateMapperConfig",
"(",
"ServletRequest",
"request",
")",
"{",
"String",
"result",
"=",
"null",
";",
"CmsTemplateContext",
"templateContext",
"=",
"(",
"CmsTemplateContext",
")",
"request",
".",
"getAttribute",
"(",
"CmsTemplateCo... | Checks if the selected template context is "templatemapper".
@param request the current request
@return true if the selected template context is "templatemapper" | [
"Checks",
"if",
"the",
"selected",
"template",
"context",
"is",
"templatemapper",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/templatemapper/CmsTemplateMapper.java#L134-L147 |
158,188 | alkacon/opencms-core | src/org/opencms/xml/templatemapper/CmsTemplateMapper.java | CmsTemplateMapper.getConfiguration | private CmsTemplateMapperConfiguration getConfiguration(final CmsObject cms) {
if (!m_enabled) {
return CmsTemplateMapperConfiguration.EMPTY_CONFIG;
}
if (m_configPath == null) {
m_configPath = OpenCms.getSystemInfo().getConfigFilePath(cms, "template-mapping.xml");
... | java | private CmsTemplateMapperConfiguration getConfiguration(final CmsObject cms) {
if (!m_enabled) {
return CmsTemplateMapperConfiguration.EMPTY_CONFIG;
}
if (m_configPath == null) {
m_configPath = OpenCms.getSystemInfo().getConfigFilePath(cms, "template-mapping.xml");
... | [
"private",
"CmsTemplateMapperConfiguration",
"getConfiguration",
"(",
"final",
"CmsObject",
"cms",
")",
"{",
"if",
"(",
"!",
"m_enabled",
")",
"{",
"return",
"CmsTemplateMapperConfiguration",
".",
"EMPTY_CONFIG",
";",
"}",
"if",
"(",
"m_configPath",
"==",
"null",
... | Loads the configuration file, using CmsVfsMemoryObjectCache for caching.
@param cms the CMS context
@return the template mapper configuration | [
"Loads",
"the",
"configuration",
"file",
"using",
"CmsVfsMemoryObjectCache",
"for",
"caching",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/templatemapper/CmsTemplateMapper.java#L348-L381 |
158,189 | alkacon/opencms-core | src-gwt/org/opencms/gwt/client/ui/CmsErrorDialog.java | CmsErrorDialog.onShow | private void onShow() {
if (m_detailsFieldset != null) {
m_detailsFieldset.getContentPanel().getElement().getStyle().setPropertyPx(
"maxHeight",
getAvailableHeight(m_messageWidget.getOffsetHeight()));
}
} | java | private void onShow() {
if (m_detailsFieldset != null) {
m_detailsFieldset.getContentPanel().getElement().getStyle().setPropertyPx(
"maxHeight",
getAvailableHeight(m_messageWidget.getOffsetHeight()));
}
} | [
"private",
"void",
"onShow",
"(",
")",
"{",
"if",
"(",
"m_detailsFieldset",
"!=",
"null",
")",
"{",
"m_detailsFieldset",
".",
"getContentPanel",
"(",
")",
".",
"getElement",
"(",
")",
".",
"getStyle",
"(",
")",
".",
"setPropertyPx",
"(",
"\"maxHeight\"",
"... | Checks the available space and sets max-height to the details field-set. | [
"Checks",
"the",
"available",
"space",
"and",
"sets",
"max",
"-",
"height",
"to",
"the",
"details",
"field",
"-",
"set",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsErrorDialog.java#L329-L336 |
158,190 | alkacon/opencms-core | src/org/opencms/ui/apps/git/CmsGitCheckin.java | CmsGitCheckin.addModuleToExport | public void addModuleToExport(final String moduleName) {
if (m_modulesToExport == null) {
m_modulesToExport = new HashSet<String>();
}
m_modulesToExport.add(moduleName);
} | java | public void addModuleToExport(final String moduleName) {
if (m_modulesToExport == null) {
m_modulesToExport = new HashSet<String>();
}
m_modulesToExport.add(moduleName);
} | [
"public",
"void",
"addModuleToExport",
"(",
"final",
"String",
"moduleName",
")",
"{",
"if",
"(",
"m_modulesToExport",
"==",
"null",
")",
"{",
"m_modulesToExport",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"}",
"m_modulesToExport",
".",
"add"... | Adds a module to the modules that should be exported.
If called at least once, the explicitly added modules will be exported
instead of the default modules.
@param moduleName the name of the module to export. | [
"Adds",
"a",
"module",
"to",
"the",
"modules",
"that",
"should",
"be",
"exported",
".",
"If",
"called",
"at",
"least",
"once",
"the",
"explicitly",
"added",
"modules",
"will",
"be",
"exported",
"instead",
"of",
"the",
"default",
"modules",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/git/CmsGitCheckin.java#L220-L226 |
158,191 | alkacon/opencms-core | src/org/opencms/ui/apps/git/CmsGitCheckin.java | CmsGitCheckin.checkIn | public int checkIn() {
try {
synchronized (STATIC_LOCK) {
m_logStream = new PrintStream(new FileOutputStream(DEFAULT_LOGFILE_PATH, false));
CmsObject cms = getCmsObject();
if (cms != null) {
return checkInInternal();
... | java | public int checkIn() {
try {
synchronized (STATIC_LOCK) {
m_logStream = new PrintStream(new FileOutputStream(DEFAULT_LOGFILE_PATH, false));
CmsObject cms = getCmsObject();
if (cms != null) {
return checkInInternal();
... | [
"public",
"int",
"checkIn",
"(",
")",
"{",
"try",
"{",
"synchronized",
"(",
"STATIC_LOCK",
")",
"{",
"m_logStream",
"=",
"new",
"PrintStream",
"(",
"new",
"FileOutputStream",
"(",
"DEFAULT_LOGFILE_PATH",
",",
"false",
")",
")",
";",
"CmsObject",
"cms",
"=",
... | Start export and check in of the selected modules.
@return The exit code of the check in procedure (like a script's exit code). | [
"Start",
"export",
"and",
"check",
"in",
"of",
"the",
"selected",
"modules",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/git/CmsGitCheckin.java#L232-L249 |
158,192 | alkacon/opencms-core | src/org/opencms/ui/apps/git/CmsGitCheckin.java | CmsGitCheckin.setCurrentConfiguration | public boolean setCurrentConfiguration(CmsGitConfiguration configuration) {
if ((null != configuration) && configuration.isValid()) {
m_currentConfiguration = configuration;
return true;
}
return false;
} | java | public boolean setCurrentConfiguration(CmsGitConfiguration configuration) {
if ((null != configuration) && configuration.isValid()) {
m_currentConfiguration = configuration;
return true;
}
return false;
} | [
"public",
"boolean",
"setCurrentConfiguration",
"(",
"CmsGitConfiguration",
"configuration",
")",
"{",
"if",
"(",
"(",
"null",
"!=",
"configuration",
")",
"&&",
"configuration",
".",
"isValid",
"(",
")",
")",
"{",
"m_currentConfiguration",
"=",
"configuration",
";... | Sets the current configuration if it is a valid configuration. Otherwise the configuration is not set.
@param configuration the configuration to set.
@return flag, indicating if the configuration is set. | [
"Sets",
"the",
"current",
"configuration",
"if",
"it",
"is",
"a",
"valid",
"configuration",
".",
"Otherwise",
"the",
"configuration",
"is",
"not",
"set",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/git/CmsGitCheckin.java#L429-L436 |
158,193 | alkacon/opencms-core | src/org/opencms/ui/apps/git/CmsGitCheckin.java | CmsGitCheckin.checkInInternal | private int checkInInternal() {
m_logStream.println("[" + new Date() + "] STARTING Git task");
m_logStream.println("=========================");
m_logStream.println();
if (m_checkout) {
m_logStream.println("Running checkout script");
} else if (!(m_resetHead || m_r... | java | private int checkInInternal() {
m_logStream.println("[" + new Date() + "] STARTING Git task");
m_logStream.println("=========================");
m_logStream.println();
if (m_checkout) {
m_logStream.println("Running checkout script");
} else if (!(m_resetHead || m_r... | [
"private",
"int",
"checkInInternal",
"(",
")",
"{",
"m_logStream",
".",
"println",
"(",
"\"[\"",
"+",
"new",
"Date",
"(",
")",
"+",
"\"] STARTING Git task\"",
")",
";",
"m_logStream",
".",
"println",
"(",
"\"=========================\"",
")",
";",
"m_logStream",... | Export modules and check them in. Assumes the log stream already open.
@return exit code of the commit-script. | [
"Export",
"modules",
"and",
"check",
"them",
"in",
".",
"Assumes",
"the",
"log",
"stream",
"already",
"open",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/git/CmsGitCheckin.java#L558-L605 |
158,194 | alkacon/opencms-core | src/org/opencms/ui/apps/git/CmsGitCheckin.java | CmsGitCheckin.checkinScriptCommand | private String checkinScriptCommand() {
String exportModules = "";
if ((m_modulesToExport != null) && !m_modulesToExport.isEmpty()) {
StringBuffer exportModulesParam = new StringBuffer();
for (String moduleName : m_modulesToExport) {
exportModulesParam.append(" "... | java | private String checkinScriptCommand() {
String exportModules = "";
if ((m_modulesToExport != null) && !m_modulesToExport.isEmpty()) {
StringBuffer exportModulesParam = new StringBuffer();
for (String moduleName : m_modulesToExport) {
exportModulesParam.append(" "... | [
"private",
"String",
"checkinScriptCommand",
"(",
")",
"{",
"String",
"exportModules",
"=",
"\"\"",
";",
"if",
"(",
"(",
"m_modulesToExport",
"!=",
"null",
")",
"&&",
"!",
"m_modulesToExport",
".",
"isEmpty",
"(",
")",
")",
"{",
"StringBuffer",
"exportModulesP... | Returns the command to run by the shell to normally run the checkin script.
@return the command to run by the shell to normally run the checkin script. | [
"Returns",
"the",
"command",
"to",
"run",
"by",
"the",
"shell",
"to",
"normally",
"run",
"the",
"checkin",
"script",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/git/CmsGitCheckin.java#L610-L695 |
158,195 | alkacon/opencms-core | src/org/opencms/ui/apps/git/CmsGitCheckin.java | CmsGitCheckin.exportModules | private void exportModules() {
// avoid to export modules if unnecessary
if (((null != m_copyAndUnzip) && !m_copyAndUnzip.booleanValue())
|| ((null == m_copyAndUnzip) && !m_currentConfiguration.getDefaultCopyAndUnzip())) {
m_logStream.println();
m_logStream.println("... | java | private void exportModules() {
// avoid to export modules if unnecessary
if (((null != m_copyAndUnzip) && !m_copyAndUnzip.booleanValue())
|| ((null == m_copyAndUnzip) && !m_currentConfiguration.getDefaultCopyAndUnzip())) {
m_logStream.println();
m_logStream.println("... | [
"private",
"void",
"exportModules",
"(",
")",
"{",
"// avoid to export modules if unnecessary",
"if",
"(",
"(",
"(",
"null",
"!=",
"m_copyAndUnzip",
")",
"&&",
"!",
"m_copyAndUnzip",
".",
"booleanValue",
"(",
")",
")",
"||",
"(",
"(",
"null",
"==",
"m_copyAndU... | Export the modules that should be checked in into git. | [
"Export",
"the",
"modules",
"that",
"should",
"be",
"checked",
"in",
"into",
"git",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/git/CmsGitCheckin.java#L709-L744 |
158,196 | alkacon/opencms-core | src/org/opencms/ui/apps/git/CmsGitCheckin.java | CmsGitCheckin.readConfigFiles | private List<CmsGitConfiguration> readConfigFiles() {
List<CmsGitConfiguration> configurations = new LinkedList<CmsGitConfiguration>();
// Default configuration file for backwards compatibility
addConfigurationIfValid(configurations, new File(DEFAULT_CONFIG_FILE));
// All files in the... | java | private List<CmsGitConfiguration> readConfigFiles() {
List<CmsGitConfiguration> configurations = new LinkedList<CmsGitConfiguration>();
// Default configuration file for backwards compatibility
addConfigurationIfValid(configurations, new File(DEFAULT_CONFIG_FILE));
// All files in the... | [
"private",
"List",
"<",
"CmsGitConfiguration",
">",
"readConfigFiles",
"(",
")",
"{",
"List",
"<",
"CmsGitConfiguration",
">",
"configurations",
"=",
"new",
"LinkedList",
"<",
"CmsGitConfiguration",
">",
"(",
")",
";",
"// Default configuration file for backwards compat... | Read all configuration files.
@return the list with all available configurations | [
"Read",
"all",
"configuration",
"files",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/git/CmsGitCheckin.java#L861-L876 |
158,197 | alkacon/opencms-core | src/org/opencms/ui/apps/git/CmsGitCheckin.java | CmsGitCheckin.runCommitScript | private int runCommitScript() {
if (m_checkout && !m_fetchAndResetBeforeImport) {
m_logStream.println("Skipping script....");
return 0;
}
try {
m_logStream.flush();
String commandParam;
if (m_resetRemoteHead) {
commandP... | java | private int runCommitScript() {
if (m_checkout && !m_fetchAndResetBeforeImport) {
m_logStream.println("Skipping script....");
return 0;
}
try {
m_logStream.flush();
String commandParam;
if (m_resetRemoteHead) {
commandP... | [
"private",
"int",
"runCommitScript",
"(",
")",
"{",
"if",
"(",
"m_checkout",
"&&",
"!",
"m_fetchAndResetBeforeImport",
")",
"{",
"m_logStream",
".",
"println",
"(",
"\"Skipping script....\"",
")",
";",
"return",
"0",
";",
"}",
"try",
"{",
"m_logStream",
".",
... | Runs the shell script for committing and optionally pushing the changes in the module.
@return exit code of the script. | [
"Runs",
"the",
"shell",
"script",
"for",
"committing",
"and",
"optionally",
"pushing",
"the",
"changes",
"in",
"the",
"module",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/git/CmsGitCheckin.java#L902-L940 |
158,198 | alkacon/opencms-core | src/org/opencms/ui/apps/git/CmsGitToolOptionsPanel.java | CmsGitToolOptionsPanel.updateForNewConfiguration | protected void updateForNewConfiguration(CmsGitConfiguration gitConfig) {
if (!m_checkinBean.setCurrentConfiguration(gitConfig)) {
Notification.show(
CmsVaadinUtils.getMessageText(Messages.GUI_GIT_CONFIGURATION_SWITCH_FAILED_0),
CmsVaadinUtils.getMessageText(Messages... | java | protected void updateForNewConfiguration(CmsGitConfiguration gitConfig) {
if (!m_checkinBean.setCurrentConfiguration(gitConfig)) {
Notification.show(
CmsVaadinUtils.getMessageText(Messages.GUI_GIT_CONFIGURATION_SWITCH_FAILED_0),
CmsVaadinUtils.getMessageText(Messages... | [
"protected",
"void",
"updateForNewConfiguration",
"(",
"CmsGitConfiguration",
"gitConfig",
")",
"{",
"if",
"(",
"!",
"m_checkinBean",
".",
"setCurrentConfiguration",
"(",
"gitConfig",
")",
")",
"{",
"Notification",
".",
"show",
"(",
"CmsVaadinUtils",
".",
"getMessag... | Updates the options panel for a special configuration.
@param gitConfig the git configuration. | [
"Updates",
"the",
"options",
"panel",
"for",
"a",
"special",
"configuration",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/git/CmsGitToolOptionsPanel.java#L621-L648 |
158,199 | alkacon/opencms-core | src/org/opencms/ui/apps/git/CmsGitToolOptionsPanel.java | CmsGitToolOptionsPanel.configureConfigurationSelector | private void configureConfigurationSelector() {
if (m_checkinBean.getConfigurations().size() < 2) {
// Do not show the configuration selection at all.
removeComponent(m_configurationSelectionPanel);
} else {
for (CmsGitConfiguration configuration : m_checkinBean.getC... | java | private void configureConfigurationSelector() {
if (m_checkinBean.getConfigurations().size() < 2) {
// Do not show the configuration selection at all.
removeComponent(m_configurationSelectionPanel);
} else {
for (CmsGitConfiguration configuration : m_checkinBean.getC... | [
"private",
"void",
"configureConfigurationSelector",
"(",
")",
"{",
"if",
"(",
"m_checkinBean",
".",
"getConfigurations",
"(",
")",
".",
"size",
"(",
")",
"<",
"2",
")",
"{",
"// Do not show the configuration selection at all.",
"removeComponent",
"(",
"m_configuratio... | Configures the configuration selector. | [
"Configures",
"the",
"configuration",
"selector",
"."
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/git/CmsGitToolOptionsPanel.java#L653-L682 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.