Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/com/celements/appScript/AppScriptService.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ public Optional<String> getAppRecursiveScript(String scriptName) {
return findAppScriptRecursivly(scriptName,
sn -> isAppScriptAvailable(sn + "++"),
sn -> sn.lastIndexOf("/") > 0)
.map(sNT -> sNT + "++")
.filter(sNT -> !Strings.isNullOrEmpty(sNT) && isAppScriptAvailable(sNT));
.map(sNT -> sNT + "++")
.filter(sNT -> !Strings.isNullOrEmpty(sNT) && isAppScriptAvailable(sNT));
}

private Optional<String> findAppScriptRecursivly(String scriptName,
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/celements/cells/classes/CellClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class CellClass extends AbstractClassDefinition

public static final ClassField<String> FIELD_EVENT_DATA_ATTR = new LargeStringField.Builder(
CLASS_REF, "event_data_attr").rows(20).size(15).prettyName("celEventJS data attribute")
.build();
.build();

public CellClass() {
super(CLASS_REF);
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/celements/cells/classes/GroupCellClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public class GroupCellClass extends AbstractClassDefinition

public static final ClassField<String> FIELD_RENDER_LAYOUT = new StringField.Builder(CLASS_REF,
"render_layout")
.prettyName("Render Layout")
.size(30)
.build();
.prettyName("Render Layout")
.size(30)
.build();

public GroupCellClass() {
super(CLASS_REF);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public class PageDepCellConfigClass extends AbstractClassDefinition

public static final ClassField<String> FIELD_SPACE_NAME = new StringField.Builder(CLASS_REF,
"space_name")
.prettyName("Space Name")
.size(30)
.build();
.prettyName("Space Name")
.size(30)
.build();

public static final ClassField<Boolean> FIELD_IS_ACTIVE = new BooleanField.Builder(CLASS_REF,
"is_inheritable")
.displayType("yesno")
.prettyName("is inheritable")
.build();
.displayType("yesno")
.prettyName("is inheritable")
.build();

public PageDepCellConfigClass() {
super(CLASS_REF);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,52 +32,52 @@ public class PageLayoutPropertiesClass extends AbstractClassDefinition

public static final ClassField<String> FIELD_PRETTYNAME = new StringField.Builder(CLASS_REF,
"prettyname")
.prettyName("Layout Pretty Name")
.size(30)
.build();
.prettyName("Layout Pretty Name")
.size(30)
.build();

public static final ClassField<Boolean> FIELD_IS_ACTIVE = new BooleanField.Builder(CLASS_REF,
"isActive")
.displayType("yesno")
.prettyName("is active")
.build();
.displayType("yesno")
.prettyName("is active")
.build();

public static final ClassField<String> FIELD_AUTHORS = new StringField.Builder(CLASS_REF,
"authors")
.prettyName("Authors")
.size(30)
.build();
.prettyName("Authors")
.size(30)
.build();

public static final ClassField<String> FIELD_LICENSE = new LargeStringField.Builder(CLASS_REF,
"license")
.rows(30)
.size(15)
.prettyName("License")
.build();
.rows(30)
.size(15)
.prettyName("License")
.build();

public static final ClassField<String> FIELD_VERSION = new StringField.Builder(CLASS_REF,
"version")
.prettyName("Version")
.size(30)
.build();
.prettyName("Version")
.size(30)
.build();

public static final ClassField<String> FIELD_LAYOUT_DOCTYPE = new StringSingleListField.Builder(
CLASS_REF, "doctype")
.size(1)
.displayType(DisplayType.select)
.values(ImmutableList.of(HtmlDoctype.XHTML.toString(), HtmlDoctype.HTML5.toString()))
.prettyName("Doctype")
/* .relationalStorage(true) */
.build();
.size(1)
.displayType(DisplayType.select)
.values(ImmutableList.of(HtmlDoctype.XHTML.toString(), HtmlDoctype.HTML5.toString()))
.prettyName("Doctype")
/* .relationalStorage(true) */
.build();

public static final ClassField<String> FIELD_LAYOUT_TYPE = new StringSingleListField.Builder(
CLASS_REF, "layout_type")
.size(1)
.displayType(DisplayType.select)
.values(ImmutableList.of(PAGE_LAYOUT_VALUE, EDITOR_LAYOUT_VALUE))
.prettyName("Layout Type")
/* .relationalStorage(true) */
.build();
.size(1)
.displayType(DisplayType.select)
.values(ImmutableList.of(PAGE_LAYOUT_VALUE, EDITOR_LAYOUT_VALUE))
.prettyName("Layout Type")
/* .relationalStorage(true) */
.build();

public PageLayoutPropertiesClass() {
super(CLASS_REF);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ public class TranslationBoxCellConfigClass extends AbstractClassDefinition

public static final ClassField<String> FIELD_PAGE_EXCEPTIONS = new StringField.Builder(CLASS_REF,
"page_exceptions")
.prettyName("Page Exceptions (FullNames comma separated)")
.size(30)
.build();
.prettyName("Page Exceptions (FullNames comma separated)")
.size(30)
.build();

public static final ClassField<String> FIELD_PAGETYPE_EXCEPTIONS = new StringField.Builder(
CLASS_REF, "pagetype_exceptions")
.prettyName("Page Type Exceptions (FullNames comma separated)")
.size(30)
.build();
.prettyName("Page Type Exceptions (FullNames comma separated)")
.size(30)
.build();

public TranslationBoxCellConfigClass() {
super(CLASS_REF);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@

public class ListUtils {

private ListUtils() {
}
private ListUtils() {}

/**
* Provides a type safe substract for Lists.
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/celements/docform/DocFormRequestKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
public class DocFormRequestKey implements Comparable<DocFormRequestKey> {

public enum Type {
DOC_FIELD, OBJ_FIELD, OBJ_REMOVE;
DOC_FIELD,
OBJ_FIELD,
OBJ_REMOVE;
}

private final String keyString;
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/celements/docform/IDocForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
public interface IDocForm {

public enum ResponseState {
successful, failed, unchanged;
successful,
failed,
unchanged;
}

IDocForm initialize(DocumentReference defaultDocRef, boolean isCreateAllowed);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/celements/form/classes/FormConfigClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public class FormConfigClass extends AbstractClassDefinition implements FormClas

public static final ClassField<String> FIELD_EXCLUDE_FORM_IS_FILLED = new StringField.Builder(
CLASS_REF, "excludeFromIsFilledCheck").size(30)
.prettyName("Exclude fields from 'isFilled' check. (separator: ',')")
.build();
.prettyName("Exclude fields from 'isFilled' check. (separator: ',')")
.build();

public FormConfigClass() {
super(CLASS_REF);
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/celements/inheritor/ContentInheritor.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ public class ContentInheritor {
private IEmptyDocumentChecker _emptyDocumentChecker;
private String _language;

public ContentInheritor() {
}
public ContentInheritor() {}

public void setIteratorFactory(IIteratorFactory<DocumentIterator> iteratorFactory) {
_iteratorFactory = iteratorFactory;
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/com/celements/iterator/DocumentIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ public class DocumentIterator implements Iterator<XWikiDocument>, Iterable<XWiki
/**
* Constructor
*/
public DocumentIterator() {
}
public DocumentIterator() {}

/**
* Constructor
Expand All @@ -60,8 +59,7 @@ public DocumentIterator() {
* @deprecated instead use DocumentIterator()
*/
@Deprecated
public DocumentIterator(XWikiContext context) {
}
public DocumentIterator(XWikiContext context) {}

/**
* Checks if iterator has a next object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

/**
* Resolves frontend resource paths based on the vite manifest file.
*
* The manifest file is generated by vite during the build process and contains mappings from source
* files to their corresponding production files with hashed names.
*
Expand Down Expand Up @@ -60,8 +59,9 @@ public void init() {

/**
* Resolves a source path to a production dist path.
* @param sourcePath e.g. ":frontend/file.ts"
*
* @param sourcePath
* e.g. ":frontend/file.ts"
* @return The resolved path e.g. "dist/file.a8b3.mjs"
*/
public Optional<String> resolve(String sourcePath) {
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/celements/javascript/JsLoadMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

public enum JsLoadMode {

SYNC, DEFER, ASYNC;
SYNC,
DEFER,
ASYNC;

}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class MenuBar_SubMenuItemsClassMigrator
IWebUtilsService webUtilsService;

private XWikiContext getContext() {
return (XWikiContext)execution.getContext().getProperty("xwikicontext");
return (XWikiContext) execution.getContext().getProperty("xwikicontext");
}

@Override
Expand All @@ -73,12 +73,13 @@ private MenuClasses getMenuClasses() {
}

@Override
public void migrate(SubSystemHibernateMigrationManager manager, XWikiContext context
) throws XWikiException {
public void migrate(SubSystemHibernateMigrationManager manager, XWikiContext context)
throws XWikiException {
getMenuClasses().runUpdate(getContext());
List<String> result = context.getWiki().search(
"select distinct o.name from BaseObject o"
+ " where o.className = 'Celements2.MenuBarSubItem'", context);
+ " where o.className = 'Celements2.MenuBarSubItem'",
context);
LOGGER.info("found [" + ((result != null) ? result.size() : result)
+ "] documents to migrate.");
for (Object fullName : result) {
Expand All @@ -97,8 +98,7 @@ public void migrate(SubSystemHibernateMigrationManager manager, XWikiContext con
}
}

private void migrateSubItem(BaseObject oldSubItemObj, XWikiDocument doc
) throws XWikiException {
private void migrateSubItem(BaseObject oldSubItemObj, XWikiDocument doc) throws XWikiException {
BaseObject newSubItemObj = doc.newXObject(menuService.getMenuBarSubItemClassRef(),
getContext());
newSubItemObj.setStringValue("name", oldSubItemObj.getStringValue("name"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ EntityReference getRelativeParentReference(String parentFN) {
}

@Override
public void migrate(SubSystemHibernateMigrationManager manager, XWikiContext context
) throws XWikiException {
public void migrate(SubSystemHibernateMigrationManager manager, XWikiContext context)
throws XWikiException {
Query theQuery;
try {
theQuery = queryManager.createQuery("from doc.object(Celements2.MenuItem) as mItem"
Expand All @@ -87,7 +87,8 @@ public void migrate(SubSystemHibernateMigrationManager manager, XWikiContext con
exp);
throw new XWikiException(XWikiException.MODULE_XWIKI_APP,
XWikiException.MODULE_XWIKI, "Failed to execute migration"
+ " TreeNodeRelativeParent_Database", exp);
+ " TreeNodeRelativeParent_Database",
exp);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.celements.sajson.IGenericLiteral;

public enum EReorderLiteral implements IGenericLiteral {

ELEMENT_ID(ECommand.VALUE_COMMAND),
ELEM_IDS_ARRAY(ECommand.ARRAY_COMMAND, ELEMENT_ID),
PARENT_CHILDREN_PROPERTY(ECommand.PROPERTY_COMMAND, ELEM_IDS_ARRAY),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

public class MenuItemsUtils {

private MenuItemsUtils() {
}
private MenuItemsUtils() {}

public static EntityReference resolveParentRef(@NotNull String parentFN) {
return (parentFN.isEmpty()) ? null : Utils.getComponent(ModelUtils.class).resolveRef(parentFN);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public String getMenuPart() {
@Deprecated
public boolean includeMenuItem(BaseObject baseObj, XWikiContext context) {
return getRightsAccess().hasAccessLevel(baseObj.getDocumentReference(), EAccessLevel.VIEW,
context.getXWikiUser()) && (getMenuPart().isEmpty() || getMenuPart().equals(
context.getXWikiUser())
&& (getMenuPart().isEmpty() || getMenuPart().equals(
baseObj.getStringValue("part_name")));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
public class TreeNodeDocumentCreatedListener extends AbstractTreeNodeDocumentListener implements
EventListener {

private static final Logger LOGGER = LoggerFactory.getLogger(TreeNodeDocumentCreatedListener.class);
private static final Logger LOGGER = LoggerFactory
.getLogger(TreeNodeDocumentCreatedListener.class);

@Requirement
private IWebUtilsService webUtilsService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
public class TreeNodeDocumentDeletedListener extends AbstractTreeNodeDocumentListener implements
EventListener {

private static final Logger LOGGER = LoggerFactory.getLogger(TreeNodeDocumentDeletedListener.class);
private static final Logger LOGGER = LoggerFactory
.getLogger(TreeNodeDocumentDeletedListener.class);

@Requirement
private IWebUtilsService webUtilsService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
public class TreeNodeDocumentUpdatedListener extends AbstractTreeNodeDocumentListener implements
EventListener {

private static final Logger LOGGER = LoggerFactory.getLogger(TreeNodeDocumentUpdatedListener.class);
private static final Logger LOGGER = LoggerFactory
.getLogger(TreeNodeDocumentUpdatedListener.class);

@Requirement
private IWebUtilsService webUtilsService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.celements.navigation.presentation;


public interface PresentationNodeData {

}
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ private String getDocExtract(DocumentReference docRef) throws XWikiException {
if (extractObj == null) {
extractObj = contentDoc.getXObject(documentExtractClassRef,
DocumentDetailsClasses.FIELD_DOC_EXTRACT_LANGUAGE, webUtilsService.getDefaultLanguage(
docRef.getLastSpaceReference()), false);
docRef.getLastSpaceReference()),
false);
}
if (extractObj != null) {
return extractObj.getStringValue(DocumentDetailsClasses.FIELD_DOC_EXTRACT_CONTENT);
Expand Down
Loading