From 32adf413d9cd6e3b5b9cfc5646d183d9db1d9b54 Mon Sep 17 00:00:00 2001 From: jensp Date: Fri, 16 Dec 2011 14:46:53 +0000 Subject: [PATCH] =?UTF-8?q?JavaDoc=20f=C3=BCr=20ccm-sci-types-institute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@1366 8810af33-2d31-482b-a856-94f89814c4df --- .../com/arsdigita/cms/contenttypes/SciInstitute.java | 10 ++++++++-- .../cms/contenttypes/SciInstituteInitializer.java | 3 +++ .../contenttypes/ui/SciDepartmentInstitutesStep.java | 8 +++++++- .../contenttypes/ui/SciInstituteDepartmentsStep.java | 5 ++++- .../cms/contenttypes/ui/SciInstituteDescTab.java | 3 ++- .../cms/contenttypes/ui/SciInstituteMembersStep.java | 3 ++- .../cms/contenttypes/ui/SciInstituteMembersTab.java | 3 ++- .../cms/contenttypes/ui/SciInstituteProjectsStep.java | 5 ++++- .../cms/contenttypes/ui/SciInstituteProjectsTab.java | 4 +++- .../cms/contenttypes/ui/SciProjectInstitutesStep.java | 6 +++++- 10 files changed, 40 insertions(+), 10 deletions(-) diff --git a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/SciInstitute.java b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/SciInstitute.java index 49e6dd9ac..418ef0e62 100644 --- a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/SciInstitute.java +++ b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/SciInstitute.java @@ -9,10 +9,10 @@ import com.arsdigita.persistence.OID; import com.arsdigita.persistence.SessionManager; import java.math.BigDecimal; import java.util.List; -import org.omg.PortableInterceptor.ACTIVE; /** - * + * An content type for representing scientifc institutes. + * * @author Jens Pelzetter * @version $Id$ */ @@ -90,6 +90,12 @@ public class SciInstitute extends GenericOrganizationalUnit { return result; } + /** + * Used to check if a institute has members with a specific status. + * @param merge + * @param status + * @return + */ public boolean hasMembers(final boolean merge, final SciInstituteMemberStatus status) { String queryName; diff --git a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/SciInstituteInitializer.java b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/SciInstituteInitializer.java index 379c374c7..90da26569 100644 --- a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/SciInstituteInitializer.java +++ b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/SciInstituteInitializer.java @@ -28,6 +28,7 @@ public class SciInstituteInitializer extends ContentTypeInitializer { final SciInstituteConfig config = SciInstitute.getConfig(); + //Add the authoring steps for departments if the department type is installed final ContentTypeCollection contentTypes = ContentType. getAllContentTypes(); contentTypes.addFilter( @@ -58,6 +59,8 @@ public class SciInstituteInitializer extends ContentTypeInitializer { } contentTypes.reset(); + + //Add the authoring steps for projects if the project type is installed contentTypes.addFilter( "associatedObjectType = 'com.arsdigita.cms.contenttypes.SciProject'"); diff --git a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentInstitutesStep.java b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentInstitutesStep.java index 6790ec826..3eddd1488 100644 --- a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentInstitutesStep.java +++ b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentInstitutesStep.java @@ -2,13 +2,19 @@ package com.arsdigita.cms.contenttypes.ui; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.contenttypes.SciInstitute; +import com.arsdigita.cms.contenttypes.SciInstituteInitializer; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; /** - * + * Authoring step for associating departments to an institute + * This step is attached by the {@link SciInstituteInitializer} only if + * the ccm-sci-types-department module has been installed and the config + * parameter {@code com.arsdigita.cms.contenttypes.sciinstitute.enable.department_institutes_step} + * is set to true. + * * @author Jens Pelzetter * @version $Id$ */ diff --git a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteDepartmentsStep.java b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteDepartmentsStep.java index 0328b42f6..91e10c83f 100644 --- a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteDepartmentsStep.java +++ b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteDepartmentsStep.java @@ -7,7 +7,10 @@ import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; /** - * + * Authoring step for adding departments to an institute. This step is + * attached by the initializer if the ccm-sci-types-department module + * has been installed. + * * @author Jens Pelzetter * @version $Id$ */ diff --git a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteDescTab.java b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteDescTab.java index aef9f0ec4..0be97b122 100644 --- a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteDescTab.java +++ b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteDescTab.java @@ -7,7 +7,8 @@ import com.arsdigita.xml.Element; import org.apache.log4j.Logger; /** - * + * Tab which shown the description of an institute. + * * @author Jens Pelzetter * @version $Id$ */ diff --git a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteMembersStep.java b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteMembersStep.java index 39400b54a..e4568dcbc 100644 --- a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteMembersStep.java +++ b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteMembersStep.java @@ -9,7 +9,8 @@ import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; /** - * + * + * * @author Jens Pelzetter * @version $Id$ */ diff --git a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteMembersTab.java b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteMembersTab.java index 580d80d7a..63ceac470 100644 --- a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteMembersTab.java +++ b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteMembersTab.java @@ -20,7 +20,8 @@ import javax.servlet.http.HttpServletRequest; import org.apache.log4j.Logger; /** - * + * Tab for showing a list of members of an institute. + * * @author Jens Pelzetter * @version $Id$ */ diff --git a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteProjectsStep.java b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteProjectsStep.java index 64a6e0633..d573e2f8b 100644 --- a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteProjectsStep.java +++ b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteProjectsStep.java @@ -7,7 +7,10 @@ import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; /** - * + * Authoring step for adding projects to an institute. This step is + * attached by the initializer if the ccm-sci-types-project module has been + * installed. + * * @author Jens Pelzetter * @version $Id$ */ diff --git a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteProjectsTab.java b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteProjectsTab.java index a5377a2e7..41971ccdb 100644 --- a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteProjectsTab.java +++ b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteProjectsTab.java @@ -26,7 +26,9 @@ import javax.servlet.http.HttpServletRequest; import org.apache.log4j.Logger; /** - * + * Shows a list of projects of an institute. Projects of departments are merged + * into the list. + * * @author Jens Pelzetter * @version $Id$ */ diff --git a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciProjectInstitutesStep.java b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciProjectInstitutesStep.java index cc7bec216..bc1c3b388 100644 --- a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciProjectInstitutesStep.java +++ b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciProjectInstitutesStep.java @@ -8,7 +8,11 @@ import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; /** - * + * Step for associating a project with institutes. Activated if the + * ccm-sci-types-project module is installed and the + * {@code com.arsdigita.cms.contenttypes.sciinstitute.enable.project_institutes_step} + * is set to true. + * * @author Jens Pelzetter * @version $Id$ */