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,300
alkacon/opencms-core
src/org/opencms/ui/apps/user/CmsOuTree.java
CmsOuTree.addChildrenForRolesNode
private void addChildrenForRolesNode(String ouItem) { try { List<CmsRole> roles = OpenCms.getRoleManager().getRoles(m_cms, ouItem.substring(1), false); CmsRole.applySystemRoleOrder(roles); for (CmsRole role : roles) { String roleId = ouItem + "/" + role.getId(); Item roleItem = m_treeContainer.addItem(roleId); if (roleItem == null) { roleItem = getItem(roleId); } roleItem.getItemProperty(PROP_NAME).setValue(getIconCaptionHTML(role, CmsOuTreeType.ROLE)); roleItem.getItemProperty(PROP_TYPE).setValue(CmsOuTreeType.ROLE); setChildrenAllowed(roleId, false); m_treeContainer.setParent(roleId, ouItem); } } catch (CmsException e) { LOG.error("Can not read group", e); } }
java
private void addChildrenForRolesNode(String ouItem) { try { List<CmsRole> roles = OpenCms.getRoleManager().getRoles(m_cms, ouItem.substring(1), false); CmsRole.applySystemRoleOrder(roles); for (CmsRole role : roles) { String roleId = ouItem + "/" + role.getId(); Item roleItem = m_treeContainer.addItem(roleId); if (roleItem == null) { roleItem = getItem(roleId); } roleItem.getItemProperty(PROP_NAME).setValue(getIconCaptionHTML(role, CmsOuTreeType.ROLE)); roleItem.getItemProperty(PROP_TYPE).setValue(CmsOuTreeType.ROLE); setChildrenAllowed(roleId, false); m_treeContainer.setParent(roleId, ouItem); } } catch (CmsException e) { LOG.error("Can not read group", e); } }
[ "private", "void", "addChildrenForRolesNode", "(", "String", "ouItem", ")", "{", "try", "{", "List", "<", "CmsRole", ">", "roles", "=", "OpenCms", ".", "getRoleManager", "(", ")", ".", "getRoles", "(", "m_cms", ",", "ouItem", ".", "substring", "(", "1", ")", ",", "false", ")", ";", "CmsRole", ".", "applySystemRoleOrder", "(", "roles", ")", ";", "for", "(", "CmsRole", "role", ":", "roles", ")", "{", "String", "roleId", "=", "ouItem", "+", "\"/\"", "+", "role", ".", "getId", "(", ")", ";", "Item", "roleItem", "=", "m_treeContainer", ".", "addItem", "(", "roleId", ")", ";", "if", "(", "roleItem", "==", "null", ")", "{", "roleItem", "=", "getItem", "(", "roleId", ")", ";", "}", "roleItem", ".", "getItemProperty", "(", "PROP_NAME", ")", ".", "setValue", "(", "getIconCaptionHTML", "(", "role", ",", "CmsOuTreeType", ".", "ROLE", ")", ")", ";", "roleItem", ".", "getItemProperty", "(", "PROP_TYPE", ")", ".", "setValue", "(", "CmsOuTreeType", ".", "ROLE", ")", ";", "setChildrenAllowed", "(", "roleId", ",", "false", ")", ";", "m_treeContainer", ".", "setParent", "(", "roleId", ",", "ouItem", ")", ";", "}", "}", "catch", "(", "CmsException", "e", ")", "{", "LOG", ".", "error", "(", "\"Can not read group\"", ",", "e", ")", ";", "}", "}" ]
Add roles for given role parent item. @param ouItem group parent item
[ "Add", "roles", "for", "given", "role", "parent", "item", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/user/CmsOuTree.java#L349-L368
158,301
alkacon/opencms-core
src/org/opencms/xml/templatemapper/CmsTemplateMappingContentRewriter.java
CmsTemplateMappingContentRewriter.checkConfiguredInModules
public static boolean checkConfiguredInModules() { Boolean result = m_moduleCheckCache.get(); if (result == null) { result = Boolean.valueOf(getConfiguredTemplateMapping() != null); m_moduleCheckCache.set(result); } return result.booleanValue(); }
java
public static boolean checkConfiguredInModules() { Boolean result = m_moduleCheckCache.get(); if (result == null) { result = Boolean.valueOf(getConfiguredTemplateMapping() != null); m_moduleCheckCache.set(result); } return result.booleanValue(); }
[ "public", "static", "boolean", "checkConfiguredInModules", "(", ")", "{", "Boolean", "result", "=", "m_moduleCheckCache", ".", "get", "(", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "Boolean", ".", "valueOf", "(", "getConfiguredTemplateMapping", "(", ")", "!=", "null", ")", ";", "m_moduleCheckCache", ".", "set", "(", "result", ")", ";", "}", "return", "result", ".", "booleanValue", "(", ")", ";", "}" ]
Checks if template mapper is configured in modules. @return true if the template mapper is configured in modules
[ "Checks", "if", "template", "mapper", "is", "configured", "in", "modules", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/templatemapper/CmsTemplateMappingContentRewriter.java#L99-L107
158,302
alkacon/opencms-core
src/org/opencms/ui/components/extensions/CmsScrollPositionCss.java
CmsScrollPositionCss.addTo
@SuppressWarnings("unused") public static void addTo( AbstractSingleComponentContainer componentContainer, int scrollBarrier, int barrierMargin, String styleName) { new CmsScrollPositionCss(componentContainer, scrollBarrier, barrierMargin, styleName); }
java
@SuppressWarnings("unused") public static void addTo( AbstractSingleComponentContainer componentContainer, int scrollBarrier, int barrierMargin, String styleName) { new CmsScrollPositionCss(componentContainer, scrollBarrier, barrierMargin, styleName); }
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "static", "void", "addTo", "(", "AbstractSingleComponentContainer", "componentContainer", ",", "int", "scrollBarrier", ",", "int", "barrierMargin", ",", "String", "styleName", ")", "{", "new", "CmsScrollPositionCss", "(", "componentContainer", ",", "scrollBarrier", ",", "barrierMargin", ",", "styleName", ")", ";", "}" ]
Adds the scroll position CSS extension to the given component @param componentContainer the component to extend @param scrollBarrier the scroll barrier @param barrierMargin the margin @param styleName the style name to set beyond the scroll barrier
[ "Adds", "the", "scroll", "position", "CSS", "extension", "to", "the", "given", "component" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/extensions/CmsScrollPositionCss.java#L71-L79
158,303
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/CmsColorPicker.java
CmsColorPicker.checkvalue
protected boolean checkvalue(String colorvalue) { boolean valid = validateColorValue(colorvalue); if (valid) { if (colorvalue.length() == 4) { char[] chr = colorvalue.toCharArray(); for (int i = 1; i < 4; i++) { String foo = String.valueOf(chr[i]); colorvalue = colorvalue.replaceFirst(foo, foo + foo); } } m_textboxColorValue.setValue(colorvalue, true); m_colorField.getElement().getStyle().setBackgroundColor(colorvalue); m_colorValue = colorvalue; } return valid; }
java
protected boolean checkvalue(String colorvalue) { boolean valid = validateColorValue(colorvalue); if (valid) { if (colorvalue.length() == 4) { char[] chr = colorvalue.toCharArray(); for (int i = 1; i < 4; i++) { String foo = String.valueOf(chr[i]); colorvalue = colorvalue.replaceFirst(foo, foo + foo); } } m_textboxColorValue.setValue(colorvalue, true); m_colorField.getElement().getStyle().setBackgroundColor(colorvalue); m_colorValue = colorvalue; } return valid; }
[ "protected", "boolean", "checkvalue", "(", "String", "colorvalue", ")", "{", "boolean", "valid", "=", "validateColorValue", "(", "colorvalue", ")", ";", "if", "(", "valid", ")", "{", "if", "(", "colorvalue", ".", "length", "(", ")", "==", "4", ")", "{", "char", "[", "]", "chr", "=", "colorvalue", ".", "toCharArray", "(", ")", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "4", ";", "i", "++", ")", "{", "String", "foo", "=", "String", ".", "valueOf", "(", "chr", "[", "i", "]", ")", ";", "colorvalue", "=", "colorvalue", ".", "replaceFirst", "(", "foo", ",", "foo", "+", "foo", ")", ";", "}", "}", "m_textboxColorValue", ".", "setValue", "(", "colorvalue", ",", "true", ")", ";", "m_colorField", ".", "getElement", "(", ")", ".", "getStyle", "(", ")", ".", "setBackgroundColor", "(", "colorvalue", ")", ";", "m_colorValue", "=", "colorvalue", ";", "}", "return", "valid", ";", "}" ]
Validates the inputed color value. @param colorvalue the value of the color @return true if the inputed color value is valid
[ "Validates", "the", "inputed", "color", "value", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/CmsColorPicker.java#L370-L386
158,304
alkacon/opencms-core
src/org/opencms/cmis/CmsCmisResourceHelper.java
CmsCmisResourceHelper.collectAllowableActions
protected AllowableActions collectAllowableActions(CmsObject cms, CmsResource file) { try { if (file == null) { throw new IllegalArgumentException("File must not be null!"); } CmsLock lock = cms.getLock(file); CmsUser user = cms.getRequestContext().getCurrentUser(); boolean canWrite = !cms.getRequestContext().getCurrentProject().isOnlineProject() && (lock.isOwnedBy(user) || lock.isLockableBy(user)) && cms.hasPermissions(file, CmsPermissionSet.ACCESS_WRITE, false, CmsResourceFilter.DEFAULT); boolean isReadOnly = !canWrite; boolean isFolder = file.isFolder(); boolean isRoot = file.getRootPath().length() <= 1; Set<Action> aas = new LinkedHashSet<Action>(); addAction(aas, Action.CAN_GET_OBJECT_PARENTS, !isRoot); addAction(aas, Action.CAN_GET_PROPERTIES, true); addAction(aas, Action.CAN_UPDATE_PROPERTIES, !isReadOnly); addAction(aas, Action.CAN_MOVE_OBJECT, !isReadOnly && !isRoot); addAction(aas, Action.CAN_DELETE_OBJECT, !isReadOnly && !isRoot); if (isFolder) { addAction(aas, Action.CAN_GET_DESCENDANTS, true); addAction(aas, Action.CAN_GET_CHILDREN, true); addAction(aas, Action.CAN_GET_FOLDER_PARENT, !isRoot); addAction(aas, Action.CAN_GET_FOLDER_TREE, true); addAction(aas, Action.CAN_CREATE_DOCUMENT, !isReadOnly); addAction(aas, Action.CAN_CREATE_FOLDER, !isReadOnly); addAction(aas, Action.CAN_DELETE_TREE, !isReadOnly); } else { addAction(aas, Action.CAN_GET_CONTENT_STREAM, true); addAction(aas, Action.CAN_SET_CONTENT_STREAM, !isReadOnly); addAction(aas, Action.CAN_GET_ALL_VERSIONS, true); } AllowableActionsImpl result = new AllowableActionsImpl(); result.setAllowableActions(aas); return result; } catch (CmsException e) { handleCmsException(e); return null; } }
java
protected AllowableActions collectAllowableActions(CmsObject cms, CmsResource file) { try { if (file == null) { throw new IllegalArgumentException("File must not be null!"); } CmsLock lock = cms.getLock(file); CmsUser user = cms.getRequestContext().getCurrentUser(); boolean canWrite = !cms.getRequestContext().getCurrentProject().isOnlineProject() && (lock.isOwnedBy(user) || lock.isLockableBy(user)) && cms.hasPermissions(file, CmsPermissionSet.ACCESS_WRITE, false, CmsResourceFilter.DEFAULT); boolean isReadOnly = !canWrite; boolean isFolder = file.isFolder(); boolean isRoot = file.getRootPath().length() <= 1; Set<Action> aas = new LinkedHashSet<Action>(); addAction(aas, Action.CAN_GET_OBJECT_PARENTS, !isRoot); addAction(aas, Action.CAN_GET_PROPERTIES, true); addAction(aas, Action.CAN_UPDATE_PROPERTIES, !isReadOnly); addAction(aas, Action.CAN_MOVE_OBJECT, !isReadOnly && !isRoot); addAction(aas, Action.CAN_DELETE_OBJECT, !isReadOnly && !isRoot); if (isFolder) { addAction(aas, Action.CAN_GET_DESCENDANTS, true); addAction(aas, Action.CAN_GET_CHILDREN, true); addAction(aas, Action.CAN_GET_FOLDER_PARENT, !isRoot); addAction(aas, Action.CAN_GET_FOLDER_TREE, true); addAction(aas, Action.CAN_CREATE_DOCUMENT, !isReadOnly); addAction(aas, Action.CAN_CREATE_FOLDER, !isReadOnly); addAction(aas, Action.CAN_DELETE_TREE, !isReadOnly); } else { addAction(aas, Action.CAN_GET_CONTENT_STREAM, true); addAction(aas, Action.CAN_SET_CONTENT_STREAM, !isReadOnly); addAction(aas, Action.CAN_GET_ALL_VERSIONS, true); } AllowableActionsImpl result = new AllowableActionsImpl(); result.setAllowableActions(aas); return result; } catch (CmsException e) { handleCmsException(e); return null; } }
[ "protected", "AllowableActions", "collectAllowableActions", "(", "CmsObject", "cms", ",", "CmsResource", "file", ")", "{", "try", "{", "if", "(", "file", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"File must not be null!\"", ")", ";", "}", "CmsLock", "lock", "=", "cms", ".", "getLock", "(", "file", ")", ";", "CmsUser", "user", "=", "cms", ".", "getRequestContext", "(", ")", ".", "getCurrentUser", "(", ")", ";", "boolean", "canWrite", "=", "!", "cms", ".", "getRequestContext", "(", ")", ".", "getCurrentProject", "(", ")", ".", "isOnlineProject", "(", ")", "&&", "(", "lock", ".", "isOwnedBy", "(", "user", ")", "||", "lock", ".", "isLockableBy", "(", "user", ")", ")", "&&", "cms", ".", "hasPermissions", "(", "file", ",", "CmsPermissionSet", ".", "ACCESS_WRITE", ",", "false", ",", "CmsResourceFilter", ".", "DEFAULT", ")", ";", "boolean", "isReadOnly", "=", "!", "canWrite", ";", "boolean", "isFolder", "=", "file", ".", "isFolder", "(", ")", ";", "boolean", "isRoot", "=", "file", ".", "getRootPath", "(", ")", ".", "length", "(", ")", "<=", "1", ";", "Set", "<", "Action", ">", "aas", "=", "new", "LinkedHashSet", "<", "Action", ">", "(", ")", ";", "addAction", "(", "aas", ",", "Action", ".", "CAN_GET_OBJECT_PARENTS", ",", "!", "isRoot", ")", ";", "addAction", "(", "aas", ",", "Action", ".", "CAN_GET_PROPERTIES", ",", "true", ")", ";", "addAction", "(", "aas", ",", "Action", ".", "CAN_UPDATE_PROPERTIES", ",", "!", "isReadOnly", ")", ";", "addAction", "(", "aas", ",", "Action", ".", "CAN_MOVE_OBJECT", ",", "!", "isReadOnly", "&&", "!", "isRoot", ")", ";", "addAction", "(", "aas", ",", "Action", ".", "CAN_DELETE_OBJECT", ",", "!", "isReadOnly", "&&", "!", "isRoot", ")", ";", "if", "(", "isFolder", ")", "{", "addAction", "(", "aas", ",", "Action", ".", "CAN_GET_DESCENDANTS", ",", "true", ")", ";", "addAction", "(", "aas", ",", "Action", ".", "CAN_GET_CHILDREN", ",", "true", ")", ";", "addAction", "(", "aas", ",", "Action", ".", "CAN_GET_FOLDER_PARENT", ",", "!", "isRoot", ")", ";", "addAction", "(", "aas", ",", "Action", ".", "CAN_GET_FOLDER_TREE", ",", "true", ")", ";", "addAction", "(", "aas", ",", "Action", ".", "CAN_CREATE_DOCUMENT", ",", "!", "isReadOnly", ")", ";", "addAction", "(", "aas", ",", "Action", ".", "CAN_CREATE_FOLDER", ",", "!", "isReadOnly", ")", ";", "addAction", "(", "aas", ",", "Action", ".", "CAN_DELETE_TREE", ",", "!", "isReadOnly", ")", ";", "}", "else", "{", "addAction", "(", "aas", ",", "Action", ".", "CAN_GET_CONTENT_STREAM", ",", "true", ")", ";", "addAction", "(", "aas", ",", "Action", ".", "CAN_SET_CONTENT_STREAM", ",", "!", "isReadOnly", ")", ";", "addAction", "(", "aas", ",", "Action", ".", "CAN_GET_ALL_VERSIONS", ",", "true", ")", ";", "}", "AllowableActionsImpl", "result", "=", "new", "AllowableActionsImpl", "(", ")", ";", "result", ".", "setAllowableActions", "(", "aas", ")", ";", "return", "result", ";", "}", "catch", "(", "CmsException", "e", ")", "{", "handleCmsException", "(", "e", ")", ";", "return", "null", ";", "}", "}" ]
Compiles the allowable actions for a file or folder. @param cms the current CMS context @param file the resource for which we want the allowable actions @return the allowable actions for the given resource
[ "Compiles", "the", "allowable", "actions", "for", "a", "file", "or", "folder", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/cmis/CmsCmisResourceHelper.java#L276-L318
158,305
alkacon/opencms-core
src/org/opencms/webdav/CmsWebdavStatus.java
CmsWebdavStatus.getStatusText
public static String getStatusText(int nHttpStatusCode) { Integer intKey = new Integer(nHttpStatusCode); if (!mapStatusCodes.containsKey(intKey)) { return ""; } else { return mapStatusCodes.get(intKey); } }
java
public static String getStatusText(int nHttpStatusCode) { Integer intKey = new Integer(nHttpStatusCode); if (!mapStatusCodes.containsKey(intKey)) { return ""; } else { return mapStatusCodes.get(intKey); } }
[ "public", "static", "String", "getStatusText", "(", "int", "nHttpStatusCode", ")", "{", "Integer", "intKey", "=", "new", "Integer", "(", "nHttpStatusCode", ")", ";", "if", "(", "!", "mapStatusCodes", ".", "containsKey", "(", "intKey", ")", ")", "{", "return", "\"\"", ";", "}", "else", "{", "return", "mapStatusCodes", ".", "get", "(", "intKey", ")", ";", "}", "}" ]
Returns the HTTP status text for the HTTP or WebDav status code specified by looking it up in the static mapping. This is a static function. @param nHttpStatusCode [IN] HTTP or WebDAV status code @return A string with a short descriptive phrase for the HTTP status code (e.g., "OK").
[ "Returns", "the", "HTTP", "status", "text", "for", "the", "HTTP", "or", "WebDav", "status", "code", "specified", "by", "looking", "it", "up", "in", "the", "static", "mapping", ".", "This", "is", "a", "static", "function", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/webdav/CmsWebdavStatus.java#L292-L301
158,306
alkacon/opencms-core
src/org/opencms/cmis/CmsCmisTypeManager.java
CmsCmisTypeManager.addType
private boolean addType(TypeDefinition type) { if (type == null) { return false; } if (type.getBaseTypeId() == null) { return false; } // find base type TypeDefinition baseType = null; if (type.getBaseTypeId() == BaseTypeId.CMIS_DOCUMENT) { baseType = copyTypeDefintion(m_types.get(DOCUMENT_TYPE_ID).getTypeDefinition()); } else if (type.getBaseTypeId() == BaseTypeId.CMIS_FOLDER) { baseType = copyTypeDefintion(m_types.get(FOLDER_TYPE_ID).getTypeDefinition()); } else if (type.getBaseTypeId() == BaseTypeId.CMIS_RELATIONSHIP) { baseType = copyTypeDefintion(m_types.get(RELATIONSHIP_TYPE_ID).getTypeDefinition()); } else if (type.getBaseTypeId() == BaseTypeId.CMIS_POLICY) { baseType = copyTypeDefintion(m_types.get(POLICY_TYPE_ID).getTypeDefinition()); } else { return false; } AbstractTypeDefinition newType = (AbstractTypeDefinition)copyTypeDefintion(type); // copy property definition for (PropertyDefinition<?> propDef : baseType.getPropertyDefinitions().values()) { ((AbstractPropertyDefinition<?>)propDef).setIsInherited(Boolean.TRUE); newType.addPropertyDefinition(propDef); } // add it addTypeInternal(newType); return true; }
java
private boolean addType(TypeDefinition type) { if (type == null) { return false; } if (type.getBaseTypeId() == null) { return false; } // find base type TypeDefinition baseType = null; if (type.getBaseTypeId() == BaseTypeId.CMIS_DOCUMENT) { baseType = copyTypeDefintion(m_types.get(DOCUMENT_TYPE_ID).getTypeDefinition()); } else if (type.getBaseTypeId() == BaseTypeId.CMIS_FOLDER) { baseType = copyTypeDefintion(m_types.get(FOLDER_TYPE_ID).getTypeDefinition()); } else if (type.getBaseTypeId() == BaseTypeId.CMIS_RELATIONSHIP) { baseType = copyTypeDefintion(m_types.get(RELATIONSHIP_TYPE_ID).getTypeDefinition()); } else if (type.getBaseTypeId() == BaseTypeId.CMIS_POLICY) { baseType = copyTypeDefintion(m_types.get(POLICY_TYPE_ID).getTypeDefinition()); } else { return false; } AbstractTypeDefinition newType = (AbstractTypeDefinition)copyTypeDefintion(type); // copy property definition for (PropertyDefinition<?> propDef : baseType.getPropertyDefinitions().values()) { ((AbstractPropertyDefinition<?>)propDef).setIsInherited(Boolean.TRUE); newType.addPropertyDefinition(propDef); } // add it addTypeInternal(newType); return true; }
[ "private", "boolean", "addType", "(", "TypeDefinition", "type", ")", "{", "if", "(", "type", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "type", ".", "getBaseTypeId", "(", ")", "==", "null", ")", "{", "return", "false", ";", "}", "// find base type", "TypeDefinition", "baseType", "=", "null", ";", "if", "(", "type", ".", "getBaseTypeId", "(", ")", "==", "BaseTypeId", ".", "CMIS_DOCUMENT", ")", "{", "baseType", "=", "copyTypeDefintion", "(", "m_types", ".", "get", "(", "DOCUMENT_TYPE_ID", ")", ".", "getTypeDefinition", "(", ")", ")", ";", "}", "else", "if", "(", "type", ".", "getBaseTypeId", "(", ")", "==", "BaseTypeId", ".", "CMIS_FOLDER", ")", "{", "baseType", "=", "copyTypeDefintion", "(", "m_types", ".", "get", "(", "FOLDER_TYPE_ID", ")", ".", "getTypeDefinition", "(", ")", ")", ";", "}", "else", "if", "(", "type", ".", "getBaseTypeId", "(", ")", "==", "BaseTypeId", ".", "CMIS_RELATIONSHIP", ")", "{", "baseType", "=", "copyTypeDefintion", "(", "m_types", ".", "get", "(", "RELATIONSHIP_TYPE_ID", ")", ".", "getTypeDefinition", "(", ")", ")", ";", "}", "else", "if", "(", "type", ".", "getBaseTypeId", "(", ")", "==", "BaseTypeId", ".", "CMIS_POLICY", ")", "{", "baseType", "=", "copyTypeDefintion", "(", "m_types", ".", "get", "(", "POLICY_TYPE_ID", ")", ".", "getTypeDefinition", "(", ")", ")", ";", "}", "else", "{", "return", "false", ";", "}", "AbstractTypeDefinition", "newType", "=", "(", "AbstractTypeDefinition", ")", "copyTypeDefintion", "(", "type", ")", ";", "// copy property definition", "for", "(", "PropertyDefinition", "<", "?", ">", "propDef", ":", "baseType", ".", "getPropertyDefinitions", "(", ")", ".", "values", "(", ")", ")", "{", "(", "(", "AbstractPropertyDefinition", "<", "?", ">", ")", "propDef", ")", ".", "setIsInherited", "(", "Boolean", ".", "TRUE", ")", ";", "newType", ".", "addPropertyDefinition", "(", "propDef", ")", ";", "}", "// add it", "addTypeInternal", "(", "newType", ")", ";", "return", "true", ";", "}" ]
Adds a type to collection with inheriting base type properties. @param type the type definition to add @return true if the type definition was added
[ "Adds", "a", "type", "to", "collection", "with", "inheriting", "base", "type", "properties", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/cmis/CmsCmisTypeManager.java#L948-L983
158,307
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsSecure.java
CmsSecure.buildRadio
public String buildRadio(String propName) throws CmsException { String propVal = readProperty(propName); StringBuffer result = new StringBuffer("<table border=\"0\"><tr>"); result.append("<td><input type=\"radio\" value=\"true\" onClick=\"checkNoIntern()\" name=\"").append( propName).append("\" ").append(Boolean.valueOf(propVal).booleanValue() ? "checked=\"checked\"" : "").append( "/></td><td id=\"tablelabel\">").append(key(Messages.GUI_LABEL_TRUE_0)).append("</td>"); result.append("<td><input type=\"radio\" value=\"false\" onClick=\"checkNoIntern()\" name=\"").append( propName).append("\" ").append(Boolean.valueOf(propVal).booleanValue() ? "" : "checked=\"checked\"").append( "/></td><td id=\"tablelabel\">").append(key(Messages.GUI_LABEL_FALSE_0)).append("</td>"); result.append("<td><input type=\"radio\" value=\"\" onClick=\"checkNoIntern()\" name=\"").append( propName).append("\" ").append(CmsStringUtil.isEmpty(propVal) ? "checked=\"checked\"" : "").append( "/></td><td id=\"tablelabel\">").append(getPropertyInheritanceInfo(propName)).append( "</td></tr></table>"); return result.toString(); }
java
public String buildRadio(String propName) throws CmsException { String propVal = readProperty(propName); StringBuffer result = new StringBuffer("<table border=\"0\"><tr>"); result.append("<td><input type=\"radio\" value=\"true\" onClick=\"checkNoIntern()\" name=\"").append( propName).append("\" ").append(Boolean.valueOf(propVal).booleanValue() ? "checked=\"checked\"" : "").append( "/></td><td id=\"tablelabel\">").append(key(Messages.GUI_LABEL_TRUE_0)).append("</td>"); result.append("<td><input type=\"radio\" value=\"false\" onClick=\"checkNoIntern()\" name=\"").append( propName).append("\" ").append(Boolean.valueOf(propVal).booleanValue() ? "" : "checked=\"checked\"").append( "/></td><td id=\"tablelabel\">").append(key(Messages.GUI_LABEL_FALSE_0)).append("</td>"); result.append("<td><input type=\"radio\" value=\"\" onClick=\"checkNoIntern()\" name=\"").append( propName).append("\" ").append(CmsStringUtil.isEmpty(propVal) ? "checked=\"checked\"" : "").append( "/></td><td id=\"tablelabel\">").append(getPropertyInheritanceInfo(propName)).append( "</td></tr></table>"); return result.toString(); }
[ "public", "String", "buildRadio", "(", "String", "propName", ")", "throws", "CmsException", "{", "String", "propVal", "=", "readProperty", "(", "propName", ")", ";", "StringBuffer", "result", "=", "new", "StringBuffer", "(", "\"<table border=\\\"0\\\"><tr>\"", ")", ";", "result", ".", "append", "(", "\"<td><input type=\\\"radio\\\" value=\\\"true\\\" onClick=\\\"checkNoIntern()\\\" name=\\\"\"", ")", ".", "append", "(", "propName", ")", ".", "append", "(", "\"\\\" \"", ")", ".", "append", "(", "Boolean", ".", "valueOf", "(", "propVal", ")", ".", "booleanValue", "(", ")", "?", "\"checked=\\\"checked\\\"\"", ":", "\"\"", ")", ".", "append", "(", "\"/></td><td id=\\\"tablelabel\\\">\"", ")", ".", "append", "(", "key", "(", "Messages", ".", "GUI_LABEL_TRUE_0", ")", ")", ".", "append", "(", "\"</td>\"", ")", ";", "result", ".", "append", "(", "\"<td><input type=\\\"radio\\\" value=\\\"false\\\" onClick=\\\"checkNoIntern()\\\" name=\\\"\"", ")", ".", "append", "(", "propName", ")", ".", "append", "(", "\"\\\" \"", ")", ".", "append", "(", "Boolean", ".", "valueOf", "(", "propVal", ")", ".", "booleanValue", "(", ")", "?", "\"\"", ":", "\"checked=\\\"checked\\\"\"", ")", ".", "append", "(", "\"/></td><td id=\\\"tablelabel\\\">\"", ")", ".", "append", "(", "key", "(", "Messages", ".", "GUI_LABEL_FALSE_0", ")", ")", ".", "append", "(", "\"</td>\"", ")", ";", "result", ".", "append", "(", "\"<td><input type=\\\"radio\\\" value=\\\"\\\" onClick=\\\"checkNoIntern()\\\" name=\\\"\"", ")", ".", "append", "(", "propName", ")", ".", "append", "(", "\"\\\" \"", ")", ".", "append", "(", "CmsStringUtil", ".", "isEmpty", "(", "propVal", ")", "?", "\"checked=\\\"checked\\\"\"", ":", "\"\"", ")", ".", "append", "(", "\"/></td><td id=\\\"tablelabel\\\">\"", ")", ".", "append", "(", "getPropertyInheritanceInfo", "(", "propName", ")", ")", ".", "append", "(", "\"</td></tr></table>\"", ")", ";", "return", "result", ".", "toString", "(", ")", ";", "}" ]
Builds the radio input to set the export and secure property. @param propName the name of the property to build the radio input for @return html for the radio input @throws CmsException if the reading of a property fails
[ "Builds", "the", "radio", "input", "to", "set", "the", "export", "and", "secure", "property", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsSecure.java#L153-L168
158,308
alkacon/opencms-core
src/org/opencms/workplace/CmsWorkplaceManager.java
CmsWorkplaceManager.setCategoryDisplayOptions
public void setCategoryDisplayOptions( String displayCategoriesByRepository, String displayCategorySelectionCollapsed) { m_displayCategoriesByRepository = Boolean.parseBoolean(displayCategoriesByRepository); m_displayCategorySelectionCollapsed = Boolean.parseBoolean(displayCategorySelectionCollapsed); }
java
public void setCategoryDisplayOptions( String displayCategoriesByRepository, String displayCategorySelectionCollapsed) { m_displayCategoriesByRepository = Boolean.parseBoolean(displayCategoriesByRepository); m_displayCategorySelectionCollapsed = Boolean.parseBoolean(displayCategorySelectionCollapsed); }
[ "public", "void", "setCategoryDisplayOptions", "(", "String", "displayCategoriesByRepository", ",", "String", "displayCategorySelectionCollapsed", ")", "{", "m_displayCategoriesByRepository", "=", "Boolean", ".", "parseBoolean", "(", "displayCategoriesByRepository", ")", ";", "m_displayCategorySelectionCollapsed", "=", "Boolean", ".", "parseBoolean", "(", "displayCategorySelectionCollapsed", ")", ";", "}" ]
Sets the category display options that affect how the category selection dialog is shown. @param displayCategoriesByRepository if true, the categories are shown separated by repository. @param displayCategorySelectionCollapsed if true, the selection dialog opens showing only the top-level categories (or the various repositories) in collapsed state.
[ "Sets", "the", "category", "display", "options", "that", "affect", "how", "the", "category", "selection", "dialog", "is", "shown", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/CmsWorkplaceManager.java#L1857-L1863
158,309
alkacon/opencms-core
src/org/opencms/widgets/serialdate/A_CmsSerialDateBean.java
A_CmsSerialDateBean.showMoreEntries
protected boolean showMoreEntries(Calendar nextDate, int previousOccurrences) { switch (getSerialEndType()) { case DATE: boolean moreByDate = nextDate.getTimeInMillis() < m_endMillis; boolean moreByOccurrences = previousOccurrences < CmsSerialDateUtil.getMaxEvents(); if (moreByDate && !moreByOccurrences) { m_hasTooManyOccurrences = Boolean.TRUE; } return moreByDate && moreByOccurrences; case TIMES: case SINGLE: return previousOccurrences < getOccurrences(); default: throw new IllegalArgumentException(); } }
java
protected boolean showMoreEntries(Calendar nextDate, int previousOccurrences) { switch (getSerialEndType()) { case DATE: boolean moreByDate = nextDate.getTimeInMillis() < m_endMillis; boolean moreByOccurrences = previousOccurrences < CmsSerialDateUtil.getMaxEvents(); if (moreByDate && !moreByOccurrences) { m_hasTooManyOccurrences = Boolean.TRUE; } return moreByDate && moreByOccurrences; case TIMES: case SINGLE: return previousOccurrences < getOccurrences(); default: throw new IllegalArgumentException(); } }
[ "protected", "boolean", "showMoreEntries", "(", "Calendar", "nextDate", ",", "int", "previousOccurrences", ")", "{", "switch", "(", "getSerialEndType", "(", ")", ")", "{", "case", "DATE", ":", "boolean", "moreByDate", "=", "nextDate", ".", "getTimeInMillis", "(", ")", "<", "m_endMillis", ";", "boolean", "moreByOccurrences", "=", "previousOccurrences", "<", "CmsSerialDateUtil", ".", "getMaxEvents", "(", ")", ";", "if", "(", "moreByDate", "&&", "!", "moreByOccurrences", ")", "{", "m_hasTooManyOccurrences", "=", "Boolean", ".", "TRUE", ";", "}", "return", "moreByDate", "&&", "moreByOccurrences", ";", "case", "TIMES", ":", "case", "SINGLE", ":", "return", "previousOccurrences", "<", "getOccurrences", "(", ")", ";", "default", ":", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}" ]
Check if the provided date or any date after it are part of the series. @param nextDate the current date to check. @param previousOccurrences the number of events of the series that took place before the date to check. @return <code>true</code> if more dates (including the provided one) could be in the series, <code>false</code> otherwise.
[ "Check", "if", "the", "provided", "date", "or", "any", "date", "after", "it", "are", "part", "of", "the", "series", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/serialdate/A_CmsSerialDateBean.java#L264-L280
158,310
alkacon/opencms-core
src/org/opencms/widgets/serialdate/A_CmsSerialDateBean.java
A_CmsSerialDateBean.calculateDates
private SortedSet<Date> calculateDates() { if (null == m_allDates) { SortedSet<Date> result = new TreeSet<>(); if (isAnyDatePossible()) { Calendar date = getFirstDate(); int previousOccurrences = 0; while (showMoreEntries(date, previousOccurrences)) { result.add(date.getTime()); toNextDate(date); previousOccurrences++; } } m_allDates = result; } return m_allDates; }
java
private SortedSet<Date> calculateDates() { if (null == m_allDates) { SortedSet<Date> result = new TreeSet<>(); if (isAnyDatePossible()) { Calendar date = getFirstDate(); int previousOccurrences = 0; while (showMoreEntries(date, previousOccurrences)) { result.add(date.getTime()); toNextDate(date); previousOccurrences++; } } m_allDates = result; } return m_allDates; }
[ "private", "SortedSet", "<", "Date", ">", "calculateDates", "(", ")", "{", "if", "(", "null", "==", "m_allDates", ")", "{", "SortedSet", "<", "Date", ">", "result", "=", "new", "TreeSet", "<>", "(", ")", ";", "if", "(", "isAnyDatePossible", "(", ")", ")", "{", "Calendar", "date", "=", "getFirstDate", "(", ")", ";", "int", "previousOccurrences", "=", "0", ";", "while", "(", "showMoreEntries", "(", "date", ",", "previousOccurrences", ")", ")", "{", "result", ".", "add", "(", "date", ".", "getTime", "(", ")", ")", ";", "toNextDate", "(", "date", ")", ";", "previousOccurrences", "++", ";", "}", "}", "m_allDates", "=", "result", ";", "}", "return", "m_allDates", ";", "}" ]
Calculates all dates of the series. @return all dates of the series in milliseconds.
[ "Calculates", "all", "dates", "of", "the", "series", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/serialdate/A_CmsSerialDateBean.java#L292-L308
158,311
alkacon/opencms-core
src/org/opencms/widgets/serialdate/A_CmsSerialDateBean.java
A_CmsSerialDateBean.filterExceptions
private SortedSet<Date> filterExceptions(SortedSet<Date> dates) { SortedSet<Date> result = new TreeSet<Date>(); for (Date d : dates) { if (!m_exceptions.contains(d)) { result.add(d); } } return result; }
java
private SortedSet<Date> filterExceptions(SortedSet<Date> dates) { SortedSet<Date> result = new TreeSet<Date>(); for (Date d : dates) { if (!m_exceptions.contains(d)) { result.add(d); } } return result; }
[ "private", "SortedSet", "<", "Date", ">", "filterExceptions", "(", "SortedSet", "<", "Date", ">", "dates", ")", "{", "SortedSet", "<", "Date", ">", "result", "=", "new", "TreeSet", "<", "Date", ">", "(", ")", ";", "for", "(", "Date", "d", ":", "dates", ")", "{", "if", "(", "!", "m_exceptions", ".", "contains", "(", "d", ")", ")", "{", "result", ".", "add", "(", "d", ")", ";", "}", "}", "return", "result", ";", "}" ]
Filters all exceptions from the provided dates. @param dates the dates to filter. @return the provided dates, except the ones that match some exception.
[ "Filters", "all", "exceptions", "from", "the", "provided", "dates", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/serialdate/A_CmsSerialDateBean.java#L315-L324
158,312
alkacon/opencms-core
src/org/opencms/flex/CmsFlexResponse.java
CmsFlexResponse.setHeaderList
private void setHeaderList(Map<String, List<String>> headers, String name, String value) { List<String> values = new ArrayList<String>(); values.add(SET_HEADER + value); headers.put(name, values); }
java
private void setHeaderList(Map<String, List<String>> headers, String name, String value) { List<String> values = new ArrayList<String>(); values.add(SET_HEADER + value); headers.put(name, values); }
[ "private", "void", "setHeaderList", "(", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "headers", ",", "String", "name", ",", "String", "value", ")", "{", "List", "<", "String", ">", "values", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "values", ".", "add", "(", "SET_HEADER", "+", "value", ")", ";", "headers", ".", "put", "(", "name", ",", "values", ")", ";", "}" ]
Helper method to set a value in the internal header list. @param headers the headers to set the value in @param name the name to set @param value the value to set
[ "Helper", "method", "to", "set", "a", "value", "in", "the", "internal", "header", "list", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/flex/CmsFlexResponse.java#L1198-L1203
158,313
alkacon/opencms-core
src/org/opencms/util/CmsStringUtil.java
CmsStringUtil.changeFileNameSuffixTo
public static String changeFileNameSuffixTo(String filename, String suffix) { int dotPos = filename.lastIndexOf('.'); if (dotPos != -1) { return filename.substring(0, dotPos + 1) + suffix; } else { // the string has no suffix return filename; } }
java
public static String changeFileNameSuffixTo(String filename, String suffix) { int dotPos = filename.lastIndexOf('.'); if (dotPos != -1) { return filename.substring(0, dotPos + 1) + suffix; } else { // the string has no suffix return filename; } }
[ "public", "static", "String", "changeFileNameSuffixTo", "(", "String", "filename", ",", "String", "suffix", ")", "{", "int", "dotPos", "=", "filename", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(", "dotPos", "!=", "-", "1", ")", "{", "return", "filename", ".", "substring", "(", "0", ",", "dotPos", "+", "1", ")", "+", "suffix", ";", "}", "else", "{", "// the string has no suffix", "return", "filename", ";", "}", "}" ]
Changes the given filenames suffix from the current suffix to the provided suffix. <b>Directly exposed for JSP EL</b>, not through {@link org.opencms.jsp.util.CmsJspElFunctions}.<p> @param filename the filename to be changed @param suffix the new suffix of the file @return the filename with the replaced suffix
[ "Changes", "the", "given", "filenames", "suffix", "from", "the", "current", "suffix", "to", "the", "provided", "suffix", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsStringUtil.java#L249-L258
158,314
alkacon/opencms-core
src/org/opencms/util/CmsStringUtil.java
CmsStringUtil.parseDuration
public static final long parseDuration(String durationStr, long defaultValue) { durationStr = durationStr.toLowerCase().trim(); Matcher matcher = DURATION_NUMBER_AND_UNIT_PATTERN.matcher(durationStr); long millis = 0; boolean matched = false; while (matcher.find()) { long number = Long.valueOf(matcher.group(1)).longValue(); String unit = matcher.group(2); long multiplier = 0; for (int j = 0; j < DURATION_UNTIS.length; j++) { if (unit.equals(DURATION_UNTIS[j])) { multiplier = DURATION_MULTIPLIERS[j]; break; } } if (multiplier == 0) { LOG.warn("parseDuration: Unknown unit " + unit); } else { matched = true; } millis += number * multiplier; } if (!matched) { millis = defaultValue; } return millis; }
java
public static final long parseDuration(String durationStr, long defaultValue) { durationStr = durationStr.toLowerCase().trim(); Matcher matcher = DURATION_NUMBER_AND_UNIT_PATTERN.matcher(durationStr); long millis = 0; boolean matched = false; while (matcher.find()) { long number = Long.valueOf(matcher.group(1)).longValue(); String unit = matcher.group(2); long multiplier = 0; for (int j = 0; j < DURATION_UNTIS.length; j++) { if (unit.equals(DURATION_UNTIS[j])) { multiplier = DURATION_MULTIPLIERS[j]; break; } } if (multiplier == 0) { LOG.warn("parseDuration: Unknown unit " + unit); } else { matched = true; } millis += number * multiplier; } if (!matched) { millis = defaultValue; } return millis; }
[ "public", "static", "final", "long", "parseDuration", "(", "String", "durationStr", ",", "long", "defaultValue", ")", "{", "durationStr", "=", "durationStr", ".", "toLowerCase", "(", ")", ".", "trim", "(", ")", ";", "Matcher", "matcher", "=", "DURATION_NUMBER_AND_UNIT_PATTERN", ".", "matcher", "(", "durationStr", ")", ";", "long", "millis", "=", "0", ";", "boolean", "matched", "=", "false", ";", "while", "(", "matcher", ".", "find", "(", ")", ")", "{", "long", "number", "=", "Long", ".", "valueOf", "(", "matcher", ".", "group", "(", "1", ")", ")", ".", "longValue", "(", ")", ";", "String", "unit", "=", "matcher", ".", "group", "(", "2", ")", ";", "long", "multiplier", "=", "0", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "DURATION_UNTIS", ".", "length", ";", "j", "++", ")", "{", "if", "(", "unit", ".", "equals", "(", "DURATION_UNTIS", "[", "j", "]", ")", ")", "{", "multiplier", "=", "DURATION_MULTIPLIERS", "[", "j", "]", ";", "break", ";", "}", "}", "if", "(", "multiplier", "==", "0", ")", "{", "LOG", ".", "warn", "(", "\"parseDuration: Unknown unit \"", "+", "unit", ")", ";", "}", "else", "{", "matched", "=", "true", ";", "}", "millis", "+=", "number", "*", "multiplier", ";", "}", "if", "(", "!", "matched", ")", "{", "millis", "=", "defaultValue", ";", "}", "return", "millis", ";", "}" ]
Parses a duration and returns the corresponding number of milliseconds. Durations consist of a space-separated list of components of the form {number}{time unit}, for example 1d 5m. The available units are d (days), h (hours), m (months), s (seconds), ms (milliseconds).<p> @param durationStr the duration string @param defaultValue the default value to return in case the pattern does not match @return the corresponding number of milliseconds
[ "Parses", "a", "duration", "and", "returns", "the", "corresponding", "number", "of", "milliseconds", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsStringUtil.java#L1366-L1393
158,315
alkacon/opencms-core
src/org/opencms/util/CmsStringUtil.java
CmsStringUtil.readStringTemplateGroup
public static StringTemplateGroup readStringTemplateGroup(InputStream stream) { try { return new StringTemplateGroup( new InputStreamReader(stream, "UTF-8"), DefaultTemplateLexer.class, new StringTemplateErrorListener() { @SuppressWarnings("synthetic-access") public void error(String arg0, Throwable arg1) { LOG.error(arg0 + ": " + arg1.getMessage(), arg1); } @SuppressWarnings("synthetic-access") public void warning(String arg0) { LOG.warn(arg0); } }); } catch (Exception e) { LOG.error(e.getLocalizedMessage(), e); return new StringTemplateGroup("dummy"); } }
java
public static StringTemplateGroup readStringTemplateGroup(InputStream stream) { try { return new StringTemplateGroup( new InputStreamReader(stream, "UTF-8"), DefaultTemplateLexer.class, new StringTemplateErrorListener() { @SuppressWarnings("synthetic-access") public void error(String arg0, Throwable arg1) { LOG.error(arg0 + ": " + arg1.getMessage(), arg1); } @SuppressWarnings("synthetic-access") public void warning(String arg0) { LOG.warn(arg0); } }); } catch (Exception e) { LOG.error(e.getLocalizedMessage(), e); return new StringTemplateGroup("dummy"); } }
[ "public", "static", "StringTemplateGroup", "readStringTemplateGroup", "(", "InputStream", "stream", ")", "{", "try", "{", "return", "new", "StringTemplateGroup", "(", "new", "InputStreamReader", "(", "stream", ",", "\"UTF-8\"", ")", ",", "DefaultTemplateLexer", ".", "class", ",", "new", "StringTemplateErrorListener", "(", ")", "{", "@", "SuppressWarnings", "(", "\"synthetic-access\"", ")", "public", "void", "error", "(", "String", "arg0", ",", "Throwable", "arg1", ")", "{", "LOG", ".", "error", "(", "arg0", "+", "\": \"", "+", "arg1", ".", "getMessage", "(", ")", ",", "arg1", ")", ";", "}", "@", "SuppressWarnings", "(", "\"synthetic-access\"", ")", "public", "void", "warning", "(", "String", "arg0", ")", "{", "LOG", ".", "warn", "(", "arg0", ")", ";", "}", "}", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "LOG", ".", "error", "(", "e", ".", "getLocalizedMessage", "(", ")", ",", "e", ")", ";", "return", "new", "StringTemplateGroup", "(", "\"dummy\"", ")", ";", "}", "}" ]
Reads a stringtemplate group from a stream. This will always return a group (empty if necessary), even if reading it from the stream fails. @param stream the stream to read from @return the string template group
[ "Reads", "a", "stringtemplate", "group", "from", "a", "stream", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsStringUtil.java#L1403-L1428
158,316
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/datebox/CmsDateBoxEvent.java
CmsDateBoxEvent.fire
public static void fire(I_CmsHasDateBoxEventHandlers source, Date date, boolean isTyping) { if (TYPE != null) { CmsDateBoxEvent event = new CmsDateBoxEvent(date, isTyping); source.fireEvent(event); } }
java
public static void fire(I_CmsHasDateBoxEventHandlers source, Date date, boolean isTyping) { if (TYPE != null) { CmsDateBoxEvent event = new CmsDateBoxEvent(date, isTyping); source.fireEvent(event); } }
[ "public", "static", "void", "fire", "(", "I_CmsHasDateBoxEventHandlers", "source", ",", "Date", "date", ",", "boolean", "isTyping", ")", "{", "if", "(", "TYPE", "!=", "null", ")", "{", "CmsDateBoxEvent", "event", "=", "new", "CmsDateBoxEvent", "(", "date", ",", "isTyping", ")", ";", "source", ".", "fireEvent", "(", "event", ")", ";", "}", "}" ]
Fires the event. @param source the event source @param date the date @param isTyping true if event was caused by user pressing key that may have changed the value
[ "Fires", "the", "event", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/datebox/CmsDateBoxEvent.java#L69-L75
158,317
alkacon/opencms-core
src/org/opencms/module/CmsModuleUpdater.java
CmsModuleUpdater.createAndSetModuleImportProject
protected CmsProject createAndSetModuleImportProject(CmsObject cms, CmsModule module) throws CmsException { CmsProject importProject = cms.createProject( org.opencms.module.Messages.get().getBundle(cms.getRequestContext().getLocale()).key( org.opencms.module.Messages.GUI_IMPORT_MODULE_PROJECT_NAME_1, new Object[] {module.getName()}), org.opencms.module.Messages.get().getBundle(cms.getRequestContext().getLocale()).key( org.opencms.module.Messages.GUI_IMPORT_MODULE_PROJECT_DESC_1, new Object[] {module.getName()}), OpenCms.getDefaultUsers().getGroupAdministrators(), OpenCms.getDefaultUsers().getGroupAdministrators(), CmsProject.PROJECT_TYPE_TEMPORARY); cms.getRequestContext().setCurrentProject(importProject); cms.copyResourceToProject("/"); return importProject; }
java
protected CmsProject createAndSetModuleImportProject(CmsObject cms, CmsModule module) throws CmsException { CmsProject importProject = cms.createProject( org.opencms.module.Messages.get().getBundle(cms.getRequestContext().getLocale()).key( org.opencms.module.Messages.GUI_IMPORT_MODULE_PROJECT_NAME_1, new Object[] {module.getName()}), org.opencms.module.Messages.get().getBundle(cms.getRequestContext().getLocale()).key( org.opencms.module.Messages.GUI_IMPORT_MODULE_PROJECT_DESC_1, new Object[] {module.getName()}), OpenCms.getDefaultUsers().getGroupAdministrators(), OpenCms.getDefaultUsers().getGroupAdministrators(), CmsProject.PROJECT_TYPE_TEMPORARY); cms.getRequestContext().setCurrentProject(importProject); cms.copyResourceToProject("/"); return importProject; }
[ "protected", "CmsProject", "createAndSetModuleImportProject", "(", "CmsObject", "cms", ",", "CmsModule", "module", ")", "throws", "CmsException", "{", "CmsProject", "importProject", "=", "cms", ".", "createProject", "(", "org", ".", "opencms", ".", "module", ".", "Messages", ".", "get", "(", ")", ".", "getBundle", "(", "cms", ".", "getRequestContext", "(", ")", ".", "getLocale", "(", ")", ")", ".", "key", "(", "org", ".", "opencms", ".", "module", ".", "Messages", ".", "GUI_IMPORT_MODULE_PROJECT_NAME_1", ",", "new", "Object", "[", "]", "{", "module", ".", "getName", "(", ")", "}", ")", ",", "org", ".", "opencms", ".", "module", ".", "Messages", ".", "get", "(", ")", ".", "getBundle", "(", "cms", ".", "getRequestContext", "(", ")", ".", "getLocale", "(", ")", ")", ".", "key", "(", "org", ".", "opencms", ".", "module", ".", "Messages", ".", "GUI_IMPORT_MODULE_PROJECT_DESC_1", ",", "new", "Object", "[", "]", "{", "module", ".", "getName", "(", ")", "}", ")", ",", "OpenCms", ".", "getDefaultUsers", "(", ")", ".", "getGroupAdministrators", "(", ")", ",", "OpenCms", ".", "getDefaultUsers", "(", ")", ".", "getGroupAdministrators", "(", ")", ",", "CmsProject", ".", "PROJECT_TYPE_TEMPORARY", ")", ";", "cms", ".", "getRequestContext", "(", ")", ".", "setCurrentProject", "(", "importProject", ")", ";", "cms", ".", "copyResourceToProject", "(", "\"/\"", ")", ";", "return", "importProject", ";", "}" ]
Creates the project used to import module resources and sets it on the CmsObject. @param cms the CmsObject to set the project on @param module the module @return the created project @throws CmsException if something goes wrong
[ "Creates", "the", "project", "used", "to", "import", "module", "resources", "and", "sets", "it", "on", "the", "CmsObject", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/module/CmsModuleUpdater.java#L398-L413
158,318
alkacon/opencms-core
src/org/opencms/module/CmsModuleUpdater.java
CmsModuleUpdater.deleteConflictingResources
protected void deleteConflictingResources(CmsObject cms, CmsModule module, Map<CmsUUID, CmsUUID> conflictingIds) throws CmsException, Exception { CmsProject conflictProject = cms.createProject( "Deletion of conflicting resources for " + module.getName(), "Deletion of conflicting resources for " + module.getName(), OpenCms.getDefaultUsers().getGroupAdministrators(), OpenCms.getDefaultUsers().getGroupAdministrators(), CmsProject.PROJECT_TYPE_TEMPORARY); CmsObject deleteCms = OpenCms.initCmsObject(cms); deleteCms.getRequestContext().setCurrentProject(conflictProject); for (CmsUUID vfsId : conflictingIds.values()) { CmsResource toDelete = deleteCms.readResource(vfsId, CmsResourceFilter.ALL); lock(deleteCms, toDelete); deleteCms.deleteResource(toDelete, CmsResource.DELETE_PRESERVE_SIBLINGS); } OpenCms.getPublishManager().publishProject(deleteCms); OpenCms.getPublishManager().waitWhileRunning(); }
java
protected void deleteConflictingResources(CmsObject cms, CmsModule module, Map<CmsUUID, CmsUUID> conflictingIds) throws CmsException, Exception { CmsProject conflictProject = cms.createProject( "Deletion of conflicting resources for " + module.getName(), "Deletion of conflicting resources for " + module.getName(), OpenCms.getDefaultUsers().getGroupAdministrators(), OpenCms.getDefaultUsers().getGroupAdministrators(), CmsProject.PROJECT_TYPE_TEMPORARY); CmsObject deleteCms = OpenCms.initCmsObject(cms); deleteCms.getRequestContext().setCurrentProject(conflictProject); for (CmsUUID vfsId : conflictingIds.values()) { CmsResource toDelete = deleteCms.readResource(vfsId, CmsResourceFilter.ALL); lock(deleteCms, toDelete); deleteCms.deleteResource(toDelete, CmsResource.DELETE_PRESERVE_SIBLINGS); } OpenCms.getPublishManager().publishProject(deleteCms); OpenCms.getPublishManager().waitWhileRunning(); }
[ "protected", "void", "deleteConflictingResources", "(", "CmsObject", "cms", ",", "CmsModule", "module", ",", "Map", "<", "CmsUUID", ",", "CmsUUID", ">", "conflictingIds", ")", "throws", "CmsException", ",", "Exception", "{", "CmsProject", "conflictProject", "=", "cms", ".", "createProject", "(", "\"Deletion of conflicting resources for \"", "+", "module", ".", "getName", "(", ")", ",", "\"Deletion of conflicting resources for \"", "+", "module", ".", "getName", "(", ")", ",", "OpenCms", ".", "getDefaultUsers", "(", ")", ".", "getGroupAdministrators", "(", ")", ",", "OpenCms", ".", "getDefaultUsers", "(", ")", ".", "getGroupAdministrators", "(", ")", ",", "CmsProject", ".", "PROJECT_TYPE_TEMPORARY", ")", ";", "CmsObject", "deleteCms", "=", "OpenCms", ".", "initCmsObject", "(", "cms", ")", ";", "deleteCms", ".", "getRequestContext", "(", ")", ".", "setCurrentProject", "(", "conflictProject", ")", ";", "for", "(", "CmsUUID", "vfsId", ":", "conflictingIds", ".", "values", "(", ")", ")", "{", "CmsResource", "toDelete", "=", "deleteCms", ".", "readResource", "(", "vfsId", ",", "CmsResourceFilter", ".", "ALL", ")", ";", "lock", "(", "deleteCms", ",", "toDelete", ")", ";", "deleteCms", ".", "deleteResource", "(", "toDelete", ",", "CmsResource", ".", "DELETE_PRESERVE_SIBLINGS", ")", ";", "}", "OpenCms", ".", "getPublishManager", "(", ")", ".", "publishProject", "(", "deleteCms", ")", ";", "OpenCms", ".", "getPublishManager", "(", ")", ".", "waitWhileRunning", "(", ")", ";", "}" ]
Deletes and publishes resources with ID conflicts. @param cms the CMS context to use @param module the module @param conflictingIds the conflicting ids @throws CmsException if something goes wrong @throws Exception if something goes wrong
[ "Deletes", "and", "publishes", "resources", "with", "ID", "conflicts", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/module/CmsModuleUpdater.java#L424-L442
158,319
alkacon/opencms-core
src/org/opencms/module/CmsModuleUpdater.java
CmsModuleUpdater.parseLinks
protected void parseLinks(CmsObject cms) throws CmsException { List<CmsResource> linkParseables = new ArrayList<>(); for (CmsResourceImportData resData : m_moduleData.getResourceData()) { CmsResource importRes = resData.getImportResource(); if ((importRes != null) && m_importIds.contains(importRes.getStructureId()) && isLinkParsable(importRes)) { linkParseables.add(importRes); } } m_report.println(Messages.get().container(Messages.RPT_START_PARSE_LINKS_0), I_CmsReport.FORMAT_HEADLINE); CmsImportVersion10.parseLinks(cms, linkParseables, m_report); m_report.println(Messages.get().container(Messages.RPT_END_PARSE_LINKS_0), I_CmsReport.FORMAT_HEADLINE); }
java
protected void parseLinks(CmsObject cms) throws CmsException { List<CmsResource> linkParseables = new ArrayList<>(); for (CmsResourceImportData resData : m_moduleData.getResourceData()) { CmsResource importRes = resData.getImportResource(); if ((importRes != null) && m_importIds.contains(importRes.getStructureId()) && isLinkParsable(importRes)) { linkParseables.add(importRes); } } m_report.println(Messages.get().container(Messages.RPT_START_PARSE_LINKS_0), I_CmsReport.FORMAT_HEADLINE); CmsImportVersion10.parseLinks(cms, linkParseables, m_report); m_report.println(Messages.get().container(Messages.RPT_END_PARSE_LINKS_0), I_CmsReport.FORMAT_HEADLINE); }
[ "protected", "void", "parseLinks", "(", "CmsObject", "cms", ")", "throws", "CmsException", "{", "List", "<", "CmsResource", ">", "linkParseables", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "CmsResourceImportData", "resData", ":", "m_moduleData", ".", "getResourceData", "(", ")", ")", "{", "CmsResource", "importRes", "=", "resData", ".", "getImportResource", "(", ")", ";", "if", "(", "(", "importRes", "!=", "null", ")", "&&", "m_importIds", ".", "contains", "(", "importRes", ".", "getStructureId", "(", ")", ")", "&&", "isLinkParsable", "(", "importRes", ")", ")", "{", "linkParseables", ".", "add", "(", "importRes", ")", ";", "}", "}", "m_report", ".", "println", "(", "Messages", ".", "get", "(", ")", ".", "container", "(", "Messages", ".", "RPT_START_PARSE_LINKS_0", ")", ",", "I_CmsReport", ".", "FORMAT_HEADLINE", ")", ";", "CmsImportVersion10", ".", "parseLinks", "(", "cms", ",", "linkParseables", ",", "m_report", ")", ";", "m_report", ".", "println", "(", "Messages", ".", "get", "(", ")", ".", "container", "(", "Messages", ".", "RPT_END_PARSE_LINKS_0", ")", ",", "I_CmsReport", ".", "FORMAT_HEADLINE", ")", ";", "}" ]
Parses links for XMLContents etc. @param cms the CMS context to use @throws CmsException if something goes wrong
[ "Parses", "links", "for", "XMLContents", "etc", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/module/CmsModuleUpdater.java#L450-L462
158,320
alkacon/opencms-core
src/org/opencms/module/CmsModuleUpdater.java
CmsModuleUpdater.processDeletions
protected void processDeletions(CmsObject cms, List<CmsResource> toDelete) throws CmsException { Collections.sort(toDelete, (a, b) -> b.getRootPath().compareTo(a.getRootPath())); for (CmsResource deleteRes : toDelete) { m_report.print( org.opencms.importexport.Messages.get().container(org.opencms.importexport.Messages.RPT_DELFOLDER_0), I_CmsReport.FORMAT_NOTE); m_report.print( org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_ARGUMENT_1, deleteRes.getRootPath())); CmsLock lock = cms.getLock(deleteRes); if (lock.isUnlocked()) { lock(cms, deleteRes); } cms.deleteResource(deleteRes, CmsResource.DELETE_PRESERVE_SIBLINGS); m_report.println( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0), I_CmsReport.FORMAT_OK); } }
java
protected void processDeletions(CmsObject cms, List<CmsResource> toDelete) throws CmsException { Collections.sort(toDelete, (a, b) -> b.getRootPath().compareTo(a.getRootPath())); for (CmsResource deleteRes : toDelete) { m_report.print( org.opencms.importexport.Messages.get().container(org.opencms.importexport.Messages.RPT_DELFOLDER_0), I_CmsReport.FORMAT_NOTE); m_report.print( org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_ARGUMENT_1, deleteRes.getRootPath())); CmsLock lock = cms.getLock(deleteRes); if (lock.isUnlocked()) { lock(cms, deleteRes); } cms.deleteResource(deleteRes, CmsResource.DELETE_PRESERVE_SIBLINGS); m_report.println( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0), I_CmsReport.FORMAT_OK); } }
[ "protected", "void", "processDeletions", "(", "CmsObject", "cms", ",", "List", "<", "CmsResource", ">", "toDelete", ")", "throws", "CmsException", "{", "Collections", ".", "sort", "(", "toDelete", ",", "(", "a", ",", "b", ")", "->", "b", ".", "getRootPath", "(", ")", ".", "compareTo", "(", "a", ".", "getRootPath", "(", ")", ")", ")", ";", "for", "(", "CmsResource", "deleteRes", ":", "toDelete", ")", "{", "m_report", ".", "print", "(", "org", ".", "opencms", ".", "importexport", ".", "Messages", ".", "get", "(", ")", ".", "container", "(", "org", ".", "opencms", ".", "importexport", ".", "Messages", ".", "RPT_DELFOLDER_0", ")", ",", "I_CmsReport", ".", "FORMAT_NOTE", ")", ";", "m_report", ".", "print", "(", "org", ".", "opencms", ".", "report", ".", "Messages", ".", "get", "(", ")", ".", "container", "(", "org", ".", "opencms", ".", "report", ".", "Messages", ".", "RPT_ARGUMENT_1", ",", "deleteRes", ".", "getRootPath", "(", ")", ")", ")", ";", "CmsLock", "lock", "=", "cms", ".", "getLock", "(", "deleteRes", ")", ";", "if", "(", "lock", ".", "isUnlocked", "(", ")", ")", "{", "lock", "(", "cms", ",", "deleteRes", ")", ";", "}", "cms", ".", "deleteResource", "(", "deleteRes", ",", "CmsResource", ".", "DELETE_PRESERVE_SIBLINGS", ")", ";", "m_report", ".", "println", "(", "org", ".", "opencms", ".", "report", ".", "Messages", ".", "get", "(", ")", ".", "container", "(", "org", ".", "opencms", ".", "report", ".", "Messages", ".", "RPT_OK_0", ")", ",", "I_CmsReport", ".", "FORMAT_OK", ")", ";", "}", "}" ]
Handles the file deletions. @param cms the CMS context to use @param toDelete the resources to delete @throws CmsException if something goes wrong
[ "Handles", "the", "file", "deletions", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/module/CmsModuleUpdater.java#L472-L493
158,321
alkacon/opencms-core
src/org/opencms/module/CmsModuleUpdater.java
CmsModuleUpdater.runImportScript
protected void runImportScript(CmsObject cms, CmsModule module) { LOG.info("Executing import script for module " + module.getName()); m_report.println( org.opencms.module.Messages.get().container(org.opencms.module.Messages.RPT_IMPORT_SCRIPT_HEADER_0), I_CmsReport.FORMAT_HEADLINE); String importScript = "echo on\n" + module.getImportScript(); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); PrintStream out = new PrintStream(buffer); CmsShell shell = new CmsShell(cms, "${user}@${project}:${siteroot}|${uri}>", null, out, out); shell.execute(importScript); String outputString = buffer.toString(); LOG.info("Shell output for import script was: \n" + outputString); m_report.println( org.opencms.module.Messages.get().container( org.opencms.module.Messages.RPT_IMPORT_SCRIPT_OUTPUT_1, outputString)); }
java
protected void runImportScript(CmsObject cms, CmsModule module) { LOG.info("Executing import script for module " + module.getName()); m_report.println( org.opencms.module.Messages.get().container(org.opencms.module.Messages.RPT_IMPORT_SCRIPT_HEADER_0), I_CmsReport.FORMAT_HEADLINE); String importScript = "echo on\n" + module.getImportScript(); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); PrintStream out = new PrintStream(buffer); CmsShell shell = new CmsShell(cms, "${user}@${project}:${siteroot}|${uri}>", null, out, out); shell.execute(importScript); String outputString = buffer.toString(); LOG.info("Shell output for import script was: \n" + outputString); m_report.println( org.opencms.module.Messages.get().container( org.opencms.module.Messages.RPT_IMPORT_SCRIPT_OUTPUT_1, outputString)); }
[ "protected", "void", "runImportScript", "(", "CmsObject", "cms", ",", "CmsModule", "module", ")", "{", "LOG", ".", "info", "(", "\"Executing import script for module \"", "+", "module", ".", "getName", "(", ")", ")", ";", "m_report", ".", "println", "(", "org", ".", "opencms", ".", "module", ".", "Messages", ".", "get", "(", ")", ".", "container", "(", "org", ".", "opencms", ".", "module", ".", "Messages", ".", "RPT_IMPORT_SCRIPT_HEADER_0", ")", ",", "I_CmsReport", ".", "FORMAT_HEADLINE", ")", ";", "String", "importScript", "=", "\"echo on\\n\"", "+", "module", ".", "getImportScript", "(", ")", ";", "ByteArrayOutputStream", "buffer", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "PrintStream", "out", "=", "new", "PrintStream", "(", "buffer", ")", ";", "CmsShell", "shell", "=", "new", "CmsShell", "(", "cms", ",", "\"${user}@${project}:${siteroot}|${uri}>\"", ",", "null", ",", "out", ",", "out", ")", ";", "shell", ".", "execute", "(", "importScript", ")", ";", "String", "outputString", "=", "buffer", ".", "toString", "(", ")", ";", "LOG", ".", "info", "(", "\"Shell output for import script was: \\n\"", "+", "outputString", ")", ";", "m_report", ".", "println", "(", "org", ".", "opencms", ".", "module", ".", "Messages", ".", "get", "(", ")", ".", "container", "(", "org", ".", "opencms", ".", "module", ".", "Messages", ".", "RPT_IMPORT_SCRIPT_OUTPUT_1", ",", "outputString", ")", ")", ";", "}" ]
Runs the module import script. @param cms the CMS context to use @param module the module for which to run the script
[ "Runs", "the", "module", "import", "script", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/module/CmsModuleUpdater.java#L607-L624
158,322
alkacon/opencms-core
src/org/opencms/jsp/util/CmsJspVfsAccessBean.java
CmsJspVfsAccessBean.getAvailableLocales
public Map<String, List<Locale>> getAvailableLocales() { if (m_availableLocales == null) { // create lazy map only on demand m_availableLocales = CmsCollectionsGenericWrapper.createLazyMap(new CmsAvailableLocaleLoaderTransformer()); } return m_availableLocales; }
java
public Map<String, List<Locale>> getAvailableLocales() { if (m_availableLocales == null) { // create lazy map only on demand m_availableLocales = CmsCollectionsGenericWrapper.createLazyMap(new CmsAvailableLocaleLoaderTransformer()); } return m_availableLocales; }
[ "public", "Map", "<", "String", ",", "List", "<", "Locale", ">", ">", "getAvailableLocales", "(", ")", "{", "if", "(", "m_availableLocales", "==", "null", ")", "{", "// create lazy map only on demand", "m_availableLocales", "=", "CmsCollectionsGenericWrapper", ".", "createLazyMap", "(", "new", "CmsAvailableLocaleLoaderTransformer", "(", ")", ")", ";", "}", "return", "m_availableLocales", ";", "}" ]
Returns a lazily generated map from site paths of resources to the available locales for the resource. @return a lazily generated map from site paths of resources to the available locales for the resource.
[ "Returns", "a", "lazily", "generated", "map", "from", "site", "paths", "of", "resources", "to", "the", "available", "locales", "for", "the", "resource", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspVfsAccessBean.java#L402-L409
158,323
alkacon/opencms-core
src/org/opencms/module/CmsModule.java
CmsModule.adjustSiteRootIfNecessary
private static CmsObject adjustSiteRootIfNecessary(final CmsObject cms, final CmsModule module) throws CmsException { CmsObject cmsClone; if ((null == module.getSite()) || cms.getRequestContext().getSiteRoot().equals(module.getSite())) { cmsClone = cms; } else { cmsClone = OpenCms.initCmsObject(cms); cmsClone.getRequestContext().setSiteRoot(module.getSite()); } return cmsClone; }
java
private static CmsObject adjustSiteRootIfNecessary(final CmsObject cms, final CmsModule module) throws CmsException { CmsObject cmsClone; if ((null == module.getSite()) || cms.getRequestContext().getSiteRoot().equals(module.getSite())) { cmsClone = cms; } else { cmsClone = OpenCms.initCmsObject(cms); cmsClone.getRequestContext().setSiteRoot(module.getSite()); } return cmsClone; }
[ "private", "static", "CmsObject", "adjustSiteRootIfNecessary", "(", "final", "CmsObject", "cms", ",", "final", "CmsModule", "module", ")", "throws", "CmsException", "{", "CmsObject", "cmsClone", ";", "if", "(", "(", "null", "==", "module", ".", "getSite", "(", ")", ")", "||", "cms", ".", "getRequestContext", "(", ")", ".", "getSiteRoot", "(", ")", ".", "equals", "(", "module", ".", "getSite", "(", ")", ")", ")", "{", "cmsClone", "=", "cms", ";", "}", "else", "{", "cmsClone", "=", "OpenCms", ".", "initCmsObject", "(", "cms", ")", ";", "cmsClone", ".", "getRequestContext", "(", ")", ".", "setSiteRoot", "(", "module", ".", "getSite", "(", ")", ")", ";", "}", "return", "cmsClone", ";", "}" ]
Adjusts the site root and returns a cloned CmsObject, iff the module has set an import site that differs from the site root of the CmsObject provided as argument. Otherwise returns the provided CmsObject unchanged. @param cms The original CmsObject. @param module The module where the import site is read from. @return The original CmsObject, or, if necessary, a clone with adjusted site root @throws CmsException see {@link OpenCms#initCmsObject(CmsObject)}
[ "Adjusts", "the", "site", "root", "and", "returns", "a", "cloned", "CmsObject", "iff", "the", "module", "has", "set", "an", "import", "site", "that", "differs", "from", "the", "site", "root", "of", "the", "CmsObject", "provided", "as", "argument", ".", "Otherwise", "returns", "the", "provided", "CmsObject", "unchanged", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/module/CmsModule.java#L475-L487
158,324
alkacon/opencms-core
src/org/opencms/module/CmsModule.java
CmsModule.shouldIncrementVersionBasedOnResources
public boolean shouldIncrementVersionBasedOnResources(CmsObject cms) throws CmsException { if (m_checkpointTime == 0) { return true; } // adjust the site root, if necessary CmsObject cmsClone = adjustSiteRootIfNecessary(cms, this); // calculate the module resources List<CmsResource> moduleResources = calculateModuleResources(cmsClone, this); for (CmsResource resource : moduleResources) { try { List<CmsResource> resourcesToCheck = Lists.newArrayList(); resourcesToCheck.add(resource); if (resource.isFolder()) { resourcesToCheck.addAll(cms.readResources(resource, CmsResourceFilter.IGNORE_EXPIRATION, true)); } for (CmsResource resourceToCheck : resourcesToCheck) { if (resourceToCheck.getDateLastModified() > m_checkpointTime) { return true; } } } catch (CmsException e) { LOG.warn(e.getLocalizedMessage(), e); continue; } } return false; }
java
public boolean shouldIncrementVersionBasedOnResources(CmsObject cms) throws CmsException { if (m_checkpointTime == 0) { return true; } // adjust the site root, if necessary CmsObject cmsClone = adjustSiteRootIfNecessary(cms, this); // calculate the module resources List<CmsResource> moduleResources = calculateModuleResources(cmsClone, this); for (CmsResource resource : moduleResources) { try { List<CmsResource> resourcesToCheck = Lists.newArrayList(); resourcesToCheck.add(resource); if (resource.isFolder()) { resourcesToCheck.addAll(cms.readResources(resource, CmsResourceFilter.IGNORE_EXPIRATION, true)); } for (CmsResource resourceToCheck : resourcesToCheck) { if (resourceToCheck.getDateLastModified() > m_checkpointTime) { return true; } } } catch (CmsException e) { LOG.warn(e.getLocalizedMessage(), e); continue; } } return false; }
[ "public", "boolean", "shouldIncrementVersionBasedOnResources", "(", "CmsObject", "cms", ")", "throws", "CmsException", "{", "if", "(", "m_checkpointTime", "==", "0", ")", "{", "return", "true", ";", "}", "// adjust the site root, if necessary", "CmsObject", "cmsClone", "=", "adjustSiteRootIfNecessary", "(", "cms", ",", "this", ")", ";", "// calculate the module resources", "List", "<", "CmsResource", ">", "moduleResources", "=", "calculateModuleResources", "(", "cmsClone", ",", "this", ")", ";", "for", "(", "CmsResource", "resource", ":", "moduleResources", ")", "{", "try", "{", "List", "<", "CmsResource", ">", "resourcesToCheck", "=", "Lists", ".", "newArrayList", "(", ")", ";", "resourcesToCheck", ".", "add", "(", "resource", ")", ";", "if", "(", "resource", ".", "isFolder", "(", ")", ")", "{", "resourcesToCheck", ".", "addAll", "(", "cms", ".", "readResources", "(", "resource", ",", "CmsResourceFilter", ".", "IGNORE_EXPIRATION", ",", "true", ")", ")", ";", "}", "for", "(", "CmsResource", "resourceToCheck", ":", "resourcesToCheck", ")", "{", "if", "(", "resourceToCheck", ".", "getDateLastModified", "(", ")", ">", "m_checkpointTime", ")", "{", "return", "true", ";", "}", "}", "}", "catch", "(", "CmsException", "e", ")", "{", "LOG", ".", "warn", "(", "e", ".", "getLocalizedMessage", "(", ")", ",", "e", ")", ";", "continue", ";", "}", "}", "return", "false", ";", "}" ]
Determines if the version should be incremented based on the module resources' modification dates. @param cms the CMS context @return true if the version number should be incremented @throws CmsException if something goes wrong
[ "Determines", "if", "the", "version", "should", "be", "incremented", "based", "on", "the", "module", "resources", "modification", "dates", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/module/CmsModule.java#L1667-L1697
158,325
alkacon/opencms-core
src/org/opencms/ui/apps/dbmanager/sqlconsole/CmsSqlConsoleResults.java
CmsSqlConsoleResults.getColumnType
public Class<?> getColumnType(int c) { for (int r = 0; r < m_data.size(); r++) { Object val = m_data.get(r).get(c); if (val != null) { return val.getClass(); } } return Object.class; }
java
public Class<?> getColumnType(int c) { for (int r = 0; r < m_data.size(); r++) { Object val = m_data.get(r).get(c); if (val != null) { return val.getClass(); } } return Object.class; }
[ "public", "Class", "<", "?", ">", "getColumnType", "(", "int", "c", ")", "{", "for", "(", "int", "r", "=", "0", ";", "r", "<", "m_data", ".", "size", "(", ")", ";", "r", "++", ")", "{", "Object", "val", "=", "m_data", ".", "get", "(", "r", ")", ".", "get", "(", "c", ")", ";", "if", "(", "val", "!=", "null", ")", "{", "return", "val", ".", "getClass", "(", ")", ";", "}", "}", "return", "Object", ".", "class", ";", "}" ]
Gets the type to use for the Vaadin table column corresponding to the c-th column in this result. @param c the column index @return the class to use for the c-th Vaadin table column
[ "Gets", "the", "type", "to", "use", "for", "the", "Vaadin", "table", "column", "corresponding", "to", "the", "c", "-", "th", "column", "in", "this", "result", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/dbmanager/sqlconsole/CmsSqlConsoleResults.java#L77-L86
158,326
alkacon/opencms-core
src/org/opencms/ui/apps/dbmanager/sqlconsole/CmsSqlConsoleResults.java
CmsSqlConsoleResults.getCsv
public String getCsv() { StringWriter writer = new StringWriter(); try (CSVWriter csv = new CSVWriter(writer)) { List<String> headers = new ArrayList<>(); for (String col : m_columns) { headers.add(col); } csv.writeNext(headers.toArray(new String[] {})); for (List<Object> row : m_data) { List<String> colCsv = new ArrayList<>(); for (Object col : row) { colCsv.add(String.valueOf(col)); } csv.writeNext(colCsv.toArray(new String[] {})); } return writer.toString(); } catch (IOException e) { return null; } }
java
public String getCsv() { StringWriter writer = new StringWriter(); try (CSVWriter csv = new CSVWriter(writer)) { List<String> headers = new ArrayList<>(); for (String col : m_columns) { headers.add(col); } csv.writeNext(headers.toArray(new String[] {})); for (List<Object> row : m_data) { List<String> colCsv = new ArrayList<>(); for (Object col : row) { colCsv.add(String.valueOf(col)); } csv.writeNext(colCsv.toArray(new String[] {})); } return writer.toString(); } catch (IOException e) { return null; } }
[ "public", "String", "getCsv", "(", ")", "{", "StringWriter", "writer", "=", "new", "StringWriter", "(", ")", ";", "try", "(", "CSVWriter", "csv", "=", "new", "CSVWriter", "(", "writer", ")", ")", "{", "List", "<", "String", ">", "headers", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "String", "col", ":", "m_columns", ")", "{", "headers", ".", "add", "(", "col", ")", ";", "}", "csv", ".", "writeNext", "(", "headers", ".", "toArray", "(", "new", "String", "[", "]", "{", "}", ")", ")", ";", "for", "(", "List", "<", "Object", ">", "row", ":", "m_data", ")", "{", "List", "<", "String", ">", "colCsv", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Object", "col", ":", "row", ")", "{", "colCsv", ".", "add", "(", "String", ".", "valueOf", "(", "col", ")", ")", ";", "}", "csv", ".", "writeNext", "(", "colCsv", ".", "toArray", "(", "new", "String", "[", "]", "{", "}", ")", ")", ";", "}", "return", "writer", ".", "toString", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "return", "null", ";", "}", "}" ]
Converts the results to CSV data. @return the CSV data
[ "Converts", "the", "results", "to", "CSV", "data", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/dbmanager/sqlconsole/CmsSqlConsoleResults.java#L93-L113
158,327
alkacon/opencms-core
src/org/opencms/ade/containerpage/inherited/CmsContainerConfigurationCacheState.java
CmsContainerConfigurationCacheState.getBasePath
protected String getBasePath(String rootPath) { if (rootPath.endsWith(INHERITANCE_CONFIG_FILE_NAME)) { return rootPath.substring(0, rootPath.length() - INHERITANCE_CONFIG_FILE_NAME.length()); } return rootPath; }
java
protected String getBasePath(String rootPath) { if (rootPath.endsWith(INHERITANCE_CONFIG_FILE_NAME)) { return rootPath.substring(0, rootPath.length() - INHERITANCE_CONFIG_FILE_NAME.length()); } return rootPath; }
[ "protected", "String", "getBasePath", "(", "String", "rootPath", ")", "{", "if", "(", "rootPath", ".", "endsWith", "(", "INHERITANCE_CONFIG_FILE_NAME", ")", ")", "{", "return", "rootPath", ".", "substring", "(", "0", ",", "rootPath", ".", "length", "(", ")", "-", "INHERITANCE_CONFIG_FILE_NAME", ".", "length", "(", ")", ")", ";", "}", "return", "rootPath", ";", "}" ]
Returns the base path for a given configuration file. E.g. the result for the input '/sites/default/.container-config' will be '/sites/default'.<p> @param rootPath the root path of the configuration file @return the base path for the configuration file
[ "Returns", "the", "base", "path", "for", "a", "given", "configuration", "file", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/containerpage/inherited/CmsContainerConfigurationCacheState.java#L129-L135
158,328
alkacon/opencms-core
src/org/opencms/acacia/shared/CmsWidgetUtil.java
CmsWidgetUtil.getStringOption
public static String getStringOption(Map<String, String> configOptions, String optionKey, String defaultValue) { String result = configOptions.get(optionKey); return null != result ? result : defaultValue; }
java
public static String getStringOption(Map<String, String> configOptions, String optionKey, String defaultValue) { String result = configOptions.get(optionKey); return null != result ? result : defaultValue; }
[ "public", "static", "String", "getStringOption", "(", "Map", "<", "String", ",", "String", ">", "configOptions", ",", "String", "optionKey", ",", "String", "defaultValue", ")", "{", "String", "result", "=", "configOptions", ".", "get", "(", "optionKey", ")", ";", "return", "null", "!=", "result", "?", "result", ":", "defaultValue", ";", "}" ]
Returns the value of an option, or the default if the value is null or the key is not part of the map. @param configOptions the map with the config options. @param optionKey the option to get the value of @param defaultValue the default value to return if the option is not set. @return the value of an option, or the default if the value is null or the key is not part of the map.
[ "Returns", "the", "value", "of", "an", "option", "or", "the", "default", "if", "the", "value", "is", "null", "or", "the", "key", "is", "not", "part", "of", "the", "map", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/CmsWidgetUtil.java#L82-L86
158,329
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/CmsMultiSelectWidget.java
CmsMultiSelectWidget.generateValue
private String generateValue() { String result = ""; for (CmsCheckBox checkbox : m_checkboxes) { if (checkbox.isChecked()) { result += checkbox.getInternalValue() + ","; } } if (result.contains(",")) { result = result.substring(0, result.lastIndexOf(",")); } return result; }
java
private String generateValue() { String result = ""; for (CmsCheckBox checkbox : m_checkboxes) { if (checkbox.isChecked()) { result += checkbox.getInternalValue() + ","; } } if (result.contains(",")) { result = result.substring(0, result.lastIndexOf(",")); } return result; }
[ "private", "String", "generateValue", "(", ")", "{", "String", "result", "=", "\"\"", ";", "for", "(", "CmsCheckBox", "checkbox", ":", "m_checkboxes", ")", "{", "if", "(", "checkbox", ".", "isChecked", "(", ")", ")", "{", "result", "+=", "checkbox", ".", "getInternalValue", "(", ")", "+", "\",\"", ";", "}", "}", "if", "(", "result", ".", "contains", "(", "\",\"", ")", ")", "{", "result", "=", "result", ".", "substring", "(", "0", ",", "result", ".", "lastIndexOf", "(", "\",\"", ")", ")", ";", "}", "return", "result", ";", "}" ]
Generate a string with all selected checkboxes separated with ','. @return a string with all selected checkboxes
[ "Generate", "a", "string", "with", "all", "selected", "checkboxes", "separated", "with", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/CmsMultiSelectWidget.java#L347-L359
158,330
alkacon/opencms-core
src/org/opencms/ui/apps/dbmanager/sqlconsole/CmsSqlConsoleLayout.java
CmsSqlConsoleLayout.runQuery
protected void runQuery() { String pool = m_pool.getValue(); String stmt = m_script.getValue(); if (stmt.trim().isEmpty()) { return; } CmsStringBufferReport report = new CmsStringBufferReport(Locale.ENGLISH); List<Throwable> errors = new ArrayList<>(); CmsSqlConsoleResults result = m_console.execute(stmt, pool, report, errors); if (errors.size() > 0) { CmsErrorDialog.showErrorDialog(report.toString() + errors.get(0).getMessage(), errors.get(0)); } else { Window window = CmsBasicDialog.prepareWindow(DialogWidth.max); window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_SQLCONSOLE_QUERY_RESULTS_0)); window.setContent(new CmsSqlConsoleResultsForm(result, report.toString())); A_CmsUI.get().addWindow(window); window.center(); } }
java
protected void runQuery() { String pool = m_pool.getValue(); String stmt = m_script.getValue(); if (stmt.trim().isEmpty()) { return; } CmsStringBufferReport report = new CmsStringBufferReport(Locale.ENGLISH); List<Throwable> errors = new ArrayList<>(); CmsSqlConsoleResults result = m_console.execute(stmt, pool, report, errors); if (errors.size() > 0) { CmsErrorDialog.showErrorDialog(report.toString() + errors.get(0).getMessage(), errors.get(0)); } else { Window window = CmsBasicDialog.prepareWindow(DialogWidth.max); window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_SQLCONSOLE_QUERY_RESULTS_0)); window.setContent(new CmsSqlConsoleResultsForm(result, report.toString())); A_CmsUI.get().addWindow(window); window.center(); } }
[ "protected", "void", "runQuery", "(", ")", "{", "String", "pool", "=", "m_pool", ".", "getValue", "(", ")", ";", "String", "stmt", "=", "m_script", ".", "getValue", "(", ")", ";", "if", "(", "stmt", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "return", ";", "}", "CmsStringBufferReport", "report", "=", "new", "CmsStringBufferReport", "(", "Locale", ".", "ENGLISH", ")", ";", "List", "<", "Throwable", ">", "errors", "=", "new", "ArrayList", "<>", "(", ")", ";", "CmsSqlConsoleResults", "result", "=", "m_console", ".", "execute", "(", "stmt", ",", "pool", ",", "report", ",", "errors", ")", ";", "if", "(", "errors", ".", "size", "(", ")", ">", "0", ")", "{", "CmsErrorDialog", ".", "showErrorDialog", "(", "report", ".", "toString", "(", ")", "+", "errors", ".", "get", "(", "0", ")", ".", "getMessage", "(", ")", ",", "errors", ".", "get", "(", "0", ")", ")", ";", "}", "else", "{", "Window", "window", "=", "CmsBasicDialog", ".", "prepareWindow", "(", "DialogWidth", ".", "max", ")", ";", "window", ".", "setCaption", "(", "CmsVaadinUtils", ".", "getMessageText", "(", "Messages", ".", "GUI_SQLCONSOLE_QUERY_RESULTS_0", ")", ")", ";", "window", ".", "setContent", "(", "new", "CmsSqlConsoleResultsForm", "(", "result", ",", "report", ".", "toString", "(", ")", ")", ")", ";", "A_CmsUI", ".", "get", "(", ")", ".", "addWindow", "(", "window", ")", ";", "window", ".", "center", "(", ")", ";", "}", "}" ]
Runs the currently entered query and displays the results.
[ "Runs", "the", "currently", "entered", "query", "and", "displays", "the", "results", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/dbmanager/sqlconsole/CmsSqlConsoleLayout.java#L88-L108
158,331
alkacon/opencms-core
src-setup/org/opencms/setup/CmsSetupUI.java
CmsSetupUI.getSetupPage
public static Resource getSetupPage(I_SetupUiContext context, String name) { String path = CmsStringUtil.joinPaths(context.getSetupBean().getContextPath(), CmsSetupBean.FOLDER_SETUP, name); Resource resource = new ExternalResource(path); return resource; }
java
public static Resource getSetupPage(I_SetupUiContext context, String name) { String path = CmsStringUtil.joinPaths(context.getSetupBean().getContextPath(), CmsSetupBean.FOLDER_SETUP, name); Resource resource = new ExternalResource(path); return resource; }
[ "public", "static", "Resource", "getSetupPage", "(", "I_SetupUiContext", "context", ",", "String", "name", ")", "{", "String", "path", "=", "CmsStringUtil", ".", "joinPaths", "(", "context", ".", "getSetupBean", "(", ")", ".", "getContextPath", "(", ")", ",", "CmsSetupBean", ".", "FOLDER_SETUP", ",", "name", ")", ";", "Resource", "resource", "=", "new", "ExternalResource", "(", "path", ")", ";", "return", "resource", ";", "}" ]
Gets external resource for an HTML page in the setup-resources folder. @param context the context @param name the file name @return the resource for the HTML page
[ "Gets", "external", "resource", "for", "an", "HTML", "page", "in", "the", "setup", "-", "resources", "folder", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/CmsSetupUI.java#L84-L89
158,332
alkacon/opencms-core
src-setup/org/opencms/setup/CmsSetupUI.java
CmsSetupUI.showStep
protected void showStep(A_CmsSetupStep step) { Window window = newWindow(); window.setContent(step); window.setCaption(step.getTitle()); A_CmsUI.get().addWindow(window); window.center(); }
java
protected void showStep(A_CmsSetupStep step) { Window window = newWindow(); window.setContent(step); window.setCaption(step.getTitle()); A_CmsUI.get().addWindow(window); window.center(); }
[ "protected", "void", "showStep", "(", "A_CmsSetupStep", "step", ")", "{", "Window", "window", "=", "newWindow", "(", ")", ";", "window", ".", "setContent", "(", "step", ")", ";", "window", ".", "setCaption", "(", "step", ".", "getTitle", "(", ")", ")", ";", "A_CmsUI", ".", "get", "(", ")", ".", "addWindow", "(", "window", ")", ";", "window", ".", "center", "(", ")", ";", "}" ]
Shows the given step. @param step the step
[ "Shows", "the", "given", "step", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/CmsSetupUI.java#L150-L157
158,333
alkacon/opencms-core
src-setup/org/opencms/setup/CmsSetupUI.java
CmsSetupUI.updateStep
protected void updateStep(int stepNo) { if ((0 <= stepNo) && (stepNo < m_steps.size())) { Class<? extends A_CmsSetupStep> cls = m_steps.get(stepNo); A_CmsSetupStep step; try { step = cls.getConstructor(I_SetupUiContext.class).newInstance(this); showStep(step); m_stepNo = stepNo; // Only update step number if no exceptions } catch (Exception e) { CmsSetupErrorDialog.showErrorDialog(e); } } }
java
protected void updateStep(int stepNo) { if ((0 <= stepNo) && (stepNo < m_steps.size())) { Class<? extends A_CmsSetupStep> cls = m_steps.get(stepNo); A_CmsSetupStep step; try { step = cls.getConstructor(I_SetupUiContext.class).newInstance(this); showStep(step); m_stepNo = stepNo; // Only update step number if no exceptions } catch (Exception e) { CmsSetupErrorDialog.showErrorDialog(e); } } }
[ "protected", "void", "updateStep", "(", "int", "stepNo", ")", "{", "if", "(", "(", "0", "<=", "stepNo", ")", "&&", "(", "stepNo", "<", "m_steps", ".", "size", "(", ")", ")", ")", "{", "Class", "<", "?", "extends", "A_CmsSetupStep", ">", "cls", "=", "m_steps", ".", "get", "(", "stepNo", ")", ";", "A_CmsSetupStep", "step", ";", "try", "{", "step", "=", "cls", ".", "getConstructor", "(", "I_SetupUiContext", ".", "class", ")", ".", "newInstance", "(", "this", ")", ";", "showStep", "(", "step", ")", ";", "m_stepNo", "=", "stepNo", ";", "// Only update step number if no exceptions", "}", "catch", "(", "Exception", "e", ")", "{", "CmsSetupErrorDialog", ".", "showErrorDialog", "(", "e", ")", ";", "}", "}", "}" ]
Moves to the step with the given number. <p>The step number is only updated if no exceptions are thrown when instantiating/displaying the given step @param stepNo the step number to move to
[ "Moves", "to", "the", "step", "with", "the", "given", "number", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/CmsSetupUI.java#L166-L180
158,334
alkacon/opencms-core
src/org/opencms/jsp/search/controller/CmsSearchControllerFacetField.java
CmsSearchControllerFacetField.appendFacetOption
protected void appendFacetOption(StringBuffer query, final String name, final String value) { query.append(" facet.").append(name).append("=").append(value); }
java
protected void appendFacetOption(StringBuffer query, final String name, final String value) { query.append(" facet.").append(name).append("=").append(value); }
[ "protected", "void", "appendFacetOption", "(", "StringBuffer", "query", ",", "final", "String", "name", ",", "final", "String", "value", ")", "{", "query", ".", "append", "(", "\" facet.\"", ")", ".", "append", "(", "name", ")", ".", "append", "(", "\"=\"", ")", ".", "append", "(", "value", ")", ";", "}" ]
Appends the query part for the facet to the query string. @param query The current query string. @param name The name of the facet parameter, e.g. "limit", "order", .... @param value The value to set for the parameter specified by name.
[ "Appends", "the", "query", "part", "for", "the", "facet", "to", "the", "query", "string", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/controller/CmsSearchControllerFacetField.java#L204-L207
158,335
alkacon/opencms-core
src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java
CmsMessageBundleEditorOptions.setEditedFilePath
public void setEditedFilePath(final String editedFilePath) { m_filePathField.setReadOnly(false); m_filePathField.setValue(editedFilePath); m_filePathField.setReadOnly(true); }
java
public void setEditedFilePath(final String editedFilePath) { m_filePathField.setReadOnly(false); m_filePathField.setValue(editedFilePath); m_filePathField.setReadOnly(true); }
[ "public", "void", "setEditedFilePath", "(", "final", "String", "editedFilePath", ")", "{", "m_filePathField", ".", "setReadOnly", "(", "false", ")", ";", "m_filePathField", ".", "setValue", "(", "editedFilePath", ")", ";", "m_filePathField", ".", "setReadOnly", "(", "true", ")", ";", "}" ]
Sets the path of the edited file in the corresponding display. @param editedFilePath path of the edited file to set.
[ "Sets", "the", "path", "of", "the", "edited", "file", "in", "the", "corresponding", "display", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java#L146-L152
158,336
alkacon/opencms-core
src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java
CmsMessageBundleEditorOptions.updateShownOptions
public void updateShownOptions(boolean showModeSwitch, boolean showAddKeyOption) { if (showModeSwitch != m_showModeSwitch) { m_upperLeftComponent.removeAllComponents(); m_upperLeftComponent.addComponent(m_languageSwitch); if (showModeSwitch) { m_upperLeftComponent.addComponent(m_modeSwitch); } m_upperLeftComponent.addComponent(m_filePathLabel); m_showModeSwitch = showModeSwitch; } if (showAddKeyOption != m_showAddKeyOption) { if (showAddKeyOption) { m_optionsComponent.addComponent(m_lowerLeftComponent, 0, 1); m_optionsComponent.addComponent(m_lowerRightComponent, 1, 1); } else { m_optionsComponent.removeComponent(0, 1); m_optionsComponent.removeComponent(1, 1); } m_showAddKeyOption = showAddKeyOption; } }
java
public void updateShownOptions(boolean showModeSwitch, boolean showAddKeyOption) { if (showModeSwitch != m_showModeSwitch) { m_upperLeftComponent.removeAllComponents(); m_upperLeftComponent.addComponent(m_languageSwitch); if (showModeSwitch) { m_upperLeftComponent.addComponent(m_modeSwitch); } m_upperLeftComponent.addComponent(m_filePathLabel); m_showModeSwitch = showModeSwitch; } if (showAddKeyOption != m_showAddKeyOption) { if (showAddKeyOption) { m_optionsComponent.addComponent(m_lowerLeftComponent, 0, 1); m_optionsComponent.addComponent(m_lowerRightComponent, 1, 1); } else { m_optionsComponent.removeComponent(0, 1); m_optionsComponent.removeComponent(1, 1); } m_showAddKeyOption = showAddKeyOption; } }
[ "public", "void", "updateShownOptions", "(", "boolean", "showModeSwitch", ",", "boolean", "showAddKeyOption", ")", "{", "if", "(", "showModeSwitch", "!=", "m_showModeSwitch", ")", "{", "m_upperLeftComponent", ".", "removeAllComponents", "(", ")", ";", "m_upperLeftComponent", ".", "addComponent", "(", "m_languageSwitch", ")", ";", "if", "(", "showModeSwitch", ")", "{", "m_upperLeftComponent", ".", "addComponent", "(", "m_modeSwitch", ")", ";", "}", "m_upperLeftComponent", ".", "addComponent", "(", "m_filePathLabel", ")", ";", "m_showModeSwitch", "=", "showModeSwitch", ";", "}", "if", "(", "showAddKeyOption", "!=", "m_showAddKeyOption", ")", "{", "if", "(", "showAddKeyOption", ")", "{", "m_optionsComponent", ".", "addComponent", "(", "m_lowerLeftComponent", ",", "0", ",", "1", ")", ";", "m_optionsComponent", ".", "addComponent", "(", "m_lowerRightComponent", ",", "1", ",", "1", ")", ";", "}", "else", "{", "m_optionsComponent", ".", "removeComponent", "(", "0", ",", "1", ")", ";", "m_optionsComponent", ".", "removeComponent", "(", "1", ",", "1", ")", ";", "}", "m_showAddKeyOption", "=", "showAddKeyOption", ";", "}", "}" ]
Update which options are shown. @param showModeSwitch flag, indicating if the mode switch should be shown. @param showAddKeyOption flag, indicating if the "Add key" row should be shown.
[ "Update", "which", "options", "are", "shown", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java#L170-L191
158,337
alkacon/opencms-core
src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java
CmsMessageBundleEditorOptions.handleAddKey
void handleAddKey() { String key = m_addKeyInput.getValue(); if (m_listener.handleAddKey(key)) { Notification.show( key.isEmpty() ? m_messages.key(Messages.GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_EMPTY_KEY_SUCCESSFULLY_ADDED_0) : m_messages.key(Messages.GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_KEY_SUCCESSFULLY_ADDED_1, key)); } else { CmsMessageBundleEditorTypes.showWarning( m_messages.key(Messages.GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_KEY_ALREADEY_EXISTS_CAPTION_0), m_messages.key(Messages.GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_KEY_ALREADEY_EXISTS_DESCRIPTION_1, key)); } m_addKeyInput.focus(); m_addKeyInput.selectAll(); }
java
void handleAddKey() { String key = m_addKeyInput.getValue(); if (m_listener.handleAddKey(key)) { Notification.show( key.isEmpty() ? m_messages.key(Messages.GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_EMPTY_KEY_SUCCESSFULLY_ADDED_0) : m_messages.key(Messages.GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_KEY_SUCCESSFULLY_ADDED_1, key)); } else { CmsMessageBundleEditorTypes.showWarning( m_messages.key(Messages.GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_KEY_ALREADEY_EXISTS_CAPTION_0), m_messages.key(Messages.GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_KEY_ALREADEY_EXISTS_DESCRIPTION_1, key)); } m_addKeyInput.focus(); m_addKeyInput.selectAll(); }
[ "void", "handleAddKey", "(", ")", "{", "String", "key", "=", "m_addKeyInput", ".", "getValue", "(", ")", ";", "if", "(", "m_listener", ".", "handleAddKey", "(", "key", ")", ")", "{", "Notification", ".", "show", "(", "key", ".", "isEmpty", "(", ")", "?", "m_messages", ".", "key", "(", "Messages", ".", "GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_EMPTY_KEY_SUCCESSFULLY_ADDED_0", ")", ":", "m_messages", ".", "key", "(", "Messages", ".", "GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_KEY_SUCCESSFULLY_ADDED_1", ",", "key", ")", ")", ";", "}", "else", "{", "CmsMessageBundleEditorTypes", ".", "showWarning", "(", "m_messages", ".", "key", "(", "Messages", ".", "GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_KEY_ALREADEY_EXISTS_CAPTION_0", ")", ",", "m_messages", ".", "key", "(", "Messages", ".", "GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_KEY_ALREADEY_EXISTS_DESCRIPTION_1", ",", "key", ")", ")", ";", "}", "m_addKeyInput", ".", "focus", "(", ")", ";", "m_addKeyInput", ".", "selectAll", "(", ")", ";", "}" ]
Handles adding a key. Calls the registered listener and wraps it's method in some GUI adjustments.
[ "Handles", "adding", "a", "key", ".", "Calls", "the", "registered", "listener", "and", "wraps", "it", "s", "method", "in", "some", "GUI", "adjustments", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java#L196-L212
158,338
alkacon/opencms-core
src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java
CmsMessageBundleEditorOptions.setLanguage
void setLanguage(final Locale locale) { if (!m_languageSelect.getValue().equals(locale)) { m_languageSelect.setValue(locale); } }
java
void setLanguage(final Locale locale) { if (!m_languageSelect.getValue().equals(locale)) { m_languageSelect.setValue(locale); } }
[ "void", "setLanguage", "(", "final", "Locale", "locale", ")", "{", "if", "(", "!", "m_languageSelect", ".", "getValue", "(", ")", ".", "equals", "(", "locale", ")", ")", "{", "m_languageSelect", ".", "setValue", "(", "locale", ")", ";", "}", "}" ]
Sets the currently edited locale. @param locale the locale to set.
[ "Sets", "the", "currently", "edited", "locale", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java#L218-L223
158,339
alkacon/opencms-core
src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java
CmsMessageBundleEditorOptions.createAddKeyButton
private Component createAddKeyButton() { // the "+" button Button addKeyButton = new Button(); addKeyButton.addStyleName("icon-only"); addKeyButton.addStyleName("borderless-colored"); addKeyButton.setDescription(m_messages.key(Messages.GUI_ADD_KEY_0)); addKeyButton.setIcon(FontOpenCms.CIRCLE_PLUS, m_messages.key(Messages.GUI_ADD_KEY_0)); addKeyButton.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; public void buttonClick(ClickEvent event) { handleAddKey(); } }); return addKeyButton; }
java
private Component createAddKeyButton() { // the "+" button Button addKeyButton = new Button(); addKeyButton.addStyleName("icon-only"); addKeyButton.addStyleName("borderless-colored"); addKeyButton.setDescription(m_messages.key(Messages.GUI_ADD_KEY_0)); addKeyButton.setIcon(FontOpenCms.CIRCLE_PLUS, m_messages.key(Messages.GUI_ADD_KEY_0)); addKeyButton.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; public void buttonClick(ClickEvent event) { handleAddKey(); } }); return addKeyButton; }
[ "private", "Component", "createAddKeyButton", "(", ")", "{", "// the \"+\" button", "Button", "addKeyButton", "=", "new", "Button", "(", ")", ";", "addKeyButton", ".", "addStyleName", "(", "\"icon-only\"", ")", ";", "addKeyButton", ".", "addStyleName", "(", "\"borderless-colored\"", ")", ";", "addKeyButton", ".", "setDescription", "(", "m_messages", ".", "key", "(", "Messages", ".", "GUI_ADD_KEY_0", ")", ")", ";", "addKeyButton", ".", "setIcon", "(", "FontOpenCms", ".", "CIRCLE_PLUS", ",", "m_messages", ".", "key", "(", "Messages", ".", "GUI_ADD_KEY_0", ")", ")", ";", "addKeyButton", ".", "addClickListener", "(", "new", "ClickListener", "(", ")", "{", "private", "static", "final", "long", "serialVersionUID", "=", "1L", ";", "public", "void", "buttonClick", "(", "ClickEvent", "event", ")", "{", "handleAddKey", "(", ")", ";", "}", "}", ")", ";", "return", "addKeyButton", ";", "}" ]
Creates the "Add key" button. @return the "Add key" button.
[ "Creates", "the", "Add", "key", "button", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java#L229-L248
158,340
alkacon/opencms-core
src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java
CmsMessageBundleEditorOptions.initModeSwitch
private void initModeSwitch(final EditMode current) { FormLayout modes = new FormLayout(); modes.setHeight("100%"); modes.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); m_modeSelect = new ComboBox(); m_modeSelect.setCaption(m_messages.key(Messages.GUI_VIEW_SWITCHER_LABEL_0)); // add Modes m_modeSelect.addItem(CmsMessageBundleEditorTypes.EditMode.DEFAULT); m_modeSelect.setItemCaption( CmsMessageBundleEditorTypes.EditMode.DEFAULT, m_messages.key(Messages.GUI_VIEW_SWITCHER_EDITMODE_DEFAULT_0)); m_modeSelect.addItem(CmsMessageBundleEditorTypes.EditMode.MASTER); m_modeSelect.setItemCaption( CmsMessageBundleEditorTypes.EditMode.MASTER, m_messages.key(Messages.GUI_VIEW_SWITCHER_EDITMODE_MASTER_0)); // set current mode as selected m_modeSelect.setValue(current); m_modeSelect.setNewItemsAllowed(false); m_modeSelect.setTextInputAllowed(false); m_modeSelect.setNullSelectionAllowed(false); m_modeSelect.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; public void valueChange(ValueChangeEvent event) { m_listener.handleModeChange((EditMode)event.getProperty().getValue()); } }); modes.addComponent(m_modeSelect); m_modeSwitch = modes; }
java
private void initModeSwitch(final EditMode current) { FormLayout modes = new FormLayout(); modes.setHeight("100%"); modes.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); m_modeSelect = new ComboBox(); m_modeSelect.setCaption(m_messages.key(Messages.GUI_VIEW_SWITCHER_LABEL_0)); // add Modes m_modeSelect.addItem(CmsMessageBundleEditorTypes.EditMode.DEFAULT); m_modeSelect.setItemCaption( CmsMessageBundleEditorTypes.EditMode.DEFAULT, m_messages.key(Messages.GUI_VIEW_SWITCHER_EDITMODE_DEFAULT_0)); m_modeSelect.addItem(CmsMessageBundleEditorTypes.EditMode.MASTER); m_modeSelect.setItemCaption( CmsMessageBundleEditorTypes.EditMode.MASTER, m_messages.key(Messages.GUI_VIEW_SWITCHER_EDITMODE_MASTER_0)); // set current mode as selected m_modeSelect.setValue(current); m_modeSelect.setNewItemsAllowed(false); m_modeSelect.setTextInputAllowed(false); m_modeSelect.setNullSelectionAllowed(false); m_modeSelect.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; public void valueChange(ValueChangeEvent event) { m_listener.handleModeChange((EditMode)event.getProperty().getValue()); } }); modes.addComponent(m_modeSelect); m_modeSwitch = modes; }
[ "private", "void", "initModeSwitch", "(", "final", "EditMode", "current", ")", "{", "FormLayout", "modes", "=", "new", "FormLayout", "(", ")", ";", "modes", ".", "setHeight", "(", "\"100%\"", ")", ";", "modes", ".", "setDefaultComponentAlignment", "(", "Alignment", ".", "MIDDLE_LEFT", ")", ";", "m_modeSelect", "=", "new", "ComboBox", "(", ")", ";", "m_modeSelect", ".", "setCaption", "(", "m_messages", ".", "key", "(", "Messages", ".", "GUI_VIEW_SWITCHER_LABEL_0", ")", ")", ";", "// add Modes", "m_modeSelect", ".", "addItem", "(", "CmsMessageBundleEditorTypes", ".", "EditMode", ".", "DEFAULT", ")", ";", "m_modeSelect", ".", "setItemCaption", "(", "CmsMessageBundleEditorTypes", ".", "EditMode", ".", "DEFAULT", ",", "m_messages", ".", "key", "(", "Messages", ".", "GUI_VIEW_SWITCHER_EDITMODE_DEFAULT_0", ")", ")", ";", "m_modeSelect", ".", "addItem", "(", "CmsMessageBundleEditorTypes", ".", "EditMode", ".", "MASTER", ")", ";", "m_modeSelect", ".", "setItemCaption", "(", "CmsMessageBundleEditorTypes", ".", "EditMode", ".", "MASTER", ",", "m_messages", ".", "key", "(", "Messages", ".", "GUI_VIEW_SWITCHER_EDITMODE_MASTER_0", ")", ")", ";", "// set current mode as selected", "m_modeSelect", ".", "setValue", "(", "current", ")", ";", "m_modeSelect", ".", "setNewItemsAllowed", "(", "false", ")", ";", "m_modeSelect", ".", "setTextInputAllowed", "(", "false", ")", ";", "m_modeSelect", ".", "setNullSelectionAllowed", "(", "false", ")", ";", "m_modeSelect", ".", "addValueChangeListener", "(", "new", "ValueChangeListener", "(", ")", "{", "private", "static", "final", "long", "serialVersionUID", "=", "1L", ";", "public", "void", "valueChange", "(", "ValueChangeEvent", "event", ")", "{", "m_listener", ".", "handleModeChange", "(", "(", "EditMode", ")", "event", ".", "getProperty", "(", ")", ".", "getValue", "(", ")", ")", ";", "}", "}", ")", ";", "modes", ".", "addComponent", "(", "m_modeSelect", ")", ";", "m_modeSwitch", "=", "modes", ";", "}" ]
Initializes the mode switcher. @param current the current edit mode
[ "Initializes", "the", "mode", "switcher", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java#L437-L476
158,341
alkacon/opencms-core
src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java
CmsMessageBundleEditorOptions.initUpperLeftComponent
private void initUpperLeftComponent() { m_upperLeftComponent = new HorizontalLayout(); m_upperLeftComponent.setHeight("100%"); m_upperLeftComponent.setSpacing(true); m_upperLeftComponent.setDefaultComponentAlignment(Alignment.MIDDLE_RIGHT); m_upperLeftComponent.addComponent(m_languageSwitch); m_upperLeftComponent.addComponent(m_filePathLabel); }
java
private void initUpperLeftComponent() { m_upperLeftComponent = new HorizontalLayout(); m_upperLeftComponent.setHeight("100%"); m_upperLeftComponent.setSpacing(true); m_upperLeftComponent.setDefaultComponentAlignment(Alignment.MIDDLE_RIGHT); m_upperLeftComponent.addComponent(m_languageSwitch); m_upperLeftComponent.addComponent(m_filePathLabel); }
[ "private", "void", "initUpperLeftComponent", "(", ")", "{", "m_upperLeftComponent", "=", "new", "HorizontalLayout", "(", ")", ";", "m_upperLeftComponent", ".", "setHeight", "(", "\"100%\"", ")", ";", "m_upperLeftComponent", ".", "setSpacing", "(", "true", ")", ";", "m_upperLeftComponent", ".", "setDefaultComponentAlignment", "(", "Alignment", ".", "MIDDLE_RIGHT", ")", ";", "m_upperLeftComponent", ".", "addComponent", "(", "m_languageSwitch", ")", ";", "m_upperLeftComponent", ".", "addComponent", "(", "m_filePathLabel", ")", ";", "}" ]
Initializes the upper left component. Does not show the mode switch.
[ "Initializes", "the", "upper", "left", "component", ".", "Does", "not", "show", "the", "mode", "switch", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java#L511-L520
158,342
alkacon/opencms-core
src/org/opencms/scheduler/CmsScheduleManager.java
CmsScheduleManager.getJob
public CmsScheduledJobInfo getJob(String id) { Iterator<CmsScheduledJobInfo> it = m_jobs.iterator(); while (it.hasNext()) { CmsScheduledJobInfo job = it.next(); if (job.getId().equals(id)) { return job; } } // not found return null; }
java
public CmsScheduledJobInfo getJob(String id) { Iterator<CmsScheduledJobInfo> it = m_jobs.iterator(); while (it.hasNext()) { CmsScheduledJobInfo job = it.next(); if (job.getId().equals(id)) { return job; } } // not found return null; }
[ "public", "CmsScheduledJobInfo", "getJob", "(", "String", "id", ")", "{", "Iterator", "<", "CmsScheduledJobInfo", ">", "it", "=", "m_jobs", ".", "iterator", "(", ")", ";", "while", "(", "it", ".", "hasNext", "(", ")", ")", "{", "CmsScheduledJobInfo", "job", "=", "it", ".", "next", "(", ")", ";", "if", "(", "job", ".", "getId", "(", ")", ".", "equals", "(", "id", ")", ")", "{", "return", "job", ";", "}", "}", "// not found", "return", "null", ";", "}" ]
Returns the currently scheduled job description identified by the given id. @param id the job id @return a job or <code>null</code> if not found
[ "Returns", "the", "currently", "scheduled", "job", "description", "identified", "by", "the", "given", "id", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/scheduler/CmsScheduleManager.java#L192-L203
158,343
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelYearlyView.java
CmsPatternPanelYearlyView.onMonthChange
@UiHandler({"m_atMonth", "m_everyMonth"}) void onMonthChange(ValueChangeEvent<String> event) { if (handleChange()) { m_controller.setMonth(event.getValue()); } }
java
@UiHandler({"m_atMonth", "m_everyMonth"}) void onMonthChange(ValueChangeEvent<String> event) { if (handleChange()) { m_controller.setMonth(event.getValue()); } }
[ "@", "UiHandler", "(", "{", "\"m_atMonth\"", ",", "\"m_everyMonth\"", "}", ")", "void", "onMonthChange", "(", "ValueChangeEvent", "<", "String", ">", "event", ")", "{", "if", "(", "handleChange", "(", ")", ")", "{", "m_controller", ".", "setMonth", "(", "event", ".", "getValue", "(", ")", ")", ";", "}", "}" ]
Handler for month changes. @param event change event.
[ "Handler", "for", "month", "changes", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelYearlyView.java#L228-L234
158,344
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelYearlyView.java
CmsPatternPanelYearlyView.onWeekOfMonthChange
@UiHandler("m_atNumber") void onWeekOfMonthChange(ValueChangeEvent<String> event) { if (handleChange()) { m_controller.setWeekOfMonth(event.getValue()); } }
java
@UiHandler("m_atNumber") void onWeekOfMonthChange(ValueChangeEvent<String> event) { if (handleChange()) { m_controller.setWeekOfMonth(event.getValue()); } }
[ "@", "UiHandler", "(", "\"m_atNumber\"", ")", "void", "onWeekOfMonthChange", "(", "ValueChangeEvent", "<", "String", ">", "event", ")", "{", "if", "(", "handleChange", "(", ")", ")", "{", "m_controller", ".", "setWeekOfMonth", "(", "event", ".", "getValue", "(", ")", ")", ";", "}", "}" ]
Handler for week of month changes. @param event the change event.
[ "Handler", "for", "week", "of", "month", "changes", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsPatternPanelYearlyView.java#L252-L258
158,345
alkacon/opencms-core
src/org/opencms/file/CmsResourceBuilder.java
CmsResourceBuilder.buildResource
public CmsResource buildResource() { return new CmsResource( m_structureId, m_resourceId, m_rootPath, m_type, m_flags, m_projectLastModified, m_state, m_dateCreated, m_userCreated, m_dateLastModified, m_userLastModified, m_dateReleased, m_dateExpired, m_length, m_flags, m_dateContent, m_version); }
java
public CmsResource buildResource() { return new CmsResource( m_structureId, m_resourceId, m_rootPath, m_type, m_flags, m_projectLastModified, m_state, m_dateCreated, m_userCreated, m_dateLastModified, m_userLastModified, m_dateReleased, m_dateExpired, m_length, m_flags, m_dateContent, m_version); }
[ "public", "CmsResource", "buildResource", "(", ")", "{", "return", "new", "CmsResource", "(", "m_structureId", ",", "m_resourceId", ",", "m_rootPath", ",", "m_type", ",", "m_flags", ",", "m_projectLastModified", ",", "m_state", ",", "m_dateCreated", ",", "m_userCreated", ",", "m_dateLastModified", ",", "m_userLastModified", ",", "m_dateReleased", ",", "m_dateExpired", ",", "m_length", ",", "m_flags", ",", "m_dateContent", ",", "m_version", ")", ";", "}" ]
Builds the resource. @return the cms resource
[ "Builds", "the", "resource", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsResourceBuilder.java#L102-L122
158,346
alkacon/opencms-core
src/org/opencms/security/CmsOrgUnitManager.java
CmsOrgUnitManager.getAllAccessibleProjects
public List<CmsProject> getAllAccessibleProjects(CmsObject cms, String ouFqn, boolean includeSubOus) throws CmsException { CmsOrganizationalUnit orgUnit = readOrganizationalUnit(cms, ouFqn); return (m_securityManager.getAllAccessibleProjects(cms.getRequestContext(), orgUnit, includeSubOus)); }
java
public List<CmsProject> getAllAccessibleProjects(CmsObject cms, String ouFqn, boolean includeSubOus) throws CmsException { CmsOrganizationalUnit orgUnit = readOrganizationalUnit(cms, ouFqn); return (m_securityManager.getAllAccessibleProjects(cms.getRequestContext(), orgUnit, includeSubOus)); }
[ "public", "List", "<", "CmsProject", ">", "getAllAccessibleProjects", "(", "CmsObject", "cms", ",", "String", "ouFqn", ",", "boolean", "includeSubOus", ")", "throws", "CmsException", "{", "CmsOrganizationalUnit", "orgUnit", "=", "readOrganizationalUnit", "(", "cms", ",", "ouFqn", ")", ";", "return", "(", "m_securityManager", ".", "getAllAccessibleProjects", "(", "cms", ".", "getRequestContext", "(", ")", ",", "orgUnit", ",", "includeSubOus", ")", ")", ";", "}" ]
Returns all accessible projects of the given organizational unit. That is all projects which are owned by the current user or which are accessible for the group of the user.<p> @param cms the opencms context @param ouFqn the fully qualified name of the organizational unit to get projects for @param includeSubOus if all projects of sub-organizational units should be retrieved too @return all <code>{@link org.opencms.file.CmsProject}</code> objects in the organizational unit @throws CmsException if operation was not successful
[ "Returns", "all", "accessible", "projects", "of", "the", "given", "organizational", "unit", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/security/CmsOrgUnitManager.java#L166-L171
158,347
alkacon/opencms-core
src/org/opencms/jsp/util/CmsJspContentAccessValueWrapper.java
CmsJspContentAccessValueWrapper.getToDateSeries
public CmsJspDateSeriesBean getToDateSeries() { if (m_dateSeries == null) { m_dateSeries = new CmsJspDateSeriesBean(this, m_cms.getRequestContext().getLocale()); } return m_dateSeries; }
java
public CmsJspDateSeriesBean getToDateSeries() { if (m_dateSeries == null) { m_dateSeries = new CmsJspDateSeriesBean(this, m_cms.getRequestContext().getLocale()); } return m_dateSeries; }
[ "public", "CmsJspDateSeriesBean", "getToDateSeries", "(", ")", "{", "if", "(", "m_dateSeries", "==", "null", ")", "{", "m_dateSeries", "=", "new", "CmsJspDateSeriesBean", "(", "this", ",", "m_cms", ".", "getRequestContext", "(", ")", ".", "getLocale", "(", ")", ")", ";", "}", "return", "m_dateSeries", ";", "}" ]
Converts a date series configuration to a date series bean. @return the date series bean.
[ "Converts", "a", "date", "series", "configuration", "to", "a", "date", "series", "bean", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspContentAccessValueWrapper.java#L850-L856
158,348
alkacon/opencms-core
src/org/opencms/i18n/tools/CmsContainerPageCopier.java
CmsContainerPageCopier.copyPageOnly
public void copyPageOnly(CmsResource originalPage, String targetPageRootPath) throws CmsException, NoCustomReplacementException { if ((null == originalPage) || !OpenCms.getResourceManager().getResourceType(originalPage).getTypeName().equals( CmsResourceTypeXmlContainerPage.getStaticTypeName())) { throw new CmsException(new CmsMessageContainer(Messages.get(), Messages.ERR_PAGECOPY_INVALID_PAGE_0)); } m_originalPage = originalPage; CmsObject rootCms = getRootCms(); rootCms.copyResource(originalPage.getRootPath(), targetPageRootPath); CmsResource copiedPage = rootCms.readResource(targetPageRootPath, CmsResourceFilter.IGNORE_EXPIRATION); m_targetFolder = rootCms.readResource(CmsResource.getFolderPath(copiedPage.getRootPath())); replaceElements(copiedPage); attachLocaleGroups(copiedPage); tryUnlock(copiedPage); }
java
public void copyPageOnly(CmsResource originalPage, String targetPageRootPath) throws CmsException, NoCustomReplacementException { if ((null == originalPage) || !OpenCms.getResourceManager().getResourceType(originalPage).getTypeName().equals( CmsResourceTypeXmlContainerPage.getStaticTypeName())) { throw new CmsException(new CmsMessageContainer(Messages.get(), Messages.ERR_PAGECOPY_INVALID_PAGE_0)); } m_originalPage = originalPage; CmsObject rootCms = getRootCms(); rootCms.copyResource(originalPage.getRootPath(), targetPageRootPath); CmsResource copiedPage = rootCms.readResource(targetPageRootPath, CmsResourceFilter.IGNORE_EXPIRATION); m_targetFolder = rootCms.readResource(CmsResource.getFolderPath(copiedPage.getRootPath())); replaceElements(copiedPage); attachLocaleGroups(copiedPage); tryUnlock(copiedPage); }
[ "public", "void", "copyPageOnly", "(", "CmsResource", "originalPage", ",", "String", "targetPageRootPath", ")", "throws", "CmsException", ",", "NoCustomReplacementException", "{", "if", "(", "(", "null", "==", "originalPage", ")", "||", "!", "OpenCms", ".", "getResourceManager", "(", ")", ".", "getResourceType", "(", "originalPage", ")", ".", "getTypeName", "(", ")", ".", "equals", "(", "CmsResourceTypeXmlContainerPage", ".", "getStaticTypeName", "(", ")", ")", ")", "{", "throw", "new", "CmsException", "(", "new", "CmsMessageContainer", "(", "Messages", ".", "get", "(", ")", ",", "Messages", ".", "ERR_PAGECOPY_INVALID_PAGE_0", ")", ")", ";", "}", "m_originalPage", "=", "originalPage", ";", "CmsObject", "rootCms", "=", "getRootCms", "(", ")", ";", "rootCms", ".", "copyResource", "(", "originalPage", ".", "getRootPath", "(", ")", ",", "targetPageRootPath", ")", ";", "CmsResource", "copiedPage", "=", "rootCms", ".", "readResource", "(", "targetPageRootPath", ",", "CmsResourceFilter", ".", "IGNORE_EXPIRATION", ")", ";", "m_targetFolder", "=", "rootCms", ".", "readResource", "(", "CmsResource", ".", "getFolderPath", "(", "copiedPage", ".", "getRootPath", "(", ")", ")", ")", ";", "replaceElements", "(", "copiedPage", ")", ";", "attachLocaleGroups", "(", "copiedPage", ")", ";", "tryUnlock", "(", "copiedPage", ")", ";", "}" ]
Copies the given container page to the provided root path. @param originalPage the page to copy @param targetPageRootPath the root path of the copy target. @throws CmsException thrown if something goes wrong. @throws NoCustomReplacementException if a custom replacement is not found for a type which requires it.
[ "Copies", "the", "given", "container", "page", "to", "the", "provided", "root", "path", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/i18n/tools/CmsContainerPageCopier.java#L223-L240
158,349
alkacon/opencms-core
src/org/opencms/i18n/tools/CmsContainerPageCopier.java
CmsContainerPageCopier.attachLocaleGroups
private void attachLocaleGroups(CmsResource copiedPage) throws CmsException { CmsLocaleGroupService localeGroupService = getRootCms().getLocaleGroupService(); if (Status.linkable == localeGroupService.checkLinkable(m_originalPage, copiedPage)) { try { localeGroupService.attachLocaleGroupIndirect(m_originalPage, copiedPage); } catch (CmsException e) { LOG.error(e.getLocalizedMessage(), e); } } }
java
private void attachLocaleGroups(CmsResource copiedPage) throws CmsException { CmsLocaleGroupService localeGroupService = getRootCms().getLocaleGroupService(); if (Status.linkable == localeGroupService.checkLinkable(m_originalPage, copiedPage)) { try { localeGroupService.attachLocaleGroupIndirect(m_originalPage, copiedPage); } catch (CmsException e) { LOG.error(e.getLocalizedMessage(), e); } } }
[ "private", "void", "attachLocaleGroups", "(", "CmsResource", "copiedPage", ")", "throws", "CmsException", "{", "CmsLocaleGroupService", "localeGroupService", "=", "getRootCms", "(", ")", ".", "getLocaleGroupService", "(", ")", ";", "if", "(", "Status", ".", "linkable", "==", "localeGroupService", ".", "checkLinkable", "(", "m_originalPage", ",", "copiedPage", ")", ")", "{", "try", "{", "localeGroupService", ".", "attachLocaleGroupIndirect", "(", "m_originalPage", ",", "copiedPage", ")", ";", "}", "catch", "(", "CmsException", "e", ")", "{", "LOG", ".", "error", "(", "e", ".", "getLocalizedMessage", "(", ")", ",", "e", ")", ";", "}", "}", "}" ]
Attaches locale groups to the copied page. @param copiedPage the copied page. @throws CmsException thrown if the root cms cannot be retrieved.
[ "Attaches", "locale", "groups", "to", "the", "copied", "page", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/i18n/tools/CmsContainerPageCopier.java#L667-L677
158,350
alkacon/opencms-core
src/org/opencms/ui/dialogs/CmsUndeleteDialog.java
CmsUndeleteDialog.undelete
protected List<CmsUUID> undelete() throws CmsException { List<CmsUUID> modifiedResources = new ArrayList<CmsUUID>(); CmsObject cms = m_context.getCms(); for (CmsResource resource : m_context.getResources()) { CmsLockActionRecord actionRecord = null; try { actionRecord = CmsLockUtil.ensureLock(m_context.getCms(), resource); cms.undeleteResource(cms.getSitePath(resource), true); modifiedResources.add(resource.getStructureId()); } finally { if ((actionRecord != null) && (actionRecord.getChange() == LockChange.locked)) { try { cms.unlockResource(resource); } catch (CmsLockException e) { LOG.warn(e.getLocalizedMessage(), e); } } } } return modifiedResources; }
java
protected List<CmsUUID> undelete() throws CmsException { List<CmsUUID> modifiedResources = new ArrayList<CmsUUID>(); CmsObject cms = m_context.getCms(); for (CmsResource resource : m_context.getResources()) { CmsLockActionRecord actionRecord = null; try { actionRecord = CmsLockUtil.ensureLock(m_context.getCms(), resource); cms.undeleteResource(cms.getSitePath(resource), true); modifiedResources.add(resource.getStructureId()); } finally { if ((actionRecord != null) && (actionRecord.getChange() == LockChange.locked)) { try { cms.unlockResource(resource); } catch (CmsLockException e) { LOG.warn(e.getLocalizedMessage(), e); } } } } return modifiedResources; }
[ "protected", "List", "<", "CmsUUID", ">", "undelete", "(", ")", "throws", "CmsException", "{", "List", "<", "CmsUUID", ">", "modifiedResources", "=", "new", "ArrayList", "<", "CmsUUID", ">", "(", ")", ";", "CmsObject", "cms", "=", "m_context", ".", "getCms", "(", ")", ";", "for", "(", "CmsResource", "resource", ":", "m_context", ".", "getResources", "(", ")", ")", "{", "CmsLockActionRecord", "actionRecord", "=", "null", ";", "try", "{", "actionRecord", "=", "CmsLockUtil", ".", "ensureLock", "(", "m_context", ".", "getCms", "(", ")", ",", "resource", ")", ";", "cms", ".", "undeleteResource", "(", "cms", ".", "getSitePath", "(", "resource", ")", ",", "true", ")", ";", "modifiedResources", ".", "add", "(", "resource", ".", "getStructureId", "(", ")", ")", ";", "}", "finally", "{", "if", "(", "(", "actionRecord", "!=", "null", ")", "&&", "(", "actionRecord", ".", "getChange", "(", ")", "==", "LockChange", ".", "locked", ")", ")", "{", "try", "{", "cms", ".", "unlockResource", "(", "resource", ")", ";", "}", "catch", "(", "CmsLockException", "e", ")", "{", "LOG", ".", "warn", "(", "e", ".", "getLocalizedMessage", "(", ")", ",", "e", ")", ";", "}", "}", "}", "}", "return", "modifiedResources", ";", "}" ]
Undeletes the selected files @return the ids of the modified resources @throws CmsException if something goes wrong
[ "Undeletes", "the", "selected", "files" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/dialogs/CmsUndeleteDialog.java#L132-L154
158,351
alkacon/opencms-core
src/org/opencms/ui/apps/user/CmsImportExportUserDialog.java
CmsImportExportUserDialog.importUserFromFile
protected void importUserFromFile() { CmsImportUserThread thread = new CmsImportUserThread( m_cms, m_ou, m_userImportList, getGroupsList(m_importGroups, true), getRolesList(m_importRoles, true), m_sendMail.getValue().booleanValue()); thread.start(); CmsShowReportDialog dialog = new CmsShowReportDialog(thread, new Runnable() { public void run() { m_window.close(); } }); m_window.setContent(dialog); }
java
protected void importUserFromFile() { CmsImportUserThread thread = new CmsImportUserThread( m_cms, m_ou, m_userImportList, getGroupsList(m_importGroups, true), getRolesList(m_importRoles, true), m_sendMail.getValue().booleanValue()); thread.start(); CmsShowReportDialog dialog = new CmsShowReportDialog(thread, new Runnable() { public void run() { m_window.close(); } }); m_window.setContent(dialog); }
[ "protected", "void", "importUserFromFile", "(", ")", "{", "CmsImportUserThread", "thread", "=", "new", "CmsImportUserThread", "(", "m_cms", ",", "m_ou", ",", "m_userImportList", ",", "getGroupsList", "(", "m_importGroups", ",", "true", ")", ",", "getRolesList", "(", "m_importRoles", ",", "true", ")", ",", "m_sendMail", ".", "getValue", "(", ")", ".", "booleanValue", "(", ")", ")", ";", "thread", ".", "start", "(", ")", ";", "CmsShowReportDialog", "dialog", "=", "new", "CmsShowReportDialog", "(", "thread", ",", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "m_window", ".", "close", "(", ")", ";", "}", "}", ")", ";", "m_window", ".", "setContent", "(", "dialog", ")", ";", "}" ]
Import user from file.
[ "Import", "user", "from", "file", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/user/CmsImportExportUserDialog.java#L628-L647
158,352
alkacon/opencms-core
src/org/opencms/widgets/serialdate/CmsSerialDateBeanMonthlyWeeks.java
CmsSerialDateBeanMonthlyWeeks.toCorrectDateWithDay
private void toCorrectDateWithDay(Calendar date, WeekOfMonth week) { date.set(Calendar.DAY_OF_MONTH, 1); int daysToFirstWeekDayMatch = ((m_weekDay.toInt() + I_CmsSerialDateValue.NUM_OF_WEEKDAYS) - (date.get(Calendar.DAY_OF_WEEK))) % I_CmsSerialDateValue.NUM_OF_WEEKDAYS; date.add(Calendar.DAY_OF_MONTH, daysToFirstWeekDayMatch); int wouldBeDayOfMonth = date.get(Calendar.DAY_OF_MONTH) + ((week.ordinal()) * I_CmsSerialDateValue.NUM_OF_WEEKDAYS); if (wouldBeDayOfMonth > date.getActualMaximum(Calendar.DAY_OF_MONTH)) { date.set(Calendar.DAY_OF_MONTH, wouldBeDayOfMonth - I_CmsSerialDateValue.NUM_OF_WEEKDAYS); } else { date.set(Calendar.DAY_OF_MONTH, wouldBeDayOfMonth); } }
java
private void toCorrectDateWithDay(Calendar date, WeekOfMonth week) { date.set(Calendar.DAY_OF_MONTH, 1); int daysToFirstWeekDayMatch = ((m_weekDay.toInt() + I_CmsSerialDateValue.NUM_OF_WEEKDAYS) - (date.get(Calendar.DAY_OF_WEEK))) % I_CmsSerialDateValue.NUM_OF_WEEKDAYS; date.add(Calendar.DAY_OF_MONTH, daysToFirstWeekDayMatch); int wouldBeDayOfMonth = date.get(Calendar.DAY_OF_MONTH) + ((week.ordinal()) * I_CmsSerialDateValue.NUM_OF_WEEKDAYS); if (wouldBeDayOfMonth > date.getActualMaximum(Calendar.DAY_OF_MONTH)) { date.set(Calendar.DAY_OF_MONTH, wouldBeDayOfMonth - I_CmsSerialDateValue.NUM_OF_WEEKDAYS); } else { date.set(Calendar.DAY_OF_MONTH, wouldBeDayOfMonth); } }
[ "private", "void", "toCorrectDateWithDay", "(", "Calendar", "date", ",", "WeekOfMonth", "week", ")", "{", "date", ".", "set", "(", "Calendar", ".", "DAY_OF_MONTH", ",", "1", ")", ";", "int", "daysToFirstWeekDayMatch", "=", "(", "(", "m_weekDay", ".", "toInt", "(", ")", "+", "I_CmsSerialDateValue", ".", "NUM_OF_WEEKDAYS", ")", "-", "(", "date", ".", "get", "(", "Calendar", ".", "DAY_OF_WEEK", ")", ")", ")", "%", "I_CmsSerialDateValue", ".", "NUM_OF_WEEKDAYS", ";", "date", ".", "add", "(", "Calendar", ".", "DAY_OF_MONTH", ",", "daysToFirstWeekDayMatch", ")", ";", "int", "wouldBeDayOfMonth", "=", "date", ".", "get", "(", "Calendar", ".", "DAY_OF_MONTH", ")", "+", "(", "(", "week", ".", "ordinal", "(", ")", ")", "*", "I_CmsSerialDateValue", ".", "NUM_OF_WEEKDAYS", ")", ";", "if", "(", "wouldBeDayOfMonth", ">", "date", ".", "getActualMaximum", "(", "Calendar", ".", "DAY_OF_MONTH", ")", ")", "{", "date", ".", "set", "(", "Calendar", ".", "DAY_OF_MONTH", ",", "wouldBeDayOfMonth", "-", "I_CmsSerialDateValue", ".", "NUM_OF_WEEKDAYS", ")", ";", "}", "else", "{", "date", ".", "set", "(", "Calendar", ".", "DAY_OF_MONTH", ",", "wouldBeDayOfMonth", ")", ";", "}", "}" ]
Sets the day of the month that matches the condition, i.e., the day of month of the 2nd Saturday. If the day does not exist in the current month, the last possible date is set, i.e., instead of the fifth Saturday, the fourth is chosen. @param date date that has the correct year and month already set. @param week the number of the week to choose.
[ "Sets", "the", "day", "of", "the", "month", "that", "matches", "the", "condition", "i", ".", "e", ".", "the", "day", "of", "month", "of", "the", "2nd", "Saturday", ".", "If", "the", "day", "does", "not", "exist", "in", "the", "current", "month", "the", "last", "possible", "date", "is", "set", "i", ".", "e", ".", "instead", "of", "the", "fifth", "Saturday", "the", "fourth", "is", "chosen", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/serialdate/CmsSerialDateBeanMonthlyWeeks.java#L128-L142
158,353
alkacon/opencms-core
src/org/opencms/widgets/serialdate/CmsSerialDateBeanMonthlyWeeks.java
CmsSerialDateBeanMonthlyWeeks.toNextDate
private void toNextDate(Calendar date, int interval) { long previousDate = date.getTimeInMillis(); if (!m_weekOfMonthIterator.hasNext()) { date.add(Calendar.MONTH, interval); m_weekOfMonthIterator = m_weeksOfMonth.iterator(); } toCorrectDateWithDay(date, m_weekOfMonthIterator.next()); if (previousDate == date.getTimeInMillis()) { // this can happen if the fourth and the last week are checked. toNextDate(date); } }
java
private void toNextDate(Calendar date, int interval) { long previousDate = date.getTimeInMillis(); if (!m_weekOfMonthIterator.hasNext()) { date.add(Calendar.MONTH, interval); m_weekOfMonthIterator = m_weeksOfMonth.iterator(); } toCorrectDateWithDay(date, m_weekOfMonthIterator.next()); if (previousDate == date.getTimeInMillis()) { // this can happen if the fourth and the last week are checked. toNextDate(date); } }
[ "private", "void", "toNextDate", "(", "Calendar", "date", ",", "int", "interval", ")", "{", "long", "previousDate", "=", "date", ".", "getTimeInMillis", "(", ")", ";", "if", "(", "!", "m_weekOfMonthIterator", ".", "hasNext", "(", ")", ")", "{", "date", ".", "add", "(", "Calendar", ".", "MONTH", ",", "interval", ")", ";", "m_weekOfMonthIterator", "=", "m_weeksOfMonth", ".", "iterator", "(", ")", ";", "}", "toCorrectDateWithDay", "(", "date", ",", "m_weekOfMonthIterator", ".", "next", "(", ")", ")", ";", "if", "(", "previousDate", "==", "date", ".", "getTimeInMillis", "(", ")", ")", "{", "// this can happen if the fourth and the last week are checked.", "toNextDate", "(", "date", ")", ";", "}", "}" ]
Calculates the next date, starting from the provided date. @param date the current date. @param interval the number of month to add when moving to the next month.
[ "Calculates", "the", "next", "date", "starting", "from", "the", "provided", "date", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/serialdate/CmsSerialDateBeanMonthlyWeeks.java#L150-L162
158,354
alkacon/opencms-core
src/org/opencms/ui/apps/resourcetypes/CmsResourceTypeApp.java
CmsResourceTypeApp.isResourceTypeIdFree
public static boolean isResourceTypeIdFree(int id) { try { OpenCms.getResourceManager().getResourceType(id); } catch (CmsLoaderException e) { return true; } return false; }
java
public static boolean isResourceTypeIdFree(int id) { try { OpenCms.getResourceManager().getResourceType(id); } catch (CmsLoaderException e) { return true; } return false; }
[ "public", "static", "boolean", "isResourceTypeIdFree", "(", "int", "id", ")", "{", "try", "{", "OpenCms", ".", "getResourceManager", "(", ")", ".", "getResourceType", "(", "id", ")", ";", "}", "catch", "(", "CmsLoaderException", "e", ")", "{", "return", "true", ";", "}", "return", "false", ";", "}" ]
Is the given resource type id free? @param id to be checked @return boolean
[ "Is", "the", "given", "resource", "type", "id", "free?" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/resourcetypes/CmsResourceTypeApp.java#L72-L80
158,355
alkacon/opencms-core
src/org/opencms/widgets/A_CmsAdeGalleryWidget.java
A_CmsAdeGalleryWidget.getGalleryOpenParams
protected Map<String, String> getGalleryOpenParams( CmsObject cms, CmsMessages messages, I_CmsWidgetParameter param, String resource, long hashId) { Map<String, String> result = new HashMap<String, String>(); result.put(I_CmsGalleryProviderConstants.CONFIG_GALLERY_MODE, A_CmsAjaxGallery.MODE_WIDGET); result.put(I_CmsGalleryProviderConstants.CONFIG_GALLERY_STORAGE_PREFIX, getGalleryStoragePrefix()); result.put(I_CmsGalleryProviderConstants.CONFIG_RESOURCE_TYPES, getGalleryTypes()); if (param.getId() != null) { result.put(I_CmsGalleryProviderConstants.KEY_FIELD_ID, param.getId()); // use javascript to read the current field value result.put( I_CmsGalleryProviderConstants.CONFIG_CURRENT_ELEMENT, "'+document.getElementById('" + param.getId() + "').getAttribute('value')+'"); } result.put(I_CmsGalleryProviderConstants.KEY_HASH_ID, "" + hashId); // the edited resource if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(resource)) { result.put(I_CmsGalleryProviderConstants.CONFIG_REFERENCE_PATH, resource); } // the start up gallery path CmsGalleryWidgetConfiguration configuration = getWidgetConfiguration(cms, messages, param); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(configuration.getStartup())) { result.put(I_CmsGalleryProviderConstants.CONFIG_GALLERY_PATH, configuration.getStartup()); } // set gallery types if available if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(configuration.getGalleryTypes())) { result.put(I_CmsGalleryProviderConstants.CONFIG_GALLERY_TYPES, configuration.getGalleryTypes()); } result.put(I_CmsGalleryProviderConstants.CONFIG_GALLERY_NAME, getGalleryName()); return result; }
java
protected Map<String, String> getGalleryOpenParams( CmsObject cms, CmsMessages messages, I_CmsWidgetParameter param, String resource, long hashId) { Map<String, String> result = new HashMap<String, String>(); result.put(I_CmsGalleryProviderConstants.CONFIG_GALLERY_MODE, A_CmsAjaxGallery.MODE_WIDGET); result.put(I_CmsGalleryProviderConstants.CONFIG_GALLERY_STORAGE_PREFIX, getGalleryStoragePrefix()); result.put(I_CmsGalleryProviderConstants.CONFIG_RESOURCE_TYPES, getGalleryTypes()); if (param.getId() != null) { result.put(I_CmsGalleryProviderConstants.KEY_FIELD_ID, param.getId()); // use javascript to read the current field value result.put( I_CmsGalleryProviderConstants.CONFIG_CURRENT_ELEMENT, "'+document.getElementById('" + param.getId() + "').getAttribute('value')+'"); } result.put(I_CmsGalleryProviderConstants.KEY_HASH_ID, "" + hashId); // the edited resource if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(resource)) { result.put(I_CmsGalleryProviderConstants.CONFIG_REFERENCE_PATH, resource); } // the start up gallery path CmsGalleryWidgetConfiguration configuration = getWidgetConfiguration(cms, messages, param); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(configuration.getStartup())) { result.put(I_CmsGalleryProviderConstants.CONFIG_GALLERY_PATH, configuration.getStartup()); } // set gallery types if available if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(configuration.getGalleryTypes())) { result.put(I_CmsGalleryProviderConstants.CONFIG_GALLERY_TYPES, configuration.getGalleryTypes()); } result.put(I_CmsGalleryProviderConstants.CONFIG_GALLERY_NAME, getGalleryName()); return result; }
[ "protected", "Map", "<", "String", ",", "String", ">", "getGalleryOpenParams", "(", "CmsObject", "cms", ",", "CmsMessages", "messages", ",", "I_CmsWidgetParameter", "param", ",", "String", "resource", ",", "long", "hashId", ")", "{", "Map", "<", "String", ",", "String", ">", "result", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", ";", "result", ".", "put", "(", "I_CmsGalleryProviderConstants", ".", "CONFIG_GALLERY_MODE", ",", "A_CmsAjaxGallery", ".", "MODE_WIDGET", ")", ";", "result", ".", "put", "(", "I_CmsGalleryProviderConstants", ".", "CONFIG_GALLERY_STORAGE_PREFIX", ",", "getGalleryStoragePrefix", "(", ")", ")", ";", "result", ".", "put", "(", "I_CmsGalleryProviderConstants", ".", "CONFIG_RESOURCE_TYPES", ",", "getGalleryTypes", "(", ")", ")", ";", "if", "(", "param", ".", "getId", "(", ")", "!=", "null", ")", "{", "result", ".", "put", "(", "I_CmsGalleryProviderConstants", ".", "KEY_FIELD_ID", ",", "param", ".", "getId", "(", ")", ")", ";", "// use javascript to read the current field value", "result", ".", "put", "(", "I_CmsGalleryProviderConstants", ".", "CONFIG_CURRENT_ELEMENT", ",", "\"'+document.getElementById('\"", "+", "param", ".", "getId", "(", ")", "+", "\"').getAttribute('value')+'\"", ")", ";", "}", "result", ".", "put", "(", "I_CmsGalleryProviderConstants", ".", "KEY_HASH_ID", ",", "\"\"", "+", "hashId", ")", ";", "// the edited resource", "if", "(", "CmsStringUtil", ".", "isNotEmptyOrWhitespaceOnly", "(", "resource", ")", ")", "{", "result", ".", "put", "(", "I_CmsGalleryProviderConstants", ".", "CONFIG_REFERENCE_PATH", ",", "resource", ")", ";", "}", "// the start up gallery path", "CmsGalleryWidgetConfiguration", "configuration", "=", "getWidgetConfiguration", "(", "cms", ",", "messages", ",", "param", ")", ";", "if", "(", "CmsStringUtil", ".", "isNotEmptyOrWhitespaceOnly", "(", "configuration", ".", "getStartup", "(", ")", ")", ")", "{", "result", ".", "put", "(", "I_CmsGalleryProviderConstants", ".", "CONFIG_GALLERY_PATH", ",", "configuration", ".", "getStartup", "(", ")", ")", ";", "}", "// set gallery types if available", "if", "(", "CmsStringUtil", ".", "isNotEmptyOrWhitespaceOnly", "(", "configuration", ".", "getGalleryTypes", "(", ")", ")", ")", "{", "result", ".", "put", "(", "I_CmsGalleryProviderConstants", ".", "CONFIG_GALLERY_TYPES", ",", "configuration", ".", "getGalleryTypes", "(", ")", ")", ";", "}", "result", ".", "put", "(", "I_CmsGalleryProviderConstants", ".", "CONFIG_GALLERY_NAME", ",", "getGalleryName", "(", ")", ")", ";", "return", "result", ";", "}" ]
Returns the required gallery open parameters. @param cms an initialized instance of a CmsObject @param messages the dialog messages @param param the widget parameter to generate the widget for @param resource the resource being edited @param hashId the field id hash @return the gallery open parameters
[ "Returns", "the", "required", "gallery", "open", "parameters", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/A_CmsAdeGalleryWidget.java#L284-L318
158,356
alkacon/opencms-core
src/org/opencms/search/solr/CmsSolrFieldConfiguration.java
CmsSolrFieldConfiguration.appendFieldMappingsFromElementsOnThePage
protected I_CmsSearchDocument appendFieldMappingsFromElementsOnThePage( I_CmsSearchDocument document, CmsObject cms, CmsResource resource, List<String> systemFields) { try { CmsFile file = cms.readFile(resource); CmsXmlContainerPage containerPage = CmsXmlContainerPageFactory.unmarshal(cms, file); CmsContainerPageBean containerBean = containerPage.getContainerPage(cms); if (containerBean != null) { for (CmsContainerElementBean element : containerBean.getElements()) { element.initResource(cms); CmsResource elemResource = element.getResource(); Set<CmsSearchField> mappedFields = getXSDMappingsForPage(cms, elemResource); if (mappedFields != null) { for (CmsSearchField field : mappedFields) { if (!systemFields.contains(field.getName())) { document = appendFieldMapping( document, field, cms, elemResource, CmsSolrDocumentXmlContent.extractXmlContent(cms, elemResource, getIndex()), cms.readPropertyObjects(resource, false), cms.readPropertyObjects(resource, true)); } else { LOG.error( Messages.get().getBundle().key( Messages.LOG_SOLR_ERR_MAPPING_TO_INTERNALLY_USED_FIELD_3, elemResource.getRootPath(), field.getName(), resource.getRootPath())); } } } } } } catch (CmsException e) { // Should be thrown if element on the page does not exist anymore - this is possible, but not necessarily an error. // Hence, just notice it in the debug log. if (LOG.isDebugEnabled()) { LOG.debug(e.getLocalizedMessage(), e); } } return document; }
java
protected I_CmsSearchDocument appendFieldMappingsFromElementsOnThePage( I_CmsSearchDocument document, CmsObject cms, CmsResource resource, List<String> systemFields) { try { CmsFile file = cms.readFile(resource); CmsXmlContainerPage containerPage = CmsXmlContainerPageFactory.unmarshal(cms, file); CmsContainerPageBean containerBean = containerPage.getContainerPage(cms); if (containerBean != null) { for (CmsContainerElementBean element : containerBean.getElements()) { element.initResource(cms); CmsResource elemResource = element.getResource(); Set<CmsSearchField> mappedFields = getXSDMappingsForPage(cms, elemResource); if (mappedFields != null) { for (CmsSearchField field : mappedFields) { if (!systemFields.contains(field.getName())) { document = appendFieldMapping( document, field, cms, elemResource, CmsSolrDocumentXmlContent.extractXmlContent(cms, elemResource, getIndex()), cms.readPropertyObjects(resource, false), cms.readPropertyObjects(resource, true)); } else { LOG.error( Messages.get().getBundle().key( Messages.LOG_SOLR_ERR_MAPPING_TO_INTERNALLY_USED_FIELD_3, elemResource.getRootPath(), field.getName(), resource.getRootPath())); } } } } } } catch (CmsException e) { // Should be thrown if element on the page does not exist anymore - this is possible, but not necessarily an error. // Hence, just notice it in the debug log. if (LOG.isDebugEnabled()) { LOG.debug(e.getLocalizedMessage(), e); } } return document; }
[ "protected", "I_CmsSearchDocument", "appendFieldMappingsFromElementsOnThePage", "(", "I_CmsSearchDocument", "document", ",", "CmsObject", "cms", ",", "CmsResource", "resource", ",", "List", "<", "String", ">", "systemFields", ")", "{", "try", "{", "CmsFile", "file", "=", "cms", ".", "readFile", "(", "resource", ")", ";", "CmsXmlContainerPage", "containerPage", "=", "CmsXmlContainerPageFactory", ".", "unmarshal", "(", "cms", ",", "file", ")", ";", "CmsContainerPageBean", "containerBean", "=", "containerPage", ".", "getContainerPage", "(", "cms", ")", ";", "if", "(", "containerBean", "!=", "null", ")", "{", "for", "(", "CmsContainerElementBean", "element", ":", "containerBean", ".", "getElements", "(", ")", ")", "{", "element", ".", "initResource", "(", "cms", ")", ";", "CmsResource", "elemResource", "=", "element", ".", "getResource", "(", ")", ";", "Set", "<", "CmsSearchField", ">", "mappedFields", "=", "getXSDMappingsForPage", "(", "cms", ",", "elemResource", ")", ";", "if", "(", "mappedFields", "!=", "null", ")", "{", "for", "(", "CmsSearchField", "field", ":", "mappedFields", ")", "{", "if", "(", "!", "systemFields", ".", "contains", "(", "field", ".", "getName", "(", ")", ")", ")", "{", "document", "=", "appendFieldMapping", "(", "document", ",", "field", ",", "cms", ",", "elemResource", ",", "CmsSolrDocumentXmlContent", ".", "extractXmlContent", "(", "cms", ",", "elemResource", ",", "getIndex", "(", ")", ")", ",", "cms", ".", "readPropertyObjects", "(", "resource", ",", "false", ")", ",", "cms", ".", "readPropertyObjects", "(", "resource", ",", "true", ")", ")", ";", "}", "else", "{", "LOG", ".", "error", "(", "Messages", ".", "get", "(", ")", ".", "getBundle", "(", ")", ".", "key", "(", "Messages", ".", "LOG_SOLR_ERR_MAPPING_TO_INTERNALLY_USED_FIELD_3", ",", "elemResource", ".", "getRootPath", "(", ")", ",", "field", ".", "getName", "(", ")", ",", "resource", ".", "getRootPath", "(", ")", ")", ")", ";", "}", "}", "}", "}", "}", "}", "catch", "(", "CmsException", "e", ")", "{", "// Should be thrown if element on the page does not exist anymore - this is possible, but not necessarily an error.", "// Hence, just notice it in the debug log.", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "LOG", ".", "debug", "(", "e", ".", "getLocalizedMessage", "(", ")", ",", "e", ")", ";", "}", "}", "return", "document", ";", "}" ]
Adds search fields from elements on a container page to a container page's document. @param document The document for the container page @param cms The current CmsObject @param resource The resource of the container page @param systemFields The list of field names for fields where mappings to should be discarded, since these fields are used system internally. @return the manipulated document
[ "Adds", "search", "fields", "from", "elements", "on", "a", "container", "page", "to", "a", "container", "page", "s", "document", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/CmsSolrFieldConfiguration.java#L377-L424
158,357
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/CmsRootHandler.java
CmsRootHandler.clearHandlers
public void clearHandlers() { for (Map<String, CmsAttributeHandler> handlers : m_handlers) { for (CmsAttributeHandler handler : handlers.values()) { handler.clearHandlers(); } handlers.clear(); } m_handlers.clear(); m_handlers.add(new HashMap<String, CmsAttributeHandler>()); m_handlerById.clear(); }
java
public void clearHandlers() { for (Map<String, CmsAttributeHandler> handlers : m_handlers) { for (CmsAttributeHandler handler : handlers.values()) { handler.clearHandlers(); } handlers.clear(); } m_handlers.clear(); m_handlers.add(new HashMap<String, CmsAttributeHandler>()); m_handlerById.clear(); }
[ "public", "void", "clearHandlers", "(", ")", "{", "for", "(", "Map", "<", "String", ",", "CmsAttributeHandler", ">", "handlers", ":", "m_handlers", ")", "{", "for", "(", "CmsAttributeHandler", "handler", ":", "handlers", ".", "values", "(", ")", ")", "{", "handler", ".", "clearHandlers", "(", ")", ";", "}", "handlers", ".", "clear", "(", ")", ";", "}", "m_handlers", ".", "clear", "(", ")", ";", "m_handlers", ".", "add", "(", "new", "HashMap", "<", "String", ",", "CmsAttributeHandler", ">", "(", ")", ")", ";", "m_handlerById", ".", "clear", "(", ")", ";", "}" ]
Clears the handler hierarchy.
[ "Clears", "the", "handler", "hierarchy", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/CmsRootHandler.java#L63-L74
158,358
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java
CmsCheckableDatePanel.setDates
public void setDates(SortedSet<Date> dates, boolean checked) { m_checkBoxes.clear(); for (Date date : dates) { CmsCheckBox cb = generateCheckBox(date, checked); m_checkBoxes.add(cb); } reInitLayoutElements(); setDatesInternal(dates); }
java
public void setDates(SortedSet<Date> dates, boolean checked) { m_checkBoxes.clear(); for (Date date : dates) { CmsCheckBox cb = generateCheckBox(date, checked); m_checkBoxes.add(cb); } reInitLayoutElements(); setDatesInternal(dates); }
[ "public", "void", "setDates", "(", "SortedSet", "<", "Date", ">", "dates", ",", "boolean", "checked", ")", "{", "m_checkBoxes", ".", "clear", "(", ")", ";", "for", "(", "Date", "date", ":", "dates", ")", "{", "CmsCheckBox", "cb", "=", "generateCheckBox", "(", "date", ",", "checked", ")", ";", "m_checkBoxes", ".", "add", "(", "cb", ")", ";", "}", "reInitLayoutElements", "(", ")", ";", "setDatesInternal", "(", "dates", ")", ";", "}" ]
Sets all dates in the list. @param dates the dates to set @param checked flag, indicating if all should be checked or unchecked.
[ "Sets", "all", "dates", "in", "the", "list", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java#L240-L249
158,359
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java
CmsCheckableDatePanel.setDatesWithCheckState
public void setDatesWithCheckState(Collection<CmsPair<Date, Boolean>> datesWithCheckInfo) { SortedSet<Date> dates = new TreeSet<>(); m_checkBoxes.clear(); for (CmsPair<Date, Boolean> p : datesWithCheckInfo) { addCheckBox(p.getFirst(), p.getSecond().booleanValue()); dates.add(p.getFirst()); } reInitLayoutElements(); setDatesInternal(dates); }
java
public void setDatesWithCheckState(Collection<CmsPair<Date, Boolean>> datesWithCheckInfo) { SortedSet<Date> dates = new TreeSet<>(); m_checkBoxes.clear(); for (CmsPair<Date, Boolean> p : datesWithCheckInfo) { addCheckBox(p.getFirst(), p.getSecond().booleanValue()); dates.add(p.getFirst()); } reInitLayoutElements(); setDatesInternal(dates); }
[ "public", "void", "setDatesWithCheckState", "(", "Collection", "<", "CmsPair", "<", "Date", ",", "Boolean", ">", ">", "datesWithCheckInfo", ")", "{", "SortedSet", "<", "Date", ">", "dates", "=", "new", "TreeSet", "<>", "(", ")", ";", "m_checkBoxes", ".", "clear", "(", ")", ";", "for", "(", "CmsPair", "<", "Date", ",", "Boolean", ">", "p", ":", "datesWithCheckInfo", ")", "{", "addCheckBox", "(", "p", ".", "getFirst", "(", ")", ",", "p", ".", "getSecond", "(", ")", ".", "booleanValue", "(", ")", ")", ";", "dates", ".", "add", "(", "p", ".", "getFirst", "(", ")", ")", ";", "}", "reInitLayoutElements", "(", ")", ";", "setDatesInternal", "(", "dates", ")", ";", "}" ]
Set dates with the provided check states. @param datesWithCheckInfo the dates to set, accompanied with the check state to set.
[ "Set", "dates", "with", "the", "provided", "check", "states", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java#L255-L265
158,360
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java
CmsCheckableDatePanel.addCheckBox
private void addCheckBox(Date date, boolean checkState) { CmsCheckBox cb = generateCheckBox(date, checkState); m_checkBoxes.add(cb); reInitLayoutElements(); }
java
private void addCheckBox(Date date, boolean checkState) { CmsCheckBox cb = generateCheckBox(date, checkState); m_checkBoxes.add(cb); reInitLayoutElements(); }
[ "private", "void", "addCheckBox", "(", "Date", "date", ",", "boolean", "checkState", ")", "{", "CmsCheckBox", "cb", "=", "generateCheckBox", "(", "date", ",", "checkState", ")", ";", "m_checkBoxes", ".", "add", "(", "cb", ")", ";", "reInitLayoutElements", "(", ")", ";", "}" ]
Add a new check box. @param date the date for the check box @param checkState the initial check state.
[ "Add", "a", "new", "check", "box", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java#L272-L278
158,361
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java
CmsCheckableDatePanel.addDateWithCheckState
private void addDateWithCheckState(Date date, boolean checkState) { addCheckBox(date, checkState); if (!m_dates.contains(date)) { m_dates.add(date); fireValueChange(); } }
java
private void addDateWithCheckState(Date date, boolean checkState) { addCheckBox(date, checkState); if (!m_dates.contains(date)) { m_dates.add(date); fireValueChange(); } }
[ "private", "void", "addDateWithCheckState", "(", "Date", "date", ",", "boolean", "checkState", ")", "{", "addCheckBox", "(", "date", ",", "checkState", ")", ";", "if", "(", "!", "m_dates", ".", "contains", "(", "date", ")", ")", "{", "m_dates", ".", "add", "(", "date", ")", ";", "fireValueChange", "(", ")", ";", "}", "}" ]
Add a date with a certain check state. @param date the date to add. @param checkState the check state.
[ "Add", "a", "date", "with", "a", "certain", "check", "state", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java#L285-L292
158,362
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java
CmsCheckableDatePanel.generateCheckBox
private CmsCheckBox generateCheckBox(Date date, boolean checkState) { CmsCheckBox cb = new CmsCheckBox(); cb.setText(m_dateFormat.format(date)); cb.setChecked(checkState); cb.getElement().setPropertyObject("date", date); return cb; }
java
private CmsCheckBox generateCheckBox(Date date, boolean checkState) { CmsCheckBox cb = new CmsCheckBox(); cb.setText(m_dateFormat.format(date)); cb.setChecked(checkState); cb.getElement().setPropertyObject("date", date); return cb; }
[ "private", "CmsCheckBox", "generateCheckBox", "(", "Date", "date", ",", "boolean", "checkState", ")", "{", "CmsCheckBox", "cb", "=", "new", "CmsCheckBox", "(", ")", ";", "cb", ".", "setText", "(", "m_dateFormat", ".", "format", "(", "date", ")", ")", ";", "cb", ".", "setChecked", "(", "checkState", ")", ";", "cb", ".", "getElement", "(", ")", ".", "setPropertyObject", "(", "\"date\"", ",", "date", ")", ";", "return", "cb", ";", "}" ]
Generate a new check box with the provided date and check state. @param date date for the check box. @param checkState the initial check state. @return the created check box
[ "Generate", "a", "new", "check", "box", "with", "the", "provided", "date", "and", "check", "state", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java#L308-L316
158,363
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java
CmsCheckableDatePanel.reInitLayoutElements
private void reInitLayoutElements() { m_panel.clear(); for (CmsCheckBox cb : m_checkBoxes) { m_panel.add(setStyle(m_onlyLabels ? new Label(cb.getText()) : cb)); } }
java
private void reInitLayoutElements() { m_panel.clear(); for (CmsCheckBox cb : m_checkBoxes) { m_panel.add(setStyle(m_onlyLabels ? new Label(cb.getText()) : cb)); } }
[ "private", "void", "reInitLayoutElements", "(", ")", "{", "m_panel", ".", "clear", "(", ")", ";", "for", "(", "CmsCheckBox", "cb", ":", "m_checkBoxes", ")", "{", "m_panel", ".", "add", "(", "setStyle", "(", "m_onlyLabels", "?", "new", "Label", "(", "cb", ".", "getText", "(", ")", ")", ":", "cb", ")", ")", ";", "}", "}" ]
Refresh the layout element.
[ "Refresh", "the", "layout", "element", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java#L321-L327
158,364
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java
CmsCheckableDatePanel.setDatesInternal
private void setDatesInternal(SortedSet<Date> dates) { if (!m_dates.equals(dates)) { m_dates = new TreeSet<>(dates); fireValueChange(); } }
java
private void setDatesInternal(SortedSet<Date> dates) { if (!m_dates.equals(dates)) { m_dates = new TreeSet<>(dates); fireValueChange(); } }
[ "private", "void", "setDatesInternal", "(", "SortedSet", "<", "Date", ">", "dates", ")", "{", "if", "(", "!", "m_dates", ".", "equals", "(", "dates", ")", ")", "{", "m_dates", "=", "new", "TreeSet", "<>", "(", "dates", ")", ";", "fireValueChange", "(", ")", ";", "}", "}" ]
Updates the internal list of dates and fires a value change if necessary. @param dates the dates to set.
[ "Updates", "the", "internal", "list", "of", "dates", "and", "fires", "a", "value", "change", "if", "necessary", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java#L334-L340
158,365
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java
CmsCheckableDatePanel.setStyle
private Widget setStyle(Widget widget) { widget.setWidth(m_width); widget.getElement().getStyle().setDisplay(Display.INLINE_BLOCK); return widget; }
java
private Widget setStyle(Widget widget) { widget.setWidth(m_width); widget.getElement().getStyle().setDisplay(Display.INLINE_BLOCK); return widget; }
[ "private", "Widget", "setStyle", "(", "Widget", "widget", ")", "{", "widget", ".", "setWidth", "(", "m_width", ")", ";", "widget", ".", "getElement", "(", ")", ".", "getStyle", "(", ")", ".", "setDisplay", "(", "Display", ".", "INLINE_BLOCK", ")", ";", "return", "widget", ";", "}" ]
Set the style for the widgets in the panel according to the chosen style option. @param widget the widget that should be styled. @return the styled widget.
[ "Set", "the", "style", "for", "the", "widgets", "in", "the", "panel", "according", "to", "the", "chosen", "style", "option", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java#L347-L352
158,366
alkacon/opencms-core
src/org/opencms/file/types/CmsResourceTypeXmlContent.java
CmsResourceTypeXmlContent.getDetailContainerResources
private List<CmsResource> getDetailContainerResources(CmsObject cms, CmsResource res) throws CmsException { CmsRelationFilter filter = CmsRelationFilter.relationsFromStructureId(res.getStructureId()).filterType( CmsRelationType.DETAIL_ONLY); List<CmsResource> result = Lists.newArrayList(); List<CmsRelation> relations = cms.readRelations(filter); for (CmsRelation relation : relations) { try { result.add(relation.getTarget(cms, CmsResourceFilter.ALL)); } catch (Exception e) { LOG.error(e.getLocalizedMessage(), e); } } return result; }
java
private List<CmsResource> getDetailContainerResources(CmsObject cms, CmsResource res) throws CmsException { CmsRelationFilter filter = CmsRelationFilter.relationsFromStructureId(res.getStructureId()).filterType( CmsRelationType.DETAIL_ONLY); List<CmsResource> result = Lists.newArrayList(); List<CmsRelation> relations = cms.readRelations(filter); for (CmsRelation relation : relations) { try { result.add(relation.getTarget(cms, CmsResourceFilter.ALL)); } catch (Exception e) { LOG.error(e.getLocalizedMessage(), e); } } return result; }
[ "private", "List", "<", "CmsResource", ">", "getDetailContainerResources", "(", "CmsObject", "cms", ",", "CmsResource", "res", ")", "throws", "CmsException", "{", "CmsRelationFilter", "filter", "=", "CmsRelationFilter", ".", "relationsFromStructureId", "(", "res", ".", "getStructureId", "(", ")", ")", ".", "filterType", "(", "CmsRelationType", ".", "DETAIL_ONLY", ")", ";", "List", "<", "CmsResource", ">", "result", "=", "Lists", ".", "newArrayList", "(", ")", ";", "List", "<", "CmsRelation", ">", "relations", "=", "cms", ".", "readRelations", "(", "filter", ")", ";", "for", "(", "CmsRelation", "relation", ":", "relations", ")", "{", "try", "{", "result", ".", "add", "(", "relation", ".", "getTarget", "(", "cms", ",", "CmsResourceFilter", ".", "ALL", ")", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "LOG", ".", "error", "(", "e", ".", "getLocalizedMessage", "(", ")", ",", "e", ")", ";", "}", "}", "return", "result", ";", "}" ]
Reads the detail container resources which are connected by relations to the given resource. @param cms the current CMS context @param res the detail content @return the list of detail only container resources @throws CmsException if something goes wrong
[ "Reads", "the", "detail", "container", "resources", "which", "are", "connected", "by", "relations", "to", "the", "given", "resource", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/types/CmsResourceTypeXmlContent.java#L652-L666
158,367
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/searchindex/CmsMappingsList.java
CmsMappingsList.getMappings
private List<I_CmsSearchFieldMapping> getMappings() { CmsSearchManager manager = OpenCms.getSearchManager(); I_CmsSearchFieldConfiguration fieldConfig = manager.getFieldConfiguration(getParamFieldconfiguration()); CmsLuceneField field; List<I_CmsSearchFieldMapping> result = null; Iterator<CmsSearchField> itFields; if (fieldConfig != null) { itFields = fieldConfig.getFields().iterator(); while (itFields.hasNext()) { field = (CmsLuceneField)itFields.next(); if (field.getName().equals(getParamField())) { result = field.getMappings(); } } } else { result = Collections.emptyList(); if (LOG.isErrorEnabled()) { LOG.error( Messages.get().getBundle().key( Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, A_CmsFieldConfigurationDialog.PARAM_FIELDCONFIGURATION)); } } return result; }
java
private List<I_CmsSearchFieldMapping> getMappings() { CmsSearchManager manager = OpenCms.getSearchManager(); I_CmsSearchFieldConfiguration fieldConfig = manager.getFieldConfiguration(getParamFieldconfiguration()); CmsLuceneField field; List<I_CmsSearchFieldMapping> result = null; Iterator<CmsSearchField> itFields; if (fieldConfig != null) { itFields = fieldConfig.getFields().iterator(); while (itFields.hasNext()) { field = (CmsLuceneField)itFields.next(); if (field.getName().equals(getParamField())) { result = field.getMappings(); } } } else { result = Collections.emptyList(); if (LOG.isErrorEnabled()) { LOG.error( Messages.get().getBundle().key( Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, A_CmsFieldConfigurationDialog.PARAM_FIELDCONFIGURATION)); } } return result; }
[ "private", "List", "<", "I_CmsSearchFieldMapping", ">", "getMappings", "(", ")", "{", "CmsSearchManager", "manager", "=", "OpenCms", ".", "getSearchManager", "(", ")", ";", "I_CmsSearchFieldConfiguration", "fieldConfig", "=", "manager", ".", "getFieldConfiguration", "(", "getParamFieldconfiguration", "(", ")", ")", ";", "CmsLuceneField", "field", ";", "List", "<", "I_CmsSearchFieldMapping", ">", "result", "=", "null", ";", "Iterator", "<", "CmsSearchField", ">", "itFields", ";", "if", "(", "fieldConfig", "!=", "null", ")", "{", "itFields", "=", "fieldConfig", ".", "getFields", "(", ")", ".", "iterator", "(", ")", ";", "while", "(", "itFields", ".", "hasNext", "(", ")", ")", "{", "field", "=", "(", "CmsLuceneField", ")", "itFields", ".", "next", "(", ")", ";", "if", "(", "field", ".", "getName", "(", ")", ".", "equals", "(", "getParamField", "(", ")", ")", ")", "{", "result", "=", "field", ".", "getMappings", "(", ")", ";", "}", "}", "}", "else", "{", "result", "=", "Collections", ".", "emptyList", "(", ")", ";", "if", "(", "LOG", ".", "isErrorEnabled", "(", ")", ")", "{", "LOG", ".", "error", "(", "Messages", ".", "get", "(", ")", ".", "getBundle", "(", ")", ".", "key", "(", "Messages", ".", "ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1", ",", "A_CmsFieldConfigurationDialog", ".", "PARAM_FIELDCONFIGURATION", ")", ")", ";", "}", "}", "return", "result", ";", "}" ]
Returns the configured mappings of the current field. @return the configured mappings of the current field
[ "Returns", "the", "configured", "mappings", "of", "the", "current", "field", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/searchindex/CmsMappingsList.java#L421-L446
158,368
alkacon/opencms-core
src-setup/org/opencms/setup/ui/CmsSetupErrorDialog.java
CmsSetupErrorDialog.showErrorDialog
public static void showErrorDialog(String message, String details) { Window window = prepareWindow(DialogWidth.wide); window.setCaption("Error"); window.setContent(new CmsSetupErrorDialog(message, details, null, window)); A_CmsUI.get().addWindow(window); }
java
public static void showErrorDialog(String message, String details) { Window window = prepareWindow(DialogWidth.wide); window.setCaption("Error"); window.setContent(new CmsSetupErrorDialog(message, details, null, window)); A_CmsUI.get().addWindow(window); }
[ "public", "static", "void", "showErrorDialog", "(", "String", "message", ",", "String", "details", ")", "{", "Window", "window", "=", "prepareWindow", "(", "DialogWidth", ".", "wide", ")", ";", "window", ".", "setCaption", "(", "\"Error\"", ")", ";", "window", ".", "setContent", "(", "new", "CmsSetupErrorDialog", "(", "message", ",", "details", ",", "null", ",", "window", ")", ")", ";", "A_CmsUI", ".", "get", "(", ")", ".", "addWindow", "(", "window", ")", ";", "}" ]
Shows error dialog, manually supplying details instead of getting them from an exception stack trace. @param message the error message @param details the details
[ "Shows", "error", "dialog", "manually", "supplying", "details", "instead", "of", "getting", "them", "from", "an", "exception", "stack", "trace", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/ui/CmsSetupErrorDialog.java#L154-L161
158,369
alkacon/opencms-core
src/org/opencms/jsp/util/CmsMacroFormatterResolver.java
CmsMacroFormatterResolver.getMacroBeanValue
protected Object getMacroBeanValue(Object bean, String property) { Object result = null; if ((bean != null) && CmsStringUtil.isNotEmptyOrWhitespaceOnly(property)) { try { PropertyUtilsBean propBean = BeanUtilsBean.getInstance().getPropertyUtils(); result = propBean.getProperty(bean, property); } catch (Exception e) { LOG.error("Unable to access property '" + property + "' of '" + bean + "'.", e); } } else { LOG.info("Invalid parameters: property='" + property + "' bean='" + bean + "'."); } return result; }
java
protected Object getMacroBeanValue(Object bean, String property) { Object result = null; if ((bean != null) && CmsStringUtil.isNotEmptyOrWhitespaceOnly(property)) { try { PropertyUtilsBean propBean = BeanUtilsBean.getInstance().getPropertyUtils(); result = propBean.getProperty(bean, property); } catch (Exception e) { LOG.error("Unable to access property '" + property + "' of '" + bean + "'.", e); } } else { LOG.info("Invalid parameters: property='" + property + "' bean='" + bean + "'."); } return result; }
[ "protected", "Object", "getMacroBeanValue", "(", "Object", "bean", ",", "String", "property", ")", "{", "Object", "result", "=", "null", ";", "if", "(", "(", "bean", "!=", "null", ")", "&&", "CmsStringUtil", ".", "isNotEmptyOrWhitespaceOnly", "(", "property", ")", ")", "{", "try", "{", "PropertyUtilsBean", "propBean", "=", "BeanUtilsBean", ".", "getInstance", "(", ")", ".", "getPropertyUtils", "(", ")", ";", "result", "=", "propBean", ".", "getProperty", "(", "bean", ",", "property", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "LOG", ".", "error", "(", "\"Unable to access property '\"", "+", "property", "+", "\"' of '\"", "+", "bean", "+", "\"'.\"", ",", "e", ")", ";", "}", "}", "else", "{", "LOG", ".", "info", "(", "\"Invalid parameters: property='\"", "+", "property", "+", "\"' bean='\"", "+", "bean", "+", "\"'.\"", ")", ";", "}", "return", "result", ";", "}" ]
Returns the property value read from the given JavaBean. @param bean the JavaBean to read the property from @param property the property to read @return the property value read from the given JavaBean
[ "Returns", "the", "property", "value", "read", "from", "the", "given", "JavaBean", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsMacroFormatterResolver.java#L295-L309
158,370
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java
CmsSerialDateController.setEndTime
public void setEndTime(final Date date) { if (!Objects.equals(m_model.getEnd(), date)) { m_model.setEnd(date); valueChanged(); } }
java
public void setEndTime(final Date date) { if (!Objects.equals(m_model.getEnd(), date)) { m_model.setEnd(date); valueChanged(); } }
[ "public", "void", "setEndTime", "(", "final", "Date", "date", ")", "{", "if", "(", "!", "Objects", ".", "equals", "(", "m_model", ".", "getEnd", "(", ")", ",", "date", ")", ")", "{", "m_model", ".", "setEnd", "(", "date", ")", ";", "valueChanged", "(", ")", ";", "}", "}" ]
Set the end time. @param date the end time to set.
[ "Set", "the", "end", "time", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java#L578-L585
158,371
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java
CmsSerialDateController.setEndType
public void setEndType(final String value) { final EndType endType = EndType.valueOf(value); if (!endType.equals(m_model.getEndType())) { removeExceptionsOnChange(new Command() { public void execute() { switch (endType) { case SINGLE: m_model.setOccurrences(0); m_model.setSeriesEndDate(null); break; case TIMES: m_model.setOccurrences(10); m_model.setSeriesEndDate(null); break; case DATE: m_model.setOccurrences(0); m_model.setSeriesEndDate(m_model.getStart() == null ? new Date() : m_model.getStart()); break; default: break; } m_model.setEndType(endType); valueChanged(); } }); } }
java
public void setEndType(final String value) { final EndType endType = EndType.valueOf(value); if (!endType.equals(m_model.getEndType())) { removeExceptionsOnChange(new Command() { public void execute() { switch (endType) { case SINGLE: m_model.setOccurrences(0); m_model.setSeriesEndDate(null); break; case TIMES: m_model.setOccurrences(10); m_model.setSeriesEndDate(null); break; case DATE: m_model.setOccurrences(0); m_model.setSeriesEndDate(m_model.getStart() == null ? new Date() : m_model.getStart()); break; default: break; } m_model.setEndType(endType); valueChanged(); } }); } }
[ "public", "void", "setEndType", "(", "final", "String", "value", ")", "{", "final", "EndType", "endType", "=", "EndType", ".", "valueOf", "(", "value", ")", ";", "if", "(", "!", "endType", ".", "equals", "(", "m_model", ".", "getEndType", "(", ")", ")", ")", "{", "removeExceptionsOnChange", "(", "new", "Command", "(", ")", "{", "public", "void", "execute", "(", ")", "{", "switch", "(", "endType", ")", "{", "case", "SINGLE", ":", "m_model", ".", "setOccurrences", "(", "0", ")", ";", "m_model", ".", "setSeriesEndDate", "(", "null", ")", ";", "break", ";", "case", "TIMES", ":", "m_model", ".", "setOccurrences", "(", "10", ")", ";", "m_model", ".", "setSeriesEndDate", "(", "null", ")", ";", "break", ";", "case", "DATE", ":", "m_model", ".", "setOccurrences", "(", "0", ")", ";", "m_model", ".", "setSeriesEndDate", "(", "m_model", ".", "getStart", "(", ")", "==", "null", "?", "new", "Date", "(", ")", ":", "m_model", ".", "getStart", "(", ")", ")", ";", "break", ";", "default", ":", "break", ";", "}", "m_model", ".", "setEndType", "(", "endType", ")", ";", "valueChanged", "(", ")", ";", "}", "}", ")", ";", "}", "}" ]
Set the duration option. @param value the duration option to set ({@link EndType} as string).
[ "Set", "the", "duration", "option", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java#L591-L621
158,372
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java
CmsSerialDateController.setIsSeries
public void setIsSeries(Boolean isSeries) { if (null != isSeries) { final boolean series = isSeries.booleanValue(); if ((null != m_model.getParentSeriesId()) && series) { m_removeSeriesBindingConfirmDialog.show(new Command() { public void execute() { m_model.setParentSeriesId(null); setPattern(PatternType.DAILY.toString()); } }); } else { setPattern(series ? PatternType.DAILY.toString() : PatternType.NONE.toString()); } } }
java
public void setIsSeries(Boolean isSeries) { if (null != isSeries) { final boolean series = isSeries.booleanValue(); if ((null != m_model.getParentSeriesId()) && series) { m_removeSeriesBindingConfirmDialog.show(new Command() { public void execute() { m_model.setParentSeriesId(null); setPattern(PatternType.DAILY.toString()); } }); } else { setPattern(series ? PatternType.DAILY.toString() : PatternType.NONE.toString()); } } }
[ "public", "void", "setIsSeries", "(", "Boolean", "isSeries", ")", "{", "if", "(", "null", "!=", "isSeries", ")", "{", "final", "boolean", "series", "=", "isSeries", ".", "booleanValue", "(", ")", ";", "if", "(", "(", "null", "!=", "m_model", ".", "getParentSeriesId", "(", ")", ")", "&&", "series", ")", "{", "m_removeSeriesBindingConfirmDialog", ".", "show", "(", "new", "Command", "(", ")", "{", "public", "void", "execute", "(", ")", "{", "m_model", ".", "setParentSeriesId", "(", "null", ")", ";", "setPattern", "(", "PatternType", ".", "DAILY", ".", "toString", "(", ")", ")", ";", "}", "}", ")", ";", "}", "else", "{", "setPattern", "(", "series", "?", "PatternType", ".", "DAILY", ".", "toString", "(", ")", ":", "PatternType", ".", "NONE", ".", "toString", "(", ")", ")", ";", "}", "}", "}" ]
Toggle between single events and series. @param isSeries flag, indicating if we want a series of events.
[ "Toggle", "between", "single", "events", "and", "series", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java#L627-L645
158,373
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java
CmsSerialDateController.setOccurrences
public void setOccurrences(String occurrences) { int o = CmsSerialDateUtil.toIntWithDefault(occurrences, -1); if (m_model.getOccurrences() != o) { m_model.setOccurrences(o); valueChanged(); } }
java
public void setOccurrences(String occurrences) { int o = CmsSerialDateUtil.toIntWithDefault(occurrences, -1); if (m_model.getOccurrences() != o) { m_model.setOccurrences(o); valueChanged(); } }
[ "public", "void", "setOccurrences", "(", "String", "occurrences", ")", "{", "int", "o", "=", "CmsSerialDateUtil", ".", "toIntWithDefault", "(", "occurrences", ",", "-", "1", ")", ";", "if", "(", "m_model", ".", "getOccurrences", "(", ")", "!=", "o", ")", "{", "m_model", ".", "setOccurrences", "(", "o", ")", ";", "valueChanged", "(", ")", ";", "}", "}" ]
Set the occurrences. If the String is invalid, the occurrences will be set to "-1" to cause server-side validation to fail. @param occurrences the interval to set.
[ "Set", "the", "occurrences", ".", "If", "the", "String", "is", "invalid", "the", "occurrences", "will", "be", "set", "to", "-", "1", "to", "cause", "server", "-", "side", "validation", "to", "fail", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java#L660-L667
158,374
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java
CmsSerialDateController.setPattern
public void setPattern(String patternType) { final PatternType type = PatternType.valueOf(patternType); if (type != m_model.getPatternType()) { removeExceptionsOnChange(new Command() { public void execute() { EndType oldEndType = m_model.getEndType(); m_model.setPatternType(type); m_model.setIndividualDates(null); m_model.setInterval(getPatternDefaultValues().getInterval()); m_model.setEveryWorkingDay(Boolean.FALSE); m_model.clearWeekDays(); m_model.clearIndividualDates(); m_model.clearWeeksOfMonth(); m_model.clearExceptions(); if (type.equals(PatternType.NONE) || type.equals(PatternType.INDIVIDUAL)) { m_model.setEndType(EndType.SINGLE); } else if (oldEndType.equals(EndType.SINGLE)) { m_model.setEndType(EndType.TIMES); m_model.setOccurrences(10); m_model.setSeriesEndDate(null); } m_model.setDayOfMonth(getPatternDefaultValues().getDayOfMonth()); m_model.setMonth(getPatternDefaultValues().getMonth()); if (type.equals(PatternType.WEEKLY)) { m_model.setWeekDay(getPatternDefaultValues().getWeekDay()); } valueChanged(); } }); } }
java
public void setPattern(String patternType) { final PatternType type = PatternType.valueOf(patternType); if (type != m_model.getPatternType()) { removeExceptionsOnChange(new Command() { public void execute() { EndType oldEndType = m_model.getEndType(); m_model.setPatternType(type); m_model.setIndividualDates(null); m_model.setInterval(getPatternDefaultValues().getInterval()); m_model.setEveryWorkingDay(Boolean.FALSE); m_model.clearWeekDays(); m_model.clearIndividualDates(); m_model.clearWeeksOfMonth(); m_model.clearExceptions(); if (type.equals(PatternType.NONE) || type.equals(PatternType.INDIVIDUAL)) { m_model.setEndType(EndType.SINGLE); } else if (oldEndType.equals(EndType.SINGLE)) { m_model.setEndType(EndType.TIMES); m_model.setOccurrences(10); m_model.setSeriesEndDate(null); } m_model.setDayOfMonth(getPatternDefaultValues().getDayOfMonth()); m_model.setMonth(getPatternDefaultValues().getMonth()); if (type.equals(PatternType.WEEKLY)) { m_model.setWeekDay(getPatternDefaultValues().getWeekDay()); } valueChanged(); } }); } }
[ "public", "void", "setPattern", "(", "String", "patternType", ")", "{", "final", "PatternType", "type", "=", "PatternType", ".", "valueOf", "(", "patternType", ")", ";", "if", "(", "type", "!=", "m_model", ".", "getPatternType", "(", ")", ")", "{", "removeExceptionsOnChange", "(", "new", "Command", "(", ")", "{", "public", "void", "execute", "(", ")", "{", "EndType", "oldEndType", "=", "m_model", ".", "getEndType", "(", ")", ";", "m_model", ".", "setPatternType", "(", "type", ")", ";", "m_model", ".", "setIndividualDates", "(", "null", ")", ";", "m_model", ".", "setInterval", "(", "getPatternDefaultValues", "(", ")", ".", "getInterval", "(", ")", ")", ";", "m_model", ".", "setEveryWorkingDay", "(", "Boolean", ".", "FALSE", ")", ";", "m_model", ".", "clearWeekDays", "(", ")", ";", "m_model", ".", "clearIndividualDates", "(", ")", ";", "m_model", ".", "clearWeeksOfMonth", "(", ")", ";", "m_model", ".", "clearExceptions", "(", ")", ";", "if", "(", "type", ".", "equals", "(", "PatternType", ".", "NONE", ")", "||", "type", ".", "equals", "(", "PatternType", ".", "INDIVIDUAL", ")", ")", "{", "m_model", ".", "setEndType", "(", "EndType", ".", "SINGLE", ")", ";", "}", "else", "if", "(", "oldEndType", ".", "equals", "(", "EndType", ".", "SINGLE", ")", ")", "{", "m_model", ".", "setEndType", "(", "EndType", ".", "TIMES", ")", ";", "m_model", ".", "setOccurrences", "(", "10", ")", ";", "m_model", ".", "setSeriesEndDate", "(", "null", ")", ";", "}", "m_model", ".", "setDayOfMonth", "(", "getPatternDefaultValues", "(", ")", ".", "getDayOfMonth", "(", ")", ")", ";", "m_model", ".", "setMonth", "(", "getPatternDefaultValues", "(", ")", ".", "getMonth", "(", ")", ")", ";", "if", "(", "type", ".", "equals", "(", "PatternType", ".", "WEEKLY", ")", ")", "{", "m_model", ".", "setWeekDay", "(", "getPatternDefaultValues", "(", ")", ".", "getWeekDay", "(", ")", ")", ";", "}", "valueChanged", "(", ")", ";", "}", "}", ")", ";", "}", "}" ]
Set the serial pattern type. @param patternType the pattern type to set.
[ "Set", "the", "serial", "pattern", "type", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java#L673-L707
158,375
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java
CmsSerialDateController.setSeriesEndDate
public void setSeriesEndDate(Date date) { if (!Objects.equals(m_model.getSeriesEndDate(), date)) { m_model.setSeriesEndDate(date); valueChanged(); } }
java
public void setSeriesEndDate(Date date) { if (!Objects.equals(m_model.getSeriesEndDate(), date)) { m_model.setSeriesEndDate(date); valueChanged(); } }
[ "public", "void", "setSeriesEndDate", "(", "Date", "date", ")", "{", "if", "(", "!", "Objects", ".", "equals", "(", "m_model", ".", "getSeriesEndDate", "(", ")", ",", "date", ")", ")", "{", "m_model", ".", "setSeriesEndDate", "(", "date", ")", ";", "valueChanged", "(", ")", ";", "}", "}" ]
Set the serial end date. @param date the serial end date.
[ "Set", "the", "serial", "end", "date", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java#L713-L720
158,376
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java
CmsSerialDateController.setStartTime
public void setStartTime(final Date date) { if (!Objects.equals(m_model.getStart(), date)) { removeExceptionsOnChange(new Command() { public void execute() { m_model.setStart(date); setPatternDefaultValues(date); valueChanged(); } }); } }
java
public void setStartTime(final Date date) { if (!Objects.equals(m_model.getStart(), date)) { removeExceptionsOnChange(new Command() { public void execute() { m_model.setStart(date); setPatternDefaultValues(date); valueChanged(); } }); } }
[ "public", "void", "setStartTime", "(", "final", "Date", "date", ")", "{", "if", "(", "!", "Objects", ".", "equals", "(", "m_model", ".", "getStart", "(", ")", ",", "date", ")", ")", "{", "removeExceptionsOnChange", "(", "new", "Command", "(", ")", "{", "public", "void", "execute", "(", ")", "{", "m_model", ".", "setStart", "(", "date", ")", ";", "setPatternDefaultValues", "(", "date", ")", ";", "valueChanged", "(", ")", ";", "}", "}", ")", ";", "}", "}" ]
Set the start time. @param date the start time to set.
[ "Set", "the", "start", "time", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java#L726-L740
158,377
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java
CmsSerialDateController.setWholeDay
public void setWholeDay(Boolean isWholeDay) { if (m_model.isWholeDay() ^ ((null != isWholeDay) && isWholeDay.booleanValue())) { m_model.setWholeDay(isWholeDay); valueChanged(); } }
java
public void setWholeDay(Boolean isWholeDay) { if (m_model.isWholeDay() ^ ((null != isWholeDay) && isWholeDay.booleanValue())) { m_model.setWholeDay(isWholeDay); valueChanged(); } }
[ "public", "void", "setWholeDay", "(", "Boolean", "isWholeDay", ")", "{", "if", "(", "m_model", ".", "isWholeDay", "(", ")", "^", "(", "(", "null", "!=", "isWholeDay", ")", "&&", "isWholeDay", ".", "booleanValue", "(", ")", ")", ")", "{", "m_model", ".", "setWholeDay", "(", "isWholeDay", ")", ";", "valueChanged", "(", ")", ";", "}", "}" ]
Sets the whole day flag. @param isWholeDay flag, indicating if the event lasts whole days.
[ "Sets", "the", "whole", "day", "flag", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java#L769-L775
158,378
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java
CmsSerialDateController.updateExceptions
public void updateExceptions(SortedSet<Date> exceptions) { SortedSet<Date> e = null == exceptions ? new TreeSet<Date>() : exceptions; if (!m_model.getExceptions().equals(e)) { m_model.setExceptions(e); m_view.updateExceptions(); valueChanged(); sizeChanged(); } }
java
public void updateExceptions(SortedSet<Date> exceptions) { SortedSet<Date> e = null == exceptions ? new TreeSet<Date>() : exceptions; if (!m_model.getExceptions().equals(e)) { m_model.setExceptions(e); m_view.updateExceptions(); valueChanged(); sizeChanged(); } }
[ "public", "void", "updateExceptions", "(", "SortedSet", "<", "Date", ">", "exceptions", ")", "{", "SortedSet", "<", "Date", ">", "e", "=", "null", "==", "exceptions", "?", "new", "TreeSet", "<", "Date", ">", "(", ")", ":", "exceptions", ";", "if", "(", "!", "m_model", ".", "getExceptions", "(", ")", ".", "equals", "(", "e", ")", ")", "{", "m_model", ".", "setExceptions", "(", "e", ")", ";", "m_view", ".", "updateExceptions", "(", ")", ";", "valueChanged", "(", ")", ";", "sizeChanged", "(", ")", ";", "}", "}" ]
Updates the exceptions. @param exceptions the exceptions to set
[ "Updates", "the", "exceptions", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java#L789-L799
158,379
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java
CmsSerialDateController.getService
I_CmsSerialDateServiceAsync getService() { if (SERVICE == null) { SERVICE = GWT.create(I_CmsSerialDateService.class); String serviceUrl = CmsCoreProvider.get().link("org.opencms.ade.contenteditor.CmsSerialDateService.gwt"); ((ServiceDefTarget)SERVICE).setServiceEntryPoint(serviceUrl); } return SERVICE; }
java
I_CmsSerialDateServiceAsync getService() { if (SERVICE == null) { SERVICE = GWT.create(I_CmsSerialDateService.class); String serviceUrl = CmsCoreProvider.get().link("org.opencms.ade.contenteditor.CmsSerialDateService.gwt"); ((ServiceDefTarget)SERVICE).setServiceEntryPoint(serviceUrl); } return SERVICE; }
[ "I_CmsSerialDateServiceAsync", "getService", "(", ")", "{", "if", "(", "SERVICE", "==", "null", ")", "{", "SERVICE", "=", "GWT", ".", "create", "(", "I_CmsSerialDateService", ".", "class", ")", ";", "String", "serviceUrl", "=", "CmsCoreProvider", ".", "get", "(", ")", ".", "link", "(", "\"org.opencms.ade.contenteditor.CmsSerialDateService.gwt\"", ")", ";", "(", "(", "ServiceDefTarget", ")", "SERVICE", ")", ".", "setServiceEntryPoint", "(", "serviceUrl", ")", ";", "}", "return", "SERVICE", ";", "}" ]
Returns the RPC service for serial dates. @return the RPC service for serial dates.
[ "Returns", "the", "RPC", "service", "for", "serial", "dates", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java#L824-L832
158,380
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java
CmsSerialDateController.setPatternDefaultValues
void setPatternDefaultValues(Date startDate) { if ((m_patternDefaultValues == null) || !Objects.equals(m_patternDefaultValues.getDate(), startDate)) { m_patternDefaultValues = new PatternDefaultValues(startDate); } }
java
void setPatternDefaultValues(Date startDate) { if ((m_patternDefaultValues == null) || !Objects.equals(m_patternDefaultValues.getDate(), startDate)) { m_patternDefaultValues = new PatternDefaultValues(startDate); } }
[ "void", "setPatternDefaultValues", "(", "Date", "startDate", ")", "{", "if", "(", "(", "m_patternDefaultValues", "==", "null", ")", "||", "!", "Objects", ".", "equals", "(", "m_patternDefaultValues", ".", "getDate", "(", ")", ",", "startDate", ")", ")", "{", "m_patternDefaultValues", "=", "new", "PatternDefaultValues", "(", "startDate", ")", ";", "}", "}" ]
Sets the default pattern values dependent on the provided start date. @param startDate the date, the default values are determined with.
[ "Sets", "the", "default", "pattern", "values", "dependent", "on", "the", "provided", "start", "date", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java#L838-L843
158,381
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java
CmsSerialDateController.initPatternControllers
private void initPatternControllers() { m_patternControllers.put(PatternType.NONE, new CmsPatternPanelNoneController()); m_patternControllers.put(PatternType.DAILY, new CmsPatternPanelDailyController(m_model, this)); m_patternControllers.put(PatternType.WEEKLY, new CmsPatternPanelWeeklyController(m_model, this)); m_patternControllers.put(PatternType.MONTHLY, new CmsPatternPanelMonthlyController(m_model, this)); m_patternControllers.put(PatternType.YEARLY, new CmsPatternPanelYearlyController(m_model, this)); // m_patternControllers.put(PatternType.INDIVIDUAL, new CmsPatternPanelIndividualController(m_model, this)); }
java
private void initPatternControllers() { m_patternControllers.put(PatternType.NONE, new CmsPatternPanelNoneController()); m_patternControllers.put(PatternType.DAILY, new CmsPatternPanelDailyController(m_model, this)); m_patternControllers.put(PatternType.WEEKLY, new CmsPatternPanelWeeklyController(m_model, this)); m_patternControllers.put(PatternType.MONTHLY, new CmsPatternPanelMonthlyController(m_model, this)); m_patternControllers.put(PatternType.YEARLY, new CmsPatternPanelYearlyController(m_model, this)); // m_patternControllers.put(PatternType.INDIVIDUAL, new CmsPatternPanelIndividualController(m_model, this)); }
[ "private", "void", "initPatternControllers", "(", ")", "{", "m_patternControllers", ".", "put", "(", "PatternType", ".", "NONE", ",", "new", "CmsPatternPanelNoneController", "(", ")", ")", ";", "m_patternControllers", ".", "put", "(", "PatternType", ".", "DAILY", ",", "new", "CmsPatternPanelDailyController", "(", "m_model", ",", "this", ")", ")", ";", "m_patternControllers", ".", "put", "(", "PatternType", ".", "WEEKLY", ",", "new", "CmsPatternPanelWeeklyController", "(", "m_model", ",", "this", ")", ")", ";", "m_patternControllers", ".", "put", "(", "PatternType", ".", "MONTHLY", ",", "new", "CmsPatternPanelMonthlyController", "(", "m_model", ",", "this", ")", ")", ";", "m_patternControllers", ".", "put", "(", "PatternType", ".", "YEARLY", ",", "new", "CmsPatternPanelYearlyController", "(", "m_model", ",", "this", ")", ")", ";", "// m_patternControllers.put(PatternType.INDIVIDUAL, new CmsPatternPanelIndividualController(m_model, this));\r", "}" ]
Initialize the pattern controllers.
[ "Initialize", "the", "pattern", "controllers", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateController.java#L848-L856
158,382
alkacon/opencms-core
src/org/opencms/configuration/CmsSetNextRule.java
CmsSetNextRule.begin
@Override public void begin(String namespace, String name, Attributes attributes) throws Exception { // not now: 6.0.0 // digester.setLogger(CmsLog.getLog(digester.getClass())); // Push an array to capture the parameter values if necessary if (m_paramCount > 0) { Object[] parameters = new Object[m_paramCount]; for (int i = 0; i < parameters.length; i++) { parameters[i] = null; } getDigester().pushParams(parameters); } }
java
@Override public void begin(String namespace, String name, Attributes attributes) throws Exception { // not now: 6.0.0 // digester.setLogger(CmsLog.getLog(digester.getClass())); // Push an array to capture the parameter values if necessary if (m_paramCount > 0) { Object[] parameters = new Object[m_paramCount]; for (int i = 0; i < parameters.length; i++) { parameters[i] = null; } getDigester().pushParams(parameters); } }
[ "@", "Override", "public", "void", "begin", "(", "String", "namespace", ",", "String", "name", ",", "Attributes", "attributes", ")", "throws", "Exception", "{", "// not now: 6.0.0", "// digester.setLogger(CmsLog.getLog(digester.getClass()));", "// Push an array to capture the parameter values if necessary", "if", "(", "m_paramCount", ">", "0", ")", "{", "Object", "[", "]", "parameters", "=", "new", "Object", "[", "m_paramCount", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "parameters", ".", "length", ";", "i", "++", ")", "{", "parameters", "[", "i", "]", "=", "null", ";", "}", "getDigester", "(", ")", ".", "pushParams", "(", "parameters", ")", ";", "}", "}" ]
Process the start of this element. @param attributes The attribute list for this element @param namespace the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace @param name the local name if the parser is namespace aware, or just the element name otherwise @throws Exception if something goes wrong
[ "Process", "the", "start", "of", "this", "element", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/configuration/CmsSetNextRule.java#L180-L194
158,383
alkacon/opencms-core
src/org/opencms/publish/CmsPublishManager.java
CmsPublishManager.setPublishQueueShutdowntime
public void setPublishQueueShutdowntime(String publishQueueShutdowntime) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_publishQueueShutdowntime = Integer.parseInt(publishQueueShutdowntime); }
java
public void setPublishQueueShutdowntime(String publishQueueShutdowntime) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_publishQueueShutdowntime = Integer.parseInt(publishQueueShutdowntime); }
[ "public", "void", "setPublishQueueShutdowntime", "(", "String", "publishQueueShutdowntime", ")", "{", "if", "(", "m_frozen", ")", "{", "throw", "new", "CmsRuntimeException", "(", "Messages", ".", "get", "(", ")", ".", "container", "(", "Messages", ".", "ERR_CONFIG_FROZEN_0", ")", ")", ";", "}", "m_publishQueueShutdowntime", "=", "Integer", ".", "parseInt", "(", "publishQueueShutdowntime", ")", ";", "}" ]
Sets the publish queue shutdown time. @param publishQueueShutdowntime the shutdown time to set, parsed as <code>int</code>
[ "Sets", "the", "publish", "queue", "shutdown", "time", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/publish/CmsPublishManager.java#L707-L713
158,384
alkacon/opencms-core
src/org/opencms/configuration/preferences/CmsUserSettingsStringPropertyWrapper.java
CmsUserSettingsStringPropertyWrapper.getElementView
@PrefMetadata(type = CmsElementViewPreference.class) public String getElementView() { return m_settings.getAdditionalPreference(CmsElementViewPreference.PREFERENCE_NAME, false); }
java
@PrefMetadata(type = CmsElementViewPreference.class) public String getElementView() { return m_settings.getAdditionalPreference(CmsElementViewPreference.PREFERENCE_NAME, false); }
[ "@", "PrefMetadata", "(", "type", "=", "CmsElementViewPreference", ".", "class", ")", "public", "String", "getElementView", "(", ")", "{", "return", "m_settings", ".", "getAdditionalPreference", "(", "CmsElementViewPreference", ".", "PREFERENCE_NAME", ",", "false", ")", ";", "}" ]
Gets the element view. @return the element view
[ "Gets", "the", "element", "view", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/configuration/preferences/CmsUserSettingsStringPropertyWrapper.java#L194-L198
158,385
alkacon/opencms-core
src/org/opencms/configuration/preferences/CmsUserSettingsStringPropertyWrapper.java
CmsUserSettingsStringPropertyWrapper.getExplorerFileEntryOptions
@PrefMetadata(type = CmsHiddenBuiltinPreference.class) public String getExplorerFileEntryOptions() { if (m_settings.getExplorerFileEntryOptions() == null) { return ""; } else { return "" + m_settings.getExplorerFileEntryOptions(); } }
java
@PrefMetadata(type = CmsHiddenBuiltinPreference.class) public String getExplorerFileEntryOptions() { if (m_settings.getExplorerFileEntryOptions() == null) { return ""; } else { return "" + m_settings.getExplorerFileEntryOptions(); } }
[ "@", "PrefMetadata", "(", "type", "=", "CmsHiddenBuiltinPreference", ".", "class", ")", "public", "String", "getExplorerFileEntryOptions", "(", ")", "{", "if", "(", "m_settings", ".", "getExplorerFileEntryOptions", "(", ")", "==", "null", ")", "{", "return", "\"\"", ";", "}", "else", "{", "return", "\"\"", "+", "m_settings", ".", "getExplorerFileEntryOptions", "(", ")", ";", "}", "}" ]
Gets the explorer file entry options. @return the explorer file entry options
[ "Gets", "the", "explorer", "file", "entry", "options", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/configuration/preferences/CmsUserSettingsStringPropertyWrapper.java#L238-L246
158,386
alkacon/opencms-core
src/org/opencms/configuration/preferences/CmsUserSettingsStringPropertyWrapper.java
CmsUserSettingsStringPropertyWrapper.getTimeWarp
@PrefMetadata(type = CmsTimeWarpPreference.class) public String getTimeWarp() { long warp = m_settings.getTimeWarp(); return warp < 0 ? "" : "" + warp; // if timewarp < 0 (i.e. time warp is not set), use the empty string because we don't want the date selector widget to interpret the negative value }
java
@PrefMetadata(type = CmsTimeWarpPreference.class) public String getTimeWarp() { long warp = m_settings.getTimeWarp(); return warp < 0 ? "" : "" + warp; // if timewarp < 0 (i.e. time warp is not set), use the empty string because we don't want the date selector widget to interpret the negative value }
[ "@", "PrefMetadata", "(", "type", "=", "CmsTimeWarpPreference", ".", "class", ")", "public", "String", "getTimeWarp", "(", ")", "{", "long", "warp", "=", "m_settings", ".", "getTimeWarp", "(", ")", ";", "return", "warp", "<", "0", "?", "\"\"", ":", "\"\"", "+", "warp", ";", "// if timewarp < 0 (i.e. time warp is not set), use the empty string because we don't want the date selector widget to interpret the negative value", "}" ]
Gets the time warp. @return the time warp
[ "Gets", "the", "time", "warp", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/configuration/preferences/CmsUserSettingsStringPropertyWrapper.java#L572-L577
158,387
alkacon/opencms-core
src/org/opencms/configuration/preferences/CmsUserSettingsStringPropertyWrapper.java
CmsUserSettingsStringPropertyWrapper.setTimeWarp
public void setTimeWarp(String l) { long warp = CmsContextInfo.CURRENT_TIME; try { warp = Long.parseLong(l); } catch (NumberFormatException e) { // if parsing the time warp fails, it will be set to -1 (i.e. disabled) } m_settings.setTimeWarp(warp); }
java
public void setTimeWarp(String l) { long warp = CmsContextInfo.CURRENT_TIME; try { warp = Long.parseLong(l); } catch (NumberFormatException e) { // if parsing the time warp fails, it will be set to -1 (i.e. disabled) } m_settings.setTimeWarp(warp); }
[ "public", "void", "setTimeWarp", "(", "String", "l", ")", "{", "long", "warp", "=", "CmsContextInfo", ".", "CURRENT_TIME", ";", "try", "{", "warp", "=", "Long", ".", "parseLong", "(", "l", ")", ";", "}", "catch", "(", "NumberFormatException", "e", ")", "{", "// if parsing the time warp fails, it will be set to -1 (i.e. disabled)", "}", "m_settings", ".", "setTimeWarp", "(", "warp", ")", ";", "}" ]
Sets the time warp. @param l the new time warp
[ "Sets", "the", "time", "warp", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/configuration/preferences/CmsUserSettingsStringPropertyWrapper.java#L1128-L1137
158,388
alkacon/opencms-core
src/org/opencms/acacia/shared/A_CmsSerialDateValue.java
A_CmsSerialDateValue.setExceptions
public final void setExceptions(SortedSet<Date> dates) { m_exceptions.clear(); if (null != dates) { m_exceptions.addAll(dates); } }
java
public final void setExceptions(SortedSet<Date> dates) { m_exceptions.clear(); if (null != dates) { m_exceptions.addAll(dates); } }
[ "public", "final", "void", "setExceptions", "(", "SortedSet", "<", "Date", ">", "dates", ")", "{", "m_exceptions", ".", "clear", "(", ")", ";", "if", "(", "null", "!=", "dates", ")", "{", "m_exceptions", ".", "addAll", "(", "dates", ")", ";", "}", "}" ]
Set dates where the event should not take place, even if they are part of the series. @param dates dates to set.
[ "Set", "dates", "where", "the", "event", "should", "not", "take", "place", "even", "if", "they", "are", "part", "of", "the", "series", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/A_CmsSerialDateValue.java#L465-L472
158,389
alkacon/opencms-core
src/org/opencms/acacia/shared/A_CmsSerialDateValue.java
A_CmsSerialDateValue.setIndividualDates
public final void setIndividualDates(SortedSet<Date> dates) { m_individualDates.clear(); if (null != dates) { m_individualDates.addAll(dates); } for (Date d : getExceptions()) { if (!m_individualDates.contains(d)) { m_exceptions.remove(d); } } }
java
public final void setIndividualDates(SortedSet<Date> dates) { m_individualDates.clear(); if (null != dates) { m_individualDates.addAll(dates); } for (Date d : getExceptions()) { if (!m_individualDates.contains(d)) { m_exceptions.remove(d); } } }
[ "public", "final", "void", "setIndividualDates", "(", "SortedSet", "<", "Date", ">", "dates", ")", "{", "m_individualDates", ".", "clear", "(", ")", ";", "if", "(", "null", "!=", "dates", ")", "{", "m_individualDates", ".", "addAll", "(", "dates", ")", ";", "}", "for", "(", "Date", "d", ":", "getExceptions", "(", ")", ")", "{", "if", "(", "!", "m_individualDates", ".", "contains", "(", "d", ")", ")", "{", "m_exceptions", ".", "remove", "(", "d", ")", ";", "}", "}", "}" ]
Set the individual dates where the event should take place. @param dates the dates to set.
[ "Set", "the", "individual", "dates", "where", "the", "event", "should", "take", "place", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/A_CmsSerialDateValue.java#L478-L490
158,390
alkacon/opencms-core
src/org/opencms/acacia/shared/A_CmsSerialDateValue.java
A_CmsSerialDateValue.setWeekDay
public final void setWeekDay(WeekDay weekDay) { SortedSet<WeekDay> wds = new TreeSet<>(); if (null != weekDay) { wds.add(weekDay); } setWeekDays(wds); }
java
public final void setWeekDay(WeekDay weekDay) { SortedSet<WeekDay> wds = new TreeSet<>(); if (null != weekDay) { wds.add(weekDay); } setWeekDays(wds); }
[ "public", "final", "void", "setWeekDay", "(", "WeekDay", "weekDay", ")", "{", "SortedSet", "<", "WeekDay", ">", "wds", "=", "new", "TreeSet", "<>", "(", ")", ";", "if", "(", "null", "!=", "weekDay", ")", "{", "wds", ".", "add", "(", "weekDay", ")", ";", "}", "setWeekDays", "(", "wds", ")", ";", "}" ]
Set the week day the events should occur. @param weekDay the week day to set.
[ "Set", "the", "week", "day", "the", "events", "should", "occur", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/A_CmsSerialDateValue.java#L566-L574
158,391
alkacon/opencms-core
src/org/opencms/acacia/shared/A_CmsSerialDateValue.java
A_CmsSerialDateValue.setWeekDays
public final void setWeekDays(SortedSet<WeekDay> weekDays) { m_weekDays.clear(); if (null != weekDays) { m_weekDays.addAll(weekDays); } }
java
public final void setWeekDays(SortedSet<WeekDay> weekDays) { m_weekDays.clear(); if (null != weekDays) { m_weekDays.addAll(weekDays); } }
[ "public", "final", "void", "setWeekDays", "(", "SortedSet", "<", "WeekDay", ">", "weekDays", ")", "{", "m_weekDays", ".", "clear", "(", ")", ";", "if", "(", "null", "!=", "weekDays", ")", "{", "m_weekDays", ".", "addAll", "(", "weekDays", ")", ";", "}", "}" ]
Set the week days the events should occur. @param weekDays the week days to set.
[ "Set", "the", "week", "days", "the", "events", "should", "occur", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/A_CmsSerialDateValue.java#L580-L586
158,392
alkacon/opencms-core
src/org/opencms/acacia/shared/A_CmsSerialDateValue.java
A_CmsSerialDateValue.setWeekOfMonth
public final void setWeekOfMonth(WeekOfMonth weekOfMonth) { SortedSet<WeekOfMonth> woms = new TreeSet<>(); if (null != weekOfMonth) { woms.add(weekOfMonth); } setWeeksOfMonth(woms); }
java
public final void setWeekOfMonth(WeekOfMonth weekOfMonth) { SortedSet<WeekOfMonth> woms = new TreeSet<>(); if (null != weekOfMonth) { woms.add(weekOfMonth); } setWeeksOfMonth(woms); }
[ "public", "final", "void", "setWeekOfMonth", "(", "WeekOfMonth", "weekOfMonth", ")", "{", "SortedSet", "<", "WeekOfMonth", ">", "woms", "=", "new", "TreeSet", "<>", "(", ")", ";", "if", "(", "null", "!=", "weekOfMonth", ")", "{", "woms", ".", "add", "(", "weekOfMonth", ")", ";", "}", "setWeeksOfMonth", "(", "woms", ")", ";", "}" ]
Set the week of the month the events should occur. @param weekOfMonth the week of month to set (first to fifth, where fifth means last).
[ "Set", "the", "week", "of", "the", "month", "the", "events", "should", "occur", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/A_CmsSerialDateValue.java#L592-L599
158,393
alkacon/opencms-core
src/org/opencms/acacia/shared/A_CmsSerialDateValue.java
A_CmsSerialDateValue.setWeeksOfMonth
public final void setWeeksOfMonth(SortedSet<WeekOfMonth> weeksOfMonth) { m_weeksOfMonth.clear(); if (null != weeksOfMonth) { m_weeksOfMonth.addAll(weeksOfMonth); } }
java
public final void setWeeksOfMonth(SortedSet<WeekOfMonth> weeksOfMonth) { m_weeksOfMonth.clear(); if (null != weeksOfMonth) { m_weeksOfMonth.addAll(weeksOfMonth); } }
[ "public", "final", "void", "setWeeksOfMonth", "(", "SortedSet", "<", "WeekOfMonth", ">", "weeksOfMonth", ")", "{", "m_weeksOfMonth", ".", "clear", "(", ")", ";", "if", "(", "null", "!=", "weeksOfMonth", ")", "{", "m_weeksOfMonth", ".", "addAll", "(", "weeksOfMonth", ")", ";", "}", "}" ]
Set the weeks of the month the events should occur. @param weeksOfMonth the weeks of month to set (first to fifth, where fifth means last).
[ "Set", "the", "weeks", "of", "the", "month", "the", "events", "should", "occur", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/A_CmsSerialDateValue.java#L605-L612
158,394
alkacon/opencms-core
src/org/opencms/acacia/shared/A_CmsSerialDateValue.java
A_CmsSerialDateValue.isDurationValid
protected final boolean isDurationValid() { if (isValidEndTypeForPattern()) { switch (getEndType()) { case DATE: return (getStart().getTime() < (getSeriesEndDate().getTime() + DAY_IN_MILLIS)); case TIMES: return getOccurrences() > 0; case SINGLE: return true; default: return false; } } else { return false; } }
java
protected final boolean isDurationValid() { if (isValidEndTypeForPattern()) { switch (getEndType()) { case DATE: return (getStart().getTime() < (getSeriesEndDate().getTime() + DAY_IN_MILLIS)); case TIMES: return getOccurrences() > 0; case SINGLE: return true; default: return false; } } else { return false; } }
[ "protected", "final", "boolean", "isDurationValid", "(", ")", "{", "if", "(", "isValidEndTypeForPattern", "(", ")", ")", "{", "switch", "(", "getEndType", "(", ")", ")", "{", "case", "DATE", ":", "return", "(", "getStart", "(", ")", ".", "getTime", "(", ")", "<", "(", "getSeriesEndDate", "(", ")", ".", "getTime", "(", ")", "+", "DAY_IN_MILLIS", ")", ")", ";", "case", "TIMES", ":", "return", "getOccurrences", "(", ")", ">", "0", ";", "case", "SINGLE", ":", "return", "true", ";", "default", ":", "return", "false", ";", "}", "}", "else", "{", "return", "false", ";", "}", "}" ]
Checks if the duration option is valid. NOTE: This does NOT check, if too many events are specified. @return a flag, indicating if the duration option is valid.
[ "Checks", "if", "the", "duration", "option", "is", "valid", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/A_CmsSerialDateValue.java#L640-L656
158,395
alkacon/opencms-core
src/org/opencms/acacia/shared/A_CmsSerialDateValue.java
A_CmsSerialDateValue.isPatternValid
protected final boolean isPatternValid() { switch (getPatternType()) { case DAILY: return isEveryWorkingDay() || isIntervalValid(); case WEEKLY: return isIntervalValid() && isWeekDaySet(); case MONTHLY: return isIntervalValid() && isWeekDaySet() ? isWeekOfMonthSet() : isDayOfMonthValid(); case YEARLY: return isMonthSet() && isWeekDaySet() ? isWeekOfMonthSet() : isDayOfMonthValid(); case INDIVIDUAL: case NONE: return true; default: return false; } }
java
protected final boolean isPatternValid() { switch (getPatternType()) { case DAILY: return isEveryWorkingDay() || isIntervalValid(); case WEEKLY: return isIntervalValid() && isWeekDaySet(); case MONTHLY: return isIntervalValid() && isWeekDaySet() ? isWeekOfMonthSet() : isDayOfMonthValid(); case YEARLY: return isMonthSet() && isWeekDaySet() ? isWeekOfMonthSet() : isDayOfMonthValid(); case INDIVIDUAL: case NONE: return true; default: return false; } }
[ "protected", "final", "boolean", "isPatternValid", "(", ")", "{", "switch", "(", "getPatternType", "(", ")", ")", "{", "case", "DAILY", ":", "return", "isEveryWorkingDay", "(", ")", "||", "isIntervalValid", "(", ")", ";", "case", "WEEKLY", ":", "return", "isIntervalValid", "(", ")", "&&", "isWeekDaySet", "(", ")", ";", "case", "MONTHLY", ":", "return", "isIntervalValid", "(", ")", "&&", "isWeekDaySet", "(", ")", "?", "isWeekOfMonthSet", "(", ")", ":", "isDayOfMonthValid", "(", ")", ";", "case", "YEARLY", ":", "return", "isMonthSet", "(", ")", "&&", "isWeekDaySet", "(", ")", "?", "isWeekOfMonthSet", "(", ")", ":", "isDayOfMonthValid", "(", ")", ";", "case", "INDIVIDUAL", ":", "case", "NONE", ":", "return", "true", ";", "default", ":", "return", "false", ";", "}", "}" ]
Checks, if all values necessary for a specific pattern are valid. @return a flag, indicating if all values required for the pattern are valid.
[ "Checks", "if", "all", "values", "necessary", "for", "a", "specific", "pattern", "are", "valid", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/A_CmsSerialDateValue.java#L689-L706
158,396
alkacon/opencms-core
src/org/opencms/acacia/shared/A_CmsSerialDateValue.java
A_CmsSerialDateValue.isValidEndTypeForPattern
protected final boolean isValidEndTypeForPattern() { if (getEndType() == null) { return false; } switch (getPatternType()) { case DAILY: case WEEKLY: case MONTHLY: case YEARLY: return (getEndType().equals(EndType.DATE) || getEndType().equals(EndType.TIMES)); case INDIVIDUAL: case NONE: return getEndType().equals(EndType.SINGLE); default: return false; } }
java
protected final boolean isValidEndTypeForPattern() { if (getEndType() == null) { return false; } switch (getPatternType()) { case DAILY: case WEEKLY: case MONTHLY: case YEARLY: return (getEndType().equals(EndType.DATE) || getEndType().equals(EndType.TIMES)); case INDIVIDUAL: case NONE: return getEndType().equals(EndType.SINGLE); default: return false; } }
[ "protected", "final", "boolean", "isValidEndTypeForPattern", "(", ")", "{", "if", "(", "getEndType", "(", ")", "==", "null", ")", "{", "return", "false", ";", "}", "switch", "(", "getPatternType", "(", ")", ")", "{", "case", "DAILY", ":", "case", "WEEKLY", ":", "case", "MONTHLY", ":", "case", "YEARLY", ":", "return", "(", "getEndType", "(", ")", ".", "equals", "(", "EndType", ".", "DATE", ")", "||", "getEndType", "(", ")", ".", "equals", "(", "EndType", ".", "TIMES", ")", ")", ";", "case", "INDIVIDUAL", ":", "case", "NONE", ":", "return", "getEndType", "(", ")", ".", "equals", "(", "EndType", ".", "SINGLE", ")", ";", "default", ":", "return", "false", ";", "}", "}" ]
Checks, if the end type is valid for the set pattern type. @return a flag, indicating if the end type is valid for the pattern type.
[ "Checks", "if", "the", "end", "type", "is", "valid", "for", "the", "set", "pattern", "type", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/A_CmsSerialDateValue.java#L721-L738
158,397
alkacon/opencms-core
src/org/opencms/acacia/shared/A_CmsSerialDateValue.java
A_CmsSerialDateValue.setDefaultValue
protected final void setDefaultValue() { m_start = null; m_end = null; m_patterntype = PatternType.NONE; m_dayOfMonth = 0; m_exceptions.clear(); m_individualDates.clear(); m_interval = 0; m_isEveryWorkingDay = false; m_isWholeDay = false; m_month = Month.JANUARY; m_seriesEndDate = null; m_seriesOccurrences = 0; m_weekDays.clear(); m_weeksOfMonth.clear(); m_endType = EndType.SINGLE; m_parentSeriesId = null; }
java
protected final void setDefaultValue() { m_start = null; m_end = null; m_patterntype = PatternType.NONE; m_dayOfMonth = 0; m_exceptions.clear(); m_individualDates.clear(); m_interval = 0; m_isEveryWorkingDay = false; m_isWholeDay = false; m_month = Month.JANUARY; m_seriesEndDate = null; m_seriesOccurrences = 0; m_weekDays.clear(); m_weeksOfMonth.clear(); m_endType = EndType.SINGLE; m_parentSeriesId = null; }
[ "protected", "final", "void", "setDefaultValue", "(", ")", "{", "m_start", "=", "null", ";", "m_end", "=", "null", ";", "m_patterntype", "=", "PatternType", ".", "NONE", ";", "m_dayOfMonth", "=", "0", ";", "m_exceptions", ".", "clear", "(", ")", ";", "m_individualDates", ".", "clear", "(", ")", ";", "m_interval", "=", "0", ";", "m_isEveryWorkingDay", "=", "false", ";", "m_isWholeDay", "=", "false", ";", "m_month", "=", "Month", ".", "JANUARY", ";", "m_seriesEndDate", "=", "null", ";", "m_seriesOccurrences", "=", "0", ";", "m_weekDays", ".", "clear", "(", ")", ";", "m_weeksOfMonth", ".", "clear", "(", ")", ";", "m_endType", "=", "EndType", ".", "SINGLE", ";", "m_parentSeriesId", "=", "null", ";", "}" ]
Sets the value to a default.
[ "Sets", "the", "value", "to", "a", "default", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/A_CmsSerialDateValue.java#L761-L779
158,398
alkacon/opencms-core
src/org/opencms/acacia/shared/A_CmsSerialDateValue.java
A_CmsSerialDateValue.setDerivedEndType
protected final void setDerivedEndType() { m_endType = getPatternType().equals(PatternType.NONE) || getPatternType().equals(PatternType.INDIVIDUAL) ? EndType.SINGLE : null != getSeriesEndDate() ? EndType.DATE : EndType.TIMES; }
java
protected final void setDerivedEndType() { m_endType = getPatternType().equals(PatternType.NONE) || getPatternType().equals(PatternType.INDIVIDUAL) ? EndType.SINGLE : null != getSeriesEndDate() ? EndType.DATE : EndType.TIMES; }
[ "protected", "final", "void", "setDerivedEndType", "(", ")", "{", "m_endType", "=", "getPatternType", "(", ")", ".", "equals", "(", "PatternType", ".", "NONE", ")", "||", "getPatternType", "(", ")", ".", "equals", "(", "PatternType", ".", "INDIVIDUAL", ")", "?", "EndType", ".", "SINGLE", ":", "null", "!=", "getSeriesEndDate", "(", ")", "?", "EndType", ".", "DATE", ":", "EndType", ".", "TIMES", ";", "}" ]
Set the end type as derived from other values.
[ "Set", "the", "end", "type", "as", "derived", "from", "other", "values", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/A_CmsSerialDateValue.java#L784-L789
158,399
alkacon/opencms-core
src/org/opencms/jsp/util/CmsFunctionRenderer.java
CmsFunctionRenderer.defaultHtml
public static String defaultHtml(HttpServletRequest request) { CmsObject cms = CmsFlexController.getController(request).getCmsObject(); // We only want the big red warning in Offline mode if (cms.getRequestContext().getCurrentProject().isOnlineProject()) { return "<div><!--Dynamic function not configured--></div>"; } else { Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(cms); String message = Messages.get().getBundle(locale).key(Messages.GUI_FUNCTION_DEFAULT_HTML_0); return "<div style=\"border: 2px solid red; padding: 10px;\">" + message + "</div>"; } }
java
public static String defaultHtml(HttpServletRequest request) { CmsObject cms = CmsFlexController.getController(request).getCmsObject(); // We only want the big red warning in Offline mode if (cms.getRequestContext().getCurrentProject().isOnlineProject()) { return "<div><!--Dynamic function not configured--></div>"; } else { Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(cms); String message = Messages.get().getBundle(locale).key(Messages.GUI_FUNCTION_DEFAULT_HTML_0); return "<div style=\"border: 2px solid red; padding: 10px;\">" + message + "</div>"; } }
[ "public", "static", "String", "defaultHtml", "(", "HttpServletRequest", "request", ")", "{", "CmsObject", "cms", "=", "CmsFlexController", ".", "getController", "(", "request", ")", ".", "getCmsObject", "(", ")", ";", "// We only want the big red warning in Offline mode", "if", "(", "cms", ".", "getRequestContext", "(", ")", ".", "getCurrentProject", "(", ")", ".", "isOnlineProject", "(", ")", ")", "{", "return", "\"<div><!--Dynamic function not configured--></div>\"", ";", "}", "else", "{", "Locale", "locale", "=", "OpenCms", ".", "getWorkplaceManager", "(", ")", ".", "getWorkplaceLocale", "(", "cms", ")", ";", "String", "message", "=", "Messages", ".", "get", "(", ")", ".", "getBundle", "(", "locale", ")", ".", "key", "(", "Messages", ".", "GUI_FUNCTION_DEFAULT_HTML_0", ")", ";", "return", "\"<div style=\\\"border: 2px solid red; padding: 10px;\\\">\"", "+", "message", "+", "\"</div>\"", ";", "}", "}" ]
Returns the default output for functions without configured JSPs. @param request the current request @return the default HTML output
[ "Returns", "the", "default", "output", "for", "functions", "without", "configured", "JSPs", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsFunctionRenderer.java#L117-L129