- * @param
+ * @param The subtype of folder tree node.
+ * @param The type of the permissions model to use.
*/
-public class FolderTreeNode {
+public class FolderTreeNode, P extends PermissionsModel> {
+ /**
+ * The ID of the folder.
+ */
private long folderId;
+ /**
+ * The UUID of the folder.
+ */
private String uuid;
+ /**
+ * The name of the folder.
+ */
private String name;
+ /**
+ * The path of the folder.
+ */
private String path;
+ /**
+ * The subfolders of the folder.
+ */
private List subFolders;
+ /**
+ * Should the folder open (sub folder are visible) in the view.
+ */
private boolean open;
+ /**
+ * Is the folder the currently selected folder?
+ */
private boolean selected;
+ /**
+ * Permissions of the current user for the folder.
+ */
private P permissions;
public long getFolderId() {
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/GrantedAssetPrivileges.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/GrantedAssetPrivileges.java
index 44365903a..9d6d7218d 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/GrantedAssetPrivileges.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/GrantedAssetPrivileges.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
@@ -10,7 +23,8 @@ import org.librecms.contentsection.privileges.AssetPrivileges;
import javax.enterprise.context.Dependent;
/**
- *
+ * Implementation of {@link AbstractGrantedPrivileges} for {@link Asset}s.
+ *
* @author Jens Pelzetter
*/
@Dependent
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/GrantedItemPrivileges.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/GrantedItemPrivileges.java
index 7ce48b604..8937871fa 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/GrantedItemPrivileges.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/GrantedItemPrivileges.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
@@ -10,6 +23,7 @@ import org.librecms.contentsection.privileges.ItemPrivileges;
import javax.enterprise.context.Dependent;
/**
+ * Implemention of {@link AbstractGrantedPrivileges} for content items.
*
* @author Jens Pelzetter
*/
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/GrantedPrivilegeModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/GrantedPrivilegeModel.java
index d56e1686e..5919a5666 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/GrantedPrivilegeModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/GrantedPrivilegeModel.java
@@ -1,20 +1,43 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
/**
- *
+ * Model for displaying the privileges granted to a user or a role.
+ *
* @author Jens Pelzetter
*/
public class GrantedPrivilegeModel {
+ /**
+ * The privilege.
+ */
private String privilege;
+ /**
+ * Is the privilege granted?
+ */
private boolean granted;
+ /**
+ * The the permission granting the privilege inherited from another object?
+ */
private boolean inherited;
public String getPrivilege() {
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/ItemPermissionChecker.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/ItemPermissionChecker.java
index d68d480c2..0995804b7 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/ItemPermissionChecker.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/ItemPermissionChecker.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
@@ -15,33 +28,72 @@ import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
/**
+ * Used to check permissions on {@link ContentItem}s for the current user.
*
* @author Jens Pelzetter
*/
@RequestScoped
public class ItemPermissionChecker {
+ /**
+ * The {@link PermissionChecker} instance used to perform the permission
+ * checks.
+ */
@Inject
private PermissionChecker permissionChecker;
+ /**
+ * Can the current user administer the provided content item?
+ *
+ * @param item The content item.
+ *
+ * @return {@code true} if the current user can administer the item,
+ * {@code false} otherwise.
+ */
public boolean canAdministerItems(final ContentItem item) {
return permissionChecker.isPermitted(
ItemPrivileges.ADMINISTER, item
);
}
+ /**
+ * Can the current user administer the content items in the provided content
+ * section?
+ *
+ * @param section The content section
+ *
+ * @return {@code true} if the current user can administer items of the
+ * content section, {@code false} otherwise.
+ */
public boolean canAdministerItems(final ContentSection section) {
return permissionChecker.isPermitted(
ItemPrivileges.ADMINISTER, section.getRootDocumentsFolder()
);
}
+ /**
+ * Can the current user administer the content items in the provided folder?
+ *
+ * @param folder The folder.
+ *
+ * @return {@code true} if the current user can administer items of the
+ * folder, {@code false} otherwise.
+ */
public boolean canAdministerItems(final Folder folder) {
return permissionChecker.isPermitted(
ItemPrivileges.ADMINISTER, folder
);
}
+ /**
+ * Can the current user apply alternate workflows to the content items in
+ * the provided content section?
+ *
+ * @param section The content section
+ *
+ * @return {@code true} if the current user can apply alternate workflows to
+ * the items of the content section, {@code false} otherwise.
+ */
public boolean canApplyAlternateWorkflowItems(
final ContentSection section
) {
@@ -51,6 +103,15 @@ public class ItemPermissionChecker {
);
}
+ /**
+ * Can the current user apply alternate workflows to the provided content
+ * item?
+ *
+ * @param item The content item.
+ *
+ * @return {@code true} if the current user can apply alternate workflows to
+ * the item, {@code false} otherwise.
+ */
public boolean canApplyAlternateWorkflowItems(
final ContentItem item
) {
@@ -59,6 +120,15 @@ public class ItemPermissionChecker {
);
}
+ /**
+ * Can the current user apply alternate workflow to the content items in the
+ * provided folder?
+ *
+ * @param folder The folder.
+ *
+ * @return {@code true} if the current user can apply alternate workflows to
+ * the items of the folder, {@code false} otherwise.
+ */
public boolean canApplyAlternateWorkflowItems(
final Folder folder
) {
@@ -67,144 +137,332 @@ public class ItemPermissionChecker {
);
}
+ /**
+ * Can the current user approve the provided content item?
+ *
+ * @param item The content item.
+ *
+ * @return {@code true} if the current user can approve the item,
+ * {@code false} otherwise.
+ */
public boolean canApproveItems(final ContentItem item) {
return permissionChecker.isPermitted(
ItemPrivileges.APPROVE, item
);
}
+ /**
+ * Can the current user approve the content items in the provided content
+ * section?
+ *
+ * @param section The content section
+ *
+ * @return {@code true} if the current user can approve items of the content
+ * section, {@code false} otherwise.
+ */
public boolean canApproveItems(final ContentSection section) {
return permissionChecker.isPermitted(
ItemPrivileges.APPROVE, section.getRootDocumentsFolder()
);
}
+ /**
+ * Can the current user approve the content items in the provided folder?
+ *
+ * @param folder The folder.
+ *
+ * @return {@code true} if the current user can approve items of the folder,
+ * {@code false} otherwise.
+ */
public boolean canApproveItems(final Folder folder) {
return permissionChecker.isPermitted(
ItemPrivileges.APPROVE, folder
);
}
+ /**
+ * Can the current user categorize the provided content item?
+ *
+ * @param item The content item.
+ *
+ * @return {@code true} if the current user can categorize the item,
+ * {@code false} otherwise.
+ */
public boolean canCategorizeItems(final ContentItem item) {
return permissionChecker.isPermitted(
ItemPrivileges.CATEGORIZE, item
);
}
+ /**
+ * Can the current user categorize the content items in the provided content
+ * section?
+ *
+ * @param section The content section
+ *
+ * @return {@code true} if the current user can categorize items of the
+ * content section, {@code false} otherwise.
+ */
public boolean canCategorizeItems(final ContentSection section) {
return permissionChecker.isPermitted(
ItemPrivileges.CATEGORIZE, section.getRootDocumentsFolder()
);
}
+ /**
+ * Can the current user categorize the content items in the provided folder?
+ *
+ * @param folder The folder.
+ *
+ * @return {@code true} if the current user can categorize items of the
+ * folder, {@code false} otherwise.
+ */
public boolean canCategorizeItems(final Folder folder) {
return permissionChecker.isPermitted(
ItemPrivileges.CATEGORIZE, folder
);
}
- public boolean canCreateNewItems(final ContentItem item) {
- return permissionChecker.isPermitted(
- ItemPrivileges.CREATE_NEW, item
- );
- }
-
+ /**
+ * Can the current user create new content items in the provided content
+ * section?
+ *
+ * @param section The content section
+ *
+ * @return {@code true} if the current user can create new items in the
+ * content section, {@code false} otherwise.
+ */
public boolean canCreateNewItems(final ContentSection section) {
return permissionChecker.isPermitted(
ItemPrivileges.CREATE_NEW, section.getRootDocumentsFolder()
);
}
+ /**
+ * Can the current user create new content items in the provided folder?
+ *
+ * @param folder The folder.
+ *
+ * @return {@code true} if the current user can create new items in the
+ * folder, {@code false} otherwise.
+ */
public boolean canCreateNewItems(final Folder folder) {
return permissionChecker.isPermitted(
ItemPrivileges.CREATE_NEW, folder
);
}
+ /**
+ * Can the current user delete the provided content item?
+ *
+ * @param item The content item.
+ *
+ * @return {@code true} if the current user can delete the item,
+ * {@code false} otherwise.
+ */
public boolean canDeleteItems(final ContentItem item) {
return permissionChecker.isPermitted(
ItemPrivileges.DELETE, item
);
}
+ /**
+ * Can the current user delete content items in the provided content
+ * section?
+ *
+ * @param section The content section
+ *
+ * @return {@code true} if the current user can delete items in the content
+ * section, {@code false} otherwise.
+ */
public boolean canDeleteItems(final ContentSection section) {
return permissionChecker.isPermitted(
ItemPrivileges.DELETE, section.getRootDocumentsFolder()
);
}
+ /**
+ * Can the current user delete the content items in the provided folder?
+ *
+ * @param folder The folder.
+ *
+ * @return {@code true} if the current user can delete items in the folder,
+ * {@code false} otherwise.
+ */
public boolean canDeleteItems(final Folder folder) {
return permissionChecker.isPermitted(
ItemPrivileges.DELETE, folder
);
}
+ /**
+ * Can the current user edit the provided content item?
+ *
+ * @param item The content item.
+ *
+ * @return {@code true} if the current user can edit the item, {@code false}
+ * otherwise.
+ */
public boolean canEditItems(final ContentItem item) {
return permissionChecker.isPermitted(
ItemPrivileges.EDIT, item
);
}
+ /**
+ * Can the current user edit the content items in the provided content
+ * section?
+ *
+ * @param section The content section
+ *
+ * @return {@code true} if the current user can edit items of the content
+ * section, {@code false} otherwise.
+ */
public boolean canEditItems(final ContentSection section) {
return permissionChecker.isPermitted(
ItemPrivileges.EDIT, section.getRootDocumentsFolder()
);
}
+ /**
+ * Can the current user edit the content items in the provided folder?
+ *
+ * @param folder The folder.
+ *
+ * @return {@code true} if the current user can administer edit items in the
+ * folder, {@code false} otherwise.
+ */
public boolean canEditItems(final Folder folder) {
return permissionChecker.isPermitted(
ItemPrivileges.EDIT, folder
);
}
+ /**
+ * Can the current user preview the provided content item?
+ *
+ * @param item The content item.
+ *
+ * @return {@code true} if the current user can preview the item,
+ * {@code false} otherwise.
+ */
public boolean canPreviewItems(final ContentItem item) {
return permissionChecker.isPermitted(
ItemPrivileges.PREVIEW, item
);
}
+ /**
+ * Can the current user preview the content items in the provided content
+ * section?
+ *
+ * @param section The content section
+ *
+ * @return {@code true} if the current user can preview items of the content
+ * section, {@code false} otherwise.
+ */
public boolean canPreviewItems(final ContentSection section) {
return permissionChecker.isPermitted(
ItemPrivileges.PREVIEW, section.getRootDocumentsFolder()
);
}
+ /**
+ * Can the current user preview the content items in the provided folder?
+ *
+ * @param folder The folder.
+ *
+ * @return {@code true} if the current user can preview items in the folder,
+ * {@code false} otherwise.
+ */
public boolean canPreviewItems(final Folder folder) {
return permissionChecker.isPermitted(
ItemPrivileges.PREVIEW, folder
);
}
+ /**
+ * Can the current user publish the provided content item?
+ *
+ * @param item The content item.
+ *
+ * @return {@code true} if the current user can publish the item,
+ * {@code false} otherwise.
+ */
public boolean canPublishItems(final ContentItem item) {
return permissionChecker.isPermitted(
ItemPrivileges.PUBLISH, item
);
}
+ /**
+ * Can the current user publish the content items in the provided content
+ * section?
+ *
+ * @param section The content section
+ *
+ * @return {@code true} if the current user can publish items of the content
+ * section, {@code false} otherwise.
+ */
public boolean canPublishItems(final ContentSection section) {
return permissionChecker.isPermitted(
ItemPrivileges.PUBLISH, section.getRootDocumentsFolder()
);
}
+ /**
+ * Can the current user publish the content items in the provided folder?
+ *
+ * @param folder The folder.
+ *
+ * @return {@code true} if the current user can publish items in the folder,
+ * {@code false} otherwise.
+ */
public boolean canPublishItems(final Folder folder) {
return permissionChecker.isPermitted(
ItemPrivileges.PUBLISH, folder
);
}
+ /**
+ * Can the current user view the published version the provided content
+ * item?
+ *
+ * @param item The content item.
+ *
+ * @return {@code true} if the current user can view the published of the
+ * item, {@code false} otherwise.
+ */
public boolean canViewPublishedItems(final ContentItem item) {
return permissionChecker.isPermitted(
ItemPrivileges.VIEW_PUBLISHED, item
);
}
+ /**
+ * Can the current user view publish content items of the provided content
+ * section?
+ *
+ * @param section The content section
+ *
+ * @return {@code true} if the current user can view publish items of the
+ * content section, {@code false} otherwise.
+ */
public boolean canViewPublishedItems(final ContentSection section) {
return permissionChecker.isPermitted(
ItemPrivileges.VIEW_PUBLISHED, section.getRootDocumentsFolder()
);
}
+ /**
+ * Can the current user view the published version of content items in the
+ * provided folder?
+ *
+ * @param folder The folder.
+ *
+ * @return {@code true} if the current user can view the published version
+ * of items in the folder, {@code false} otherwise.
+ */
public boolean canViewPublishedItems(final Folder folder) {
return permissionChecker.isPermitted(
ItemPrivileges.VIEW_PUBLISHED, folder
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/LifecycleDefinitionListModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/LifecycleDefinitionListModel.java
index 70c281ab3..08850d175 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/LifecycleDefinitionListModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/LifecycleDefinitionListModel.java
@@ -1,22 +1,55 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
+import org.libreccm.l10n.GlobalizationHelper;
+import org.librecms.lifecycle.LifecycleDefinition;
+
/**
+ * Model for the entries in a list of {@link LifecycleDefinition}s.
*
* @author Jens Pelzetter
*/
public class LifecycleDefinitionListModel {
+ /**
+ * The ID of the lifecycle definition.
+ */
private long definitionId;
+ /**
+ * The UUID of the lifecycle definition.
+ */
private String uuid;
+ /**
+ * The label of the lifecycle definition. This value is determined from
+ * {@link LifecycleDefinition#label} using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
+ * }.
+ */
private String label;
+ /**
+ * The description of the lifecycle definition. This value is determined
+ * from {@link LifecycleDefinition#description} using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
+ * }.
+ */
private String description;
public long getDefinitionId() {
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/PermissionsModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/PermissionsModel.java
index a126491fa..23355dee0 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/PermissionsModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/PermissionsModel.java
@@ -1,14 +1,29 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
/**
+ * Used as super interface for {@link AssetPermissionsModel} and
+ * {@link DocumentPermissionsModel} so that both can be used in the same place.
*
* @author Jens Pelzetter
*/
public interface PermissionsModel {
-
+
}
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/PhaseDefinitionModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/PhaseDefinitionModel.java
index 7e47f7bb1..d6c1bec80 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/PhaseDefinitionModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/PhaseDefinitionModel.java
@@ -1,24 +1,60 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
+import org.libreccm.l10n.GlobalizationHelper;
+import org.librecms.lifecycle.PhaseDefinition;
+
/**
+ * Model for displaying a {@link PhaseDefinition}.
*
* @author Jens Pelzetter
*/
public class PhaseDefinitionModel {
+ /**
+ * The ID of the definition.
+ */
private long definitionId;
-
+
+ /**
+ * The label of the definition. This value is determined from
+ * {@link PhaseDefinition#label} using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
+ * }.
+ */
private String label;
+ /**
+ * The description of the definition. This value is determined from
+ * {@link PhaseDefinition#description} using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
+ * }.
+ */
private String description;
+ /**
+ * The default delay of the phase.
+ */
private Duration defaultDelay;
+ /**
+ * The default duration of the phase.
+ */
private Duration defaultDuration;
public long getDefinitionId() {
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/PrivilegesGrantedToRoleModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/PrivilegesGrantedToRoleModel.java
index ea65946cd..4a4553927 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/PrivilegesGrantedToRoleModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/PrivilegesGrantedToRoleModel.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
@@ -10,13 +23,20 @@ import java.util.List;
/**
- *
+ * Model for displaying the privileges granted to a role.
+ *
* @author Jens Pelzetter
*/
public class PrivilegesGrantedToRoleModel {
+ /**
+ * The name of the role.
+ */
private String grantee;
+ /**
+ * The privileges granted to the role.
+ */
private List grantedPrivileges;
public String getGrantee() {
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/RetrieveResult.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/RetrieveResult.java
index ad5b722bf..b526368ed 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/RetrieveResult.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/RetrieveResult.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/RoleListItemModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/RoleListItemModel.java
index c7739d6a3..cea96b647 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/RoleListItemModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/RoleListItemModel.java
@@ -1,22 +1,53 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
+import org.libreccm.l10n.GlobalizationHelper;
+import org.libreccm.security.Role;
+
/**
+ * Model for a list of roles assigned to a content section.
*
* @author Jens Pelzetter
*/
public class RoleListItemModel {
+ /**
+ * The ID of the role.
+ */
private long roleId;
+ /**
+ * The UUID of the role.
+ */
private String uuid;
+ /**
+ * The name of the role.
+ */
private String name;
+ /**
+ * The description of the role. This value is determined from
+ * {@link Role#description} using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
+ * },
+ */
private String description;
public long getRoleId() {
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/RoleMembershipModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/RoleMembershipModel.java
index a3b148e9d..4de7acbea 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/RoleMembershipModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/RoleMembershipModel.java
@@ -1,18 +1,39 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
/**
+ *
+ * Model for the members of a role.
*
* @author Jens Pelzetter
*/
public class RoleMembershipModel {
+ /**
+ * The name of the member.
+ */
private String memberName;
+ /**
+ * The UUID of the member.
+ */
private String memberUuid;
public String getMemberName() {
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/RoleSectionPermissionModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/RoleSectionPermissionModel.java
index 89b7d89c4..c007ba521 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/RoleSectionPermissionModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/RoleSectionPermissionModel.java
@@ -1,18 +1,40 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
+import org.librecms.contentsection.ContentSection;
+
/**
- *
+ * Model for the permissions table of a {@link ContentSection}.
+ *
* @author Jens Pelzetter
*/
public class RoleSectionPermissionModel {
+ /**
+ * The privilege.
+ */
private String privilege;
+ /**
+ * If the privilege granted?
+ */
private boolean granted;
public String getPrivilege() {
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedLifecycleDefinitionModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedLifecycleDefinitionModel.java
index a824df44a..19c2eb435 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedLifecycleDefinitionModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedLifecycleDefinitionModel.java
@@ -1,10 +1,27 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
+import org.libreccm.l10n.GlobalizationHelper;
+import org.librecms.lifecycle.LifecycleDefinition;
+import org.librecms.lifecycle.PhaseDefinition;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -15,6 +32,7 @@ import javax.enterprise.context.RequestScoped;
import javax.inject.Named;
/**
+ * Model for the details view of {@link LifecycleDefinition}s.
*
* @author Jens Pelzetter
*/
@@ -22,20 +40,43 @@ import javax.inject.Named;
@Named("SelectedLifecycleDefinitionModel")
public class SelectedLifecycleDefinitionModel {
+ /**
+ * The UUID of the lifecycle definition.
+ */
private String uuid;
+ /**
+ * The display label of the lifecycle definition. This value determined from
+ * {@link LifecycleDefinition#label} using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
+ * }.
+ */
private String displayLabel;
+ /**
+ * The localized labels of the lifecycle definition.
+ */
private Map label;
+ /**
+ * The locales for which no localized label has been defined yet.
+ */
private List unusedLabelLocales;
+ /**
+ * The localized descriptions of the lifecycle definition.
+ */
private Map description;
-
- private List phaseDefinitions;
+ /**
+ * The locales for which no localized description has been defined yet.
+ */
private List unusedDescriptionLocales;
+ /**
+ * The {@link PhaseDefinition}s of the {@link LifecycleDefinition}.
+ */
+ private List phaseDefinitions;
+
public Map getLabel() {
return Collections.unmodifiableMap(label);
}
@@ -89,7 +130,7 @@ public class SelectedLifecycleDefinitionModel {
public boolean getHasUnusedLabelLocales() {
return !unusedLabelLocales.isEmpty();
}
-
+
public List getUnusedDescriptionLocales() {
return Collections.unmodifiableList(unusedDescriptionLocales);
}
@@ -100,7 +141,7 @@ public class SelectedLifecycleDefinitionModel {
this.unusedDescriptionLocales
= new ArrayList<>(unusedDescriptionLocales);
}
-
+
public boolean getHasUnusedDescriptionLocales() {
return !unusedDescriptionLocales.isEmpty();
}
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedPhaseDefinitionModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedPhaseDefinitionModel.java
index a25fece65..cd2c1fab0 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedPhaseDefinitionModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedPhaseDefinitionModel.java
@@ -1,10 +1,27 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
+import org.libreccm.l10n.GlobalizationHelper;
+import org.librecms.lifecycle.LifecycleDefinition;
+import org.librecms.lifecycle.PhaseDefinition;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -15,6 +32,8 @@ import javax.enterprise.context.RequestScoped;
import javax.inject.Named;
/**
+ * Model for the details view of a {@link PhaseDefinition} of a
+ * {@link LifecycleDefinition}.
*
* @author Jens Pelzetter
*/
@@ -22,20 +41,46 @@ import javax.inject.Named;
@Named("SelectedPhaseDefinitionModel")
public class SelectedPhaseDefinitionModel {
+ /**
+ * The ID of the phase definition.
+ */
private long definitionId;
-
+
+ /**
+ * The localized labels of the phase definition.
+ */
private Map label;
-
+
+ /**
+ * The display label for the phase definition. This value is determined from
+ * {@link PhaseDefinition#label} using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
+ * }.
+ */
private String displayLabel;
+ /**
+ * Locales for which no localized label has been defined yet.
+ */
private List unusedLabelLocales;
+ /**
+ * The localized descriptions of the phase definition.
+ */
private Map description;
+ /**
+ * Locales for which no localized description has been defined yet.
+ */
private List unusedDescriptionLocales;
+ /**
+ * The default delay of the phase definition.
+ */
private Duration defaultDelay;
+ /**
+ * The default duration of the phase definition.
+ */
private Duration defaultDuration;
public long getDefinitionId() {
@@ -93,13 +138,14 @@ public class SelectedPhaseDefinitionModel {
public void setUnusedDescriptionLocales(
final List unusedDescriptionLocales
) {
- this.unusedDescriptionLocales = new ArrayList<>(unusedDescriptionLocales);
+ this.unusedDescriptionLocales
+ = new ArrayList<>(unusedDescriptionLocales);
}
-
+
public boolean getHasUnusedLabelLocales() {
return !unusedLabelLocales.isEmpty();
}
-
+
public boolean getHasUnusedDescriptionLocales() {
return !unusedDescriptionLocales.isEmpty();
}
@@ -112,5 +158,4 @@ public class SelectedPhaseDefinitionModel {
this.displayLabel = displayLabel;
}
-
}
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedRoleModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedRoleModel.java
index 0f0e4e9b0..1214a2e37 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedRoleModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedRoleModel.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
@@ -21,6 +34,7 @@ import javax.inject.Inject;
import javax.inject.Named;
/**
+ * Model for details view of a role providing the data of the selected role.
*
* @author Jens Pelzetter
*/
@@ -28,17 +42,38 @@ import javax.inject.Named;
@Named("SelectedRoleModel")
public class SelectedRoleModel {
+ /**
+ * Party repository for retrieving parties.
+ */
@Inject
private PartyRepository partyRepository;
+ /**
+ * The name of the role.
+ */
private String name;
+ /**
+ * The localized descriptions of the role.
+ */
private Map description;
+ /**
+ * Locales for which not localized description has been defined yet.
+ */
private List unusedDescriptionLocales;
+ /**
+ * The members of the role.
+ */
private List members;
+ /**
+ * Builds {@link RolePartyFormEntry} objects for all parties. They are used
+ * to create the form for adding members and removing members from the role.
+ *
+ * @return A list of {@link RolePartyFormEntry} objects for all parties.
+ */
public List getRolePartyFormEnties() {
return partyRepository
.findAll()
@@ -100,6 +135,14 @@ public class SelectedRoleModel {
return !unusedDescriptionLocales.isEmpty();
}
+ /**
+ * Helper method for building a {@link RolePartyFormEntry} for the a
+ * {@link Party}.
+ *
+ * @param party The party.
+ *
+ * @return A {@link RolePartyFormEntry} for the {@code party}.
+ */
private RolePartyFormEntry buildRolePartyFormEntry(final Party party) {
final RolePartyFormEntry entry = new RolePartyFormEntry();
entry.setPartyId(party.getPartyId());
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedWorkflowTaskTemplateModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedWorkflowTaskTemplateModel.java
index 74a601ce0..4c64d83c8 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedWorkflowTaskTemplateModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedWorkflowTaskTemplateModel.java
@@ -1,10 +1,28 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
+import org.libreccm.l10n.GlobalizationHelper;
+import org.libreccm.workflow.AssignableTask;
+import org.libreccm.workflow.Task;
+import org.libreccm.workflow.Workflow;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -15,6 +33,13 @@ import javax.enterprise.context.RequestScoped;
import javax.inject.Named;
/**
+ * Model providing the data of the selected task of a workflow template for the
+ * details view of a task.
+ *
+ * @see ConfigurationWorkflowController
+ * @see Workflow
+ * @see Task
+ * @see AssignableTask
*
* @author Jens Pelzetter
*/
@@ -22,24 +47,56 @@ import javax.inject.Named;
@Named("SelectedWorkflowTaskTemplateModel")
public class SelectedWorkflowTaskTemplateModel {
+ /**
+ * The ID of the task.
+ */
private long taskId;
+ /**
+ * The UUID of the task.
+ */
private String uuid;
+ /**
+ * The display label of the task. This value is determined from
+ * {@link Task#label} using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
+ * }.
+ */
private String displayLabel;
+ /**
+ * The localized labels of the task.
+ */
private Map label;
+ /**
+ * The locales for which no localized label has been defined yet.
+ */
private List unusedLabelLocales;
+ /**
+ * The localized descriptions of the task.
+ */
private Map description;
+ /**
+ * The locales for which no localized description has been defined yet.
+ */
private List unusedDescriptionLocales;
+ /**
+ * Tasks that block the selected task.
+ */
private List blockedTasks;
+ /**
+ * Task that are blocked by the selected tak.
+ */
private List blockingTasks;
+ /**
+ * Ohter that don't block the selected task.
+ */
private Map noneBlockingTasks;
public long getTaskId() {
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedWorkflowTemplateModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedWorkflowTemplateModel.java
index 17c33b161..9c5125139 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedWorkflowTemplateModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/SelectedWorkflowTemplateModel.java
@@ -1,10 +1,25 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
+import org.libreccm.workflow.Workflow;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -15,6 +30,11 @@ import javax.enterprise.context.RequestScoped;
import javax.inject.Named;
/**
+ * Model providing the data about the selected workflow template for the
+ * workflow details view.
+ *
+ * @see ConfigurationWorkflowController
+ * @see Workflow
*
* @author Jens Pelzetter
*/
@@ -22,20 +42,44 @@ import javax.inject.Named;
@Named("SelectedWorkflowTemplateModel")
public class SelectedWorkflowTemplateModel {
+ /**
+ * The ID of the selected workflow template.
+ */
private long workflowId;
+ /**
+ * The UUID of the selected workflow template.
+ */
private String uuid;
-
+
+ /**
+ * The display name of the selected workflow template.
+ */
private String displayName;
+ /**
+ * The localized titles of the selected workflow template.
+ */
private Map name;
+ /**
+ * Locales for which no title value has been definied yet.
+ */
private List unusedNameLocales;
+ /**
+ * The localized descriptions of the selected workflow template.
+ */
private Map description;
+ /**
+ * The locales for which no localized description has definied yet.
+ */
private List unusedDescriptionLocales;
+ /**
+ * The tasks of the selected workflow template.
+ */
private List tasks;
public long getWorkflowId() {
@@ -96,11 +140,11 @@ public class SelectedWorkflowTemplateModel {
this.unusedDescriptionLocales
= new ArrayList<>(unusedDescriptionLocales);
}
-
+
public boolean getHasUnusedNameLocales() {
return !unusedNameLocales.isEmpty();
}
-
+
public boolean getHasUnusedDescriptionLocales() {
return !unusedDescriptionLocales.isEmpty();
}
@@ -113,5 +157,4 @@ public class SelectedWorkflowTemplateModel {
this.displayName = displayName;
}
-
}
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/TypePermissionsChecker.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/TypePermissionsChecker.java
index e4bbecd27..e10fe9f5c 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/TypePermissionsChecker.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/TypePermissionsChecker.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
@@ -13,15 +26,29 @@ import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
/**
+ * Checks permissions on content types.
*
* @author Jens Pelzetter
*/
@RequestScoped
public class TypePermissionsChecker {
+ /**
+ * {@link PermissionChecker} instance used for performing the permission
+ * check.
+ */
@Inject
private PermissionChecker permissionChecker;
+ /**
+ * Checks if the current user is permitted to use the provided
+ * {@link ContentType}.
+ *
+ * @param type The content type.
+ *
+ * @return {@code true} if the current user is permitted to use the provided
+ * {@code type}, {@code false} otherwise.
+ */
public boolean canUseType(final ContentType type) {
return permissionChecker.isPermitted(
TypePrivileges.USE_TYPE, type
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/WorkflowTaskTemplateListModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/WorkflowTaskTemplateListModel.java
index 816f90e64..a65b4340f 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/WorkflowTaskTemplateListModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/WorkflowTaskTemplateListModel.java
@@ -1,30 +1,60 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import org.libreccm.l10n.GlobalizationHelper;
+import org.libreccm.workflow.Task;
/**
+ * Model for an item in the list tasks of a workflows template.
*
* @author Jens Pelzetter
*/
public class WorkflowTaskTemplateListModel {
+ /**
+ * The ID of the task.
+ */
private long taskId;
+ /**
+ * The UUID of the task.
+ */
private String uuid;
+ /**
+ * The label of the task. This value determined from {@link Task#label}
+ * using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
+ * }.
+ */
private String label;
+ /**
+ * The description of the task. This value determined from
+ * {@link Task#description} using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
+ * }.
+ */
private String description;
-
+
+ /**
+ * Does the task have any dependencies?
+ */
private boolean hasDependencies;
public long getTaskId() {
@@ -66,7 +96,5 @@ public class WorkflowTaskTemplateListModel {
public void setHasDependencies(final boolean hasDependencies) {
this.hasDependencies = hasDependencies;
}
-
-
}
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/WorkflowTemplateListModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/WorkflowTemplateListModel.java
index a8031c7cd..90085ba55 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/WorkflowTemplateListModel.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/WorkflowTemplateListModel.java
@@ -1,24 +1,61 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contentsections;
+import org.libreccm.l10n.GlobalizationHelper;
+import org.libreccm.workflow.Workflow;
+
/**
+ * Model for displaying data about a {@link Workflow} template in the view for
+ * managing the workflow templates of a content section.
*
* @author Jens Pelzetter
*/
public class WorkflowTemplateListModel {
+ /**
+ * The ID of the workflow template.
+ */
private long workflowId;
+ /**
+ * The UUID of the workflow template.
+ */
private String uuid;
+ /**
+ * The name of the workflow template. This value is determined from
+ * {@link Workflow#name} using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
+ * }
+ */
private String name;
+ /**
+ * The description of the workflow template. This value is determined from
+ * {@link Workflow#description} using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
+ * }
+ */
private String description;
+ /**
+ * Does the workflow template have any task templates?
+ */
private boolean hasTasks;
public long getWorkflowId() {
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contenttypes/ArticleMessageBundle.java b/ccm-cms/src/main/java/org/librecms/ui/contenttypes/ArticleMessageBundle.java
index 40a0d1391..68fc2fa3f 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contenttypes/ArticleMessageBundle.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contenttypes/ArticleMessageBundle.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contenttypes;
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contenttypes/ArticleStepsConstants.java b/ccm-cms/src/main/java/org/librecms/ui/contenttypes/ArticleStepsConstants.java
index 6200b7c8d..5a0b4fc8f 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contenttypes/ArticleStepsConstants.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contenttypes/ArticleStepsConstants.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contenttypes;
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticleCreateStep.java b/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticleCreateStep.java
index 6b74b75fa..b63f20bd3 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticleCreateStep.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticleCreateStep.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contenttypes;
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticlePropertiesStep.java b/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticlePropertiesStep.java
index 3ef4821a1..3ff745f89 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticlePropertiesStep.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticlePropertiesStep.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contenttypes;
diff --git a/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticleTextBodyStep.java b/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticleTextBodyStep.java
index 99c965a70..9c7b761ce 100644
--- a/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticleTextBodyStep.java
+++ b/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticleTextBodyStep.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.librecms.ui.contenttypes;
diff --git a/ccm-core/src/main/java/com/arsdigita/ui/admin/applications/ApplicationInstanceTreeCdiUtil.java b/ccm-core/src/main/java/com/arsdigita/ui/admin/applications/ApplicationInstanceTreeCdiUtil.java
index b1458b506..4025a2ef1 100644
--- a/ccm-core/src/main/java/com/arsdigita/ui/admin/applications/ApplicationInstanceTreeCdiUtil.java
+++ b/ccm-core/src/main/java/com/arsdigita/ui/admin/applications/ApplicationInstanceTreeCdiUtil.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package com.arsdigita.ui.admin.applications;
diff --git a/ccm-core/src/main/java/org/libreccm/categorization/CategorizationImExporterDependenciesProvider.java b/ccm-core/src/main/java/org/libreccm/categorization/CategorizationImExporterDependenciesProvider.java
index 9f6d8d626..83ec0bc07 100644
--- a/ccm-core/src/main/java/org/libreccm/categorization/CategorizationImExporterDependenciesProvider.java
+++ b/ccm-core/src/main/java/org/libreccm/categorization/CategorizationImExporterDependenciesProvider.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.libreccm.categorization;
diff --git a/ccm-core/src/main/java/org/libreccm/core/api/CcmCoreApi.java b/ccm-core/src/main/java/org/libreccm/core/api/CcmCoreApi.java
index 10f91309c..b169b7616 100644
--- a/ccm-core/src/main/java/org/libreccm/core/api/CcmCoreApi.java
+++ b/ccm-core/src/main/java/org/libreccm/core/api/CcmCoreApi.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.libreccm.core.api;
diff --git a/ccm-core/src/main/java/org/libreccm/formbuilder/actions/ConfirmEmailListener.java b/ccm-core/src/main/java/org/libreccm/formbuilder/actions/ConfirmEmailListener.java
index 7839c591c..448363084 100644
--- a/ccm-core/src/main/java/org/libreccm/formbuilder/actions/ConfirmEmailListener.java
+++ b/ccm-core/src/main/java/org/libreccm/formbuilder/actions/ConfirmEmailListener.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.libreccm.formbuilder.actions;
diff --git a/ccm-core/src/main/java/org/libreccm/formbuilder/actions/ConfirmRedirectListener.java b/ccm-core/src/main/java/org/libreccm/formbuilder/actions/ConfirmRedirectListener.java
index 8418db0eb..649a0afc4 100644
--- a/ccm-core/src/main/java/org/libreccm/formbuilder/actions/ConfirmRedirectListener.java
+++ b/ccm-core/src/main/java/org/libreccm/formbuilder/actions/ConfirmRedirectListener.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.libreccm.formbuilder.actions;
diff --git a/ccm-core/src/main/java/org/libreccm/formbuilder/actions/RemoteServerPostListener.java b/ccm-core/src/main/java/org/libreccm/formbuilder/actions/RemoteServerPostListener.java
index 83137801d..4295fb936 100644
--- a/ccm-core/src/main/java/org/libreccm/formbuilder/actions/RemoteServerPostListener.java
+++ b/ccm-core/src/main/java/org/libreccm/formbuilder/actions/RemoteServerPostListener.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.libreccm.formbuilder.actions;
diff --git a/ccm-core/src/main/java/org/libreccm/formbuilder/actions/SimpleEmailListener.java b/ccm-core/src/main/java/org/libreccm/formbuilder/actions/SimpleEmailListener.java
index 4ef2f6c57..d28e28f4e 100644
--- a/ccm-core/src/main/java/org/libreccm/formbuilder/actions/SimpleEmailListener.java
+++ b/ccm-core/src/main/java/org/libreccm/formbuilder/actions/SimpleEmailListener.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.libreccm.formbuilder.actions;
diff --git a/ccm-core/src/main/java/org/libreccm/formbuilder/actions/TemplateEmailListener.java b/ccm-core/src/main/java/org/libreccm/formbuilder/actions/TemplateEmailListener.java
index ece8c2c9b..8dd0a5d05 100644
--- a/ccm-core/src/main/java/org/libreccm/formbuilder/actions/TemplateEmailListener.java
+++ b/ccm-core/src/main/java/org/libreccm/formbuilder/actions/TemplateEmailListener.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.libreccm.formbuilder.actions;
diff --git a/ccm-core/src/main/java/org/libreccm/formbuilder/actions/XmlEmailListener.java b/ccm-core/src/main/java/org/libreccm/formbuilder/actions/XmlEmailListener.java
index 72347b4e9..c16cbc594 100644
--- a/ccm-core/src/main/java/org/libreccm/formbuilder/actions/XmlEmailListener.java
+++ b/ccm-core/src/main/java/org/libreccm/formbuilder/actions/XmlEmailListener.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.libreccm.formbuilder.actions;
diff --git a/ccm-core/src/test/java/org/libreccm/core/EntitiesTestCore.java b/ccm-core/src/test/java/org/libreccm/core/EntitiesTestCore.java
index 2e85a43f2..c2f5fdfcd 100644
--- a/ccm-core/src/test/java/org/libreccm/core/EntitiesTestCore.java
+++ b/ccm-core/src/test/java/org/libreccm/core/EntitiesTestCore.java
@@ -1,7 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (C) 2021 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
package org.libreccm.core;