diff --git a/ccm-core/src/com/arsdigita/ui/admin/AdminResources.properties b/ccm-core/src/com/arsdigita/ui/admin/AdminResources.properties index 2e6dcb9d3..ada07aa85 100644 --- a/ccm-core/src/com/arsdigita/ui/admin/AdminResources.properties +++ b/ccm-core/src/com/arsdigita/ui/admin/AdminResources.properties @@ -130,3 +130,4 @@ ui.admin.applications.ApplicationInfoSection.desc.label=Description ui.admin.applications.no_settings=This application has no settings (yet). ui.admin.applications.form_not_compatible_now=This application administration form is not yet compatible with this application pane. Please use the applications own administration form. ui.admin.applications.ApplicationInstancePane.manage.heading=Instance specific settings +ui.admin.applications.parent.label=Select parent application diff --git a/ccm-core/src/com/arsdigita/ui/admin/AdminResources_de.properties b/ccm-core/src/com/arsdigita/ui/admin/AdminResources_de.properties index 7b7d584f0..f622d5c02 100644 --- a/ccm-core/src/com/arsdigita/ui/admin/AdminResources_de.properties +++ b/ccm-core/src/com/arsdigita/ui/admin/AdminResources_de.properties @@ -130,3 +130,4 @@ ui.admin.applications.ApplicationInfoSection.desc.label=Beschreibung ui.admin.applications.no_settings=Diese Applikation hat (noch) keine Einstellungen. ui.admin.applications.form_not_compatible_now=Das Formular zur Verwaltung dieser Application ist derzeit noch nicht kompatibel mit dieser Administrationsoberfl\u00e4che. Bitte nutzen Sie den Administrationsoberfl\u00e4che der Application. ui.admin.applications.ApplicationInstancePane.manage.heading=Einstellungen der Instanz +ui.admin.applications.parent.label=W\u00e4hlen Sie die \u00fcbergeordnete Applikation diff --git a/ccm-core/src/com/arsdigita/ui/admin/AdminResources_en.properties b/ccm-core/src/com/arsdigita/ui/admin/AdminResources_en.properties index 8ef0388b4..883609116 100755 --- a/ccm-core/src/com/arsdigita/ui/admin/AdminResources_en.properties +++ b/ccm-core/src/com/arsdigita/ui/admin/AdminResources_en.properties @@ -130,3 +130,4 @@ ui.admin.applications.ApplicationInfoSection.desc.label= ui.admin.applications.no_settings= ui.admin.applications.form_not_compatible_now= ui.admin.applications.ApplicationInstancePane.manage.heading= +ui.admin.applications.parent.label= diff --git a/ccm-core/src/com/arsdigita/ui/admin/AdminResources_fr.properties b/ccm-core/src/com/arsdigita/ui/admin/AdminResources_fr.properties index 02e8b7083..1ed244c8b 100755 --- a/ccm-core/src/com/arsdigita/ui/admin/AdminResources_fr.properties +++ b/ccm-core/src/com/arsdigita/ui/admin/AdminResources_fr.properties @@ -116,3 +116,4 @@ ui.admin.applications.ApplicationInfoSection.desc.label= ui.admin.applications.no_settings= ui.admin.applications.form_not_compatible_now= ui.admin.applications.ApplicationInstancePane.manage.heading= +ui.admin.applications.parent.label= diff --git a/ccm-core/src/com/arsdigita/ui/admin/applications/ApplicationCreateForm.java b/ccm-core/src/com/arsdigita/ui/admin/applications/ApplicationCreateForm.java index 28685d442..accd5ebc5 100644 --- a/ccm-core/src/com/arsdigita/ui/admin/applications/ApplicationCreateForm.java +++ b/ccm-core/src/com/arsdigita/ui/admin/applications/ApplicationCreateForm.java @@ -18,6 +18,9 @@ */ package com.arsdigita.ui.admin.applications; +import com.arsdigita.bebop.BoxPanel; +import com.arsdigita.bebop.Component; +import com.arsdigita.bebop.Container; import com.arsdigita.bebop.Form; import com.arsdigita.bebop.FormProcessException; import com.arsdigita.bebop.Label; @@ -46,22 +49,25 @@ import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.web.Application; import com.arsdigita.web.ApplicationCollection; import com.arsdigita.web.ApplicationType; +import java.util.ArrayList; +import java.util.List; import java.util.TooManyListenersException; /** - * Basic form for creating new Application instances. Should be suitable for - * most applications types. If you have special needs... $todo - * - * This form does not support parent/child application structures. If - * your app needs this, add a widget for selecting the parent application - * and extend the process method. - * + * Basic form for creating new Application instances. Should be suitable for most applications types. If you have + * special needs... $todo + * + * This form does not support parent/child application structures. If your app needs this, add a widget for selecting + * the parent application and extend the process method. + * * @param Type of application - * + * * @author Jens Pelzetter * @version $Id$ */ -public class ApplicationCreateForm extends Form { +public class ApplicationCreateForm extends Form implements FormSubmissionListener, + FormValidationListener, + FormProcessListener { public static final String FORM_NAME = "ApplicationCreateForm"; private static final String PARENT_APP = "parentAll"; @@ -74,6 +80,7 @@ public class ApplicationCreateForm extends Form { private final TextField applicationUrl; private final TextField applicationTitle; private final TextArea applicationDesc; + private final Container widgetSection; private final SaveCancelSection saveCancelSection; public ApplicationCreateForm(final Class appClass, final boolean allowRoot) { @@ -95,6 +102,9 @@ public class ApplicationCreateForm extends Form { applicationType = (ApplicationType) DomainObjectFactory.newInstance(appTypes.getDataObject()); appTypes.close(); + widgetSection = new BoxPanel(BoxPanel.VERTICAL); + add(widgetSection); + parentApp = new SingleSelect(PARENT_APP); try { parentApp.addPrintListener(new PrintListener() { @@ -103,19 +113,19 @@ public class ApplicationCreateForm extends Form { target.addOption(new Option("", "")); final ApplicationCollection applications = Application.retrieveAllApplications(); + applications.addOrder(Application.PRIMARY_URL); while (applications.next()) { target.addOption(new Option(applications.getApplication().getPath(), applications.getApplication().getPath())); } } - }); - + if (!allowRoot) { parentApp.addValidationListener(new NotNullValidationListener()); - parentApp.addValidationListener(new NotEmptyValidationListener()); + parentApp.addValidationListener(new NotEmptyValidationListener()); } - + } catch (TooManyListenersException ex) { throw new UncheckedWrapperException(ex); } @@ -140,105 +150,111 @@ public class ApplicationCreateForm extends Form { applicationDesc.addValidationListener(new StringInRangeValidationListener(0, 4000, GlobalizationUtil.globalize( "ui.admin.applications.desc.valiation.minmaxlength"))); - add(new Label(GlobalizationUtil.globalize("ui.admin.applications.parent.label"))); - add(parentApp); - add(new Label(GlobalizationUtil.globalize("ui.admin.applications.url.label"))); - add(applicationUrl); - add(new Label(GlobalizationUtil.globalize("ui.admin.applications.title.label"))); - add(applicationTitle); - add(new Label(GlobalizationUtil.globalize("ui.admin.applications.desc.label"))); - add(applicationDesc); - + widgetSection.add(new Label(GlobalizationUtil.globalize("ui.admin.applications.parent.label"))); + widgetSection.add(parentApp); + widgetSection.add(new Label(GlobalizationUtil.globalize("ui.admin.applications.url.label"))); + widgetSection.add(applicationUrl); + widgetSection.add(new Label(GlobalizationUtil.globalize("ui.admin.applications.title.label"))); + widgetSection.add(applicationTitle); + widgetSection.add(new Label(GlobalizationUtil.globalize("ui.admin.applications.desc.label"))); + widgetSection.add(applicationDesc); + saveCancelSection = new SaveCancelSection(); add(saveCancelSection); - addValidationListener(new ValidationListener()); - addSubmissionListener(new SubmissionListener()); - addProcessListener(new ProcessListener()); + addValidationListener(this); + addSubmissionListener(this); + addProcessListener(this); + } + + protected Container getWidgetSection() { + return widgetSection; } public String getAppClassName() { return appClassName; } - private class SubmissionListener implements FormSubmissionListener { - - public void submitted(final FormSectionEvent event) throws FormProcessException { - final PageState state = event.getPageState(); - - if (saveCancelSection.getCancelButton().isSelected(state)) { - parentApp.setValue(state, ""); - applicationTitle.setValue(state, ""); - applicationUrl.setValue(state, ""); - applicationDesc.setValue(state, ""); - - throw new FormProcessException("Canceled"); - } - } - + protected SingleSelect getParentApp() { + return parentApp; } - private class ProcessListener implements FormProcessListener { + protected TextField getApplicationUrl() { + return applicationUrl; + } - /** - * Creates a new application instance using the provided data. - * - * @param event - * @throws FormProcessException - */ - public void process(final FormSectionEvent event) throws FormProcessException { - final PageState state = event.getPageState(); + protected TextField getApplicationTitle() { + return applicationTitle; + } - if (saveCancelSection.getSaveButton().isSelected(state)) { - Application parent; - boolean createContainerGroup; - - final String parentPath = (String) parentApp.getValue(state); - if ((parentPath == null) && parentPath.isEmpty()) { + protected TextArea getApplicationDesc() { + return applicationDesc; + } + + protected SaveCancelSection getSaveCancelSection() { + return saveCancelSection; + } + + public void process(final FormSectionEvent event) throws FormProcessException { + final PageState state = event.getPageState(); + + if (saveCancelSection.getSaveButton().isSelected(state)) { + Application parent; + boolean createContainerGroup; + + final String parentPath = (String) parentApp.getValue(state); + if ((parentPath == null) || parentPath.isEmpty()) { + parent = null; + createContainerGroup = false; + } else { + final ApplicationCollection applications = Application.retrieveAllApplications(); + applications.addEqualsFilter(Application.PRIMARY_URL, parentPath + "/"); + if (applications.next()) { + parent = applications.getApplication(); + createContainerGroup = true; + } else { parent = null; createContainerGroup = false; - } else { - final ApplicationCollection applications = Application.retrieveAllApplications(); - applications.addEqualsFilter(Application.PRIMARY_URL, parentPath + "/"); - if (applications.next()) { - parent = applications.getApplication(); - createContainerGroup = true; - } else { - parent = null; - createContainerGroup = false; - } - applications.close(); - } - - final Application application = Application.createApplication(applicationType, - (String) applicationUrl.getValue(state), - (String) applicationTitle.getValue(state), - parent, - createContainerGroup); - application.setDescription((String) applicationDesc.getValue(state)); - application.save(); + } + applications.close(); } - } + final Application application = Application.createApplication(applicationType, + (String) applicationUrl.getValue(state), + (String) applicationTitle.getValue(state), + parent, + createContainerGroup); + application.setDescription((String) applicationDesc.getValue(state)); + application.save(); + } } - private class ValidationListener implements FormValidationListener { + public void submitted(final FormSectionEvent event) throws FormProcessException { + final PageState state = event.getPageState(); - public void validate(final FormSectionEvent event) throws FormProcessException { - final PageState state = event.getPageState(); + if (saveCancelSection.getCancelButton().isSelected(state)) { + parentApp.setValue(state, ""); + applicationTitle.setValue(state, ""); + applicationUrl.setValue(state, ""); + applicationDesc.setValue(state, ""); - final String url = (String) applicationUrl.getValue(state); + throw new FormProcessException("Canceled"); + } + } - if (url.contains("/")) { - throw new FormProcessException((String) GlobalizationUtil.globalize( - "ui.admin.applications.url.validation.no_slash_allowed").localize()); - } + public void validate(final FormSectionEvent event) throws FormProcessException { + final PageState state = event.getPageState(); - if (Application.isInstalled(Application.BASE_DATA_OBJECT_TYPE, url)) { - throw new FormProcessException((String) GlobalizationUtil.globalize( - "ui.admin.applications.url.validation.url_already_in_use").localize()); - } + final String url = (String) applicationUrl.getValue(state); + + if (url.contains("/")) { + throw new FormProcessException((String) GlobalizationUtil.globalize( + "ui.admin.applications.url.validation.no_slash_allowed").localize()); } + if (Application.isInstalled(Application.BASE_DATA_OBJECT_TYPE, url)) { + throw new FormProcessException((String) GlobalizationUtil.globalize( + "ui.admin.applications.url.validation.url_already_in_use").localize()); + } } } diff --git a/ccm-forum/src/com/arsdigita/forum/ForumApplicationManager.java b/ccm-forum/src/com/arsdigita/forum/ForumApplicationManager.java index 85b9b9f54..ec8a1f8ac 100644 --- a/ccm-forum/src/com/arsdigita/forum/ForumApplicationManager.java +++ b/ccm-forum/src/com/arsdigita/forum/ForumApplicationManager.java @@ -40,7 +40,8 @@ public class ForumApplicationManager extends AbstractApplicationManager { final BoxPanel panel = new BoxPanel(); panel.add( - new Label(new GlobalizedMessage("forum.ui.admin.no_settings", "com.arsdigita.forum.ui.ForumResources"))); + new Label(new GlobalizedMessage("forum.ui.admin.no_settings", + "com.arsdigita.forum.ui.ForumResources"))); container.add(panel); @@ -50,5 +51,4 @@ public class ForumApplicationManager extends AbstractApplicationManager { public boolean allowRoot() { return false; } - } diff --git a/ccm-portalworkspace/src/com/arsdigita/portalworkspace/Initializer.java b/ccm-portalworkspace/src/com/arsdigita/portalworkspace/Initializer.java index 32f3d29b9..bb53c5de4 100755 --- a/ccm-portalworkspace/src/com/arsdigita/portalworkspace/Initializer.java +++ b/ccm-portalworkspace/src/com/arsdigita/portalworkspace/Initializer.java @@ -49,6 +49,7 @@ import com.arsdigita.runtime.CompoundInitializer; import com.arsdigita.runtime.DomainInitEvent; import com.arsdigita.runtime.PDLInitializer; import com.arsdigita.runtime.RuntimeConfig; +import com.arsdigita.ui.admin.ApplicationManagers; import com.arsdigita.xml.XML; @@ -270,5 +271,8 @@ public class Initializer extends CompoundInitializer { // now moved to navigation ?? // ApplicationNavigationModel.register(Workspace.class.getName(), // new DefaultNavigationModel()); + + //Register application manager used for creating the admin form in /ccm/admin + ApplicationManagers.register(new WorkspaceApplicationManager()); } } diff --git a/ccm-portalworkspace/src/com/arsdigita/portalworkspace/Workspace.java b/ccm-portalworkspace/src/com/arsdigita/portalworkspace/Workspace.java index 420d9ce6b..01ffeaa13 100755 --- a/ccm-portalworkspace/src/com/arsdigita/portalworkspace/Workspace.java +++ b/ccm-portalworkspace/src/com/arsdigita/portalworkspace/Workspace.java @@ -15,7 +15,6 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - package com.arsdigita.portalworkspace; import com.arsdigita.domain.DataObjectNotFoundException; @@ -56,44 +55,47 @@ import java.util.LinkedList; import org.apache.log4j.Logger; - /** - * Class Workspace is the main domain class (extending Application) - * for the portalworkspace module. + * Class Workspace is the main domain class (extending Application) for the portalworkspace module. + * + * A (portal)workspace represents an area containing 0...n portals each arranged as a pane of page. Each portal (or + * pane) manages a number of portlets. So a workspace is a container for a set of portal panes. * - * A (portal)workspace represents an area containing 0...n portals each arranged - * as a pane of page. Each portal (or pane) manages a number of portlets. So a - * workspace is a container for a set of portal panes. - * */ public class Workspace extends Application { - /** Private logger instance for debugging purpose */ + /** + * Private logger instance for debugging purpose + */ private static final Logger s_log = Logger.getLogger(Workspace.class); - - /** Config object containing various parameter */ + /** + * Config object containing various parameter + */ private static final WorkspaceConfig s_config = WorkspaceConfig.getConfig(); - /** Service method to provide client classes access to configuration. */ + /** + * Service method to provide client classes access to configuration. + */ public static WorkspaceConfig getConfig() { return s_config; } - /** PDL stuff */ + /** + * PDL stuff + */ public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.portalworkspace.Workspace"; public static final String PARTY = "party"; public static final String PARTY_ID = PARTY + "." + ACSObject.ID; public static final String DEFAULT_LAYOUT = "defaultLayout"; public static final String PAGES = "pages"; - /** - * store this as a static variable as it cannot change during the lifetime - * of the ccm service + * store this as a static variable as it cannot change during the lifetime of the ccm service */ private static Workspace defaultHomepageWorkspace = null; /** * Constructor retrieves the domain object using its DataObject representation + * * @param obj */ public Workspace(DataObject obj) { @@ -102,6 +104,7 @@ public class Workspace extends Application { /** * Constructor, retrieves the workspace from database using its OID + * * @param oid * @throws com.arsdigita.domain.DataObjectNotFoundException */ @@ -112,35 +115,32 @@ public class Workspace extends Application { /* * public String getContextPath() { return "ccm-portalworkspace"; } */ - /** * Returns the path name of the location of the applications servlet/JSP. * - * The method overwrites the super class to provide an application specific - * location for servlets/JSP. This is necessary if you whish to install the - * module (application) along with others in one context. If you install the - * module into its own context (no longer recommended for versions newer - * than 1.0.4) you may use a standard location. + * The method overwrites the super class to provide an application specific location for servlets/JSP. This is + * necessary if you whish to install the module (application) along with others in one context. If you install the + * module into its own context (no longer recommended for versions newer than 1.0.4) you may use a standard + * location. * - * Usually it is a symbolic name/path, which will be mapped in the web.xml - * to the real location in the file system. Example: + * Usually it is a symbolic name/path, which will be mapped in the web.xml to the real location in the file system. + * Example: * - * portalworkspace-files - * com.arsdigita.web.ApplicationFileServlet - * - * template-path - * /templates/ccm-portalworkspace - * + * portalworkspace-files + * com.arsdigita.web.ApplicationFileServlet + * + * template-path + * /templates/ccm-portalworkspace + * * * * - * portalworkspace-files - * /ccm-portalworkspace/files/* + * portalworkspace-files + * /ccm-portalworkspace/files/* * * * @return path name to the applications servlet/JSP - * @return ServletPath (constant) probably should be synchron with web.xml - * entry + * @return ServletPath (constant) probably should be synchron with web.xml entry */ @Override public String getServletPath() { @@ -149,15 +149,15 @@ public class Workspace extends Application { } /** - * Wrapper class to create a new workspace using a limited set of parameters, - * here: page layout is set to default layout. + * Wrapper class to create a new workspace using a limited set of parameters, here: page layout is set to default + * layout. + * + * NOTE: Parameter isPublic may be a misnomer, the actual usage of it in the process of application creation uses it + * as createGroupContainer * - * NOTE: Parameter isPublic may be a misnomer, the actual usage of it in the - * process of application creation uses it as createGroupContainer - * * @param url * @param title - * @param parent parent application + * @param parent parent application * @param isPublic * @return */ @@ -168,12 +168,12 @@ public class Workspace extends Application { } /** - * Wrapper class to create a new workspace using a limited set of parameters, - * here: page layout is set to default layout. - * + * Wrapper class to create a new workspace using a limited set of parameters, here: page layout is set to default + * layout. + * * @param url * @param title - * @param parent parent application + * @param parent parent application * @param owner * @return */ @@ -184,12 +184,11 @@ public class Workspace extends Application { } /** - * Does the real work to create a workspace as a legacy compatible - * applicationin the storage (db) + * Does the real work to create a workspace as a legacy compatible applicationin the storage (db) + * + * NOTE: Parameter isPublic may be a misnomer, the actual usage of it in the process of application creation uses it + * as createGroupContainer * - * NOTE: Parameter isPublic may be a misnomer, the actual usage of it in the - * process of application creation uses it as createGroupContainer - * * @param url * @param title * @param layout @@ -208,27 +207,26 @@ public class Workspace extends Application { } Workspace workspace = (Workspace) Application.createApplication( - BASE_DATA_OBJECT_TYPE, url, title, parent); + BASE_DATA_OBJECT_TYPE, url, title, parent, true); workspace.setupGroups(title, isPublic); workspace.setDefaultLayout(layout); return workspace; } /** - * Does the real work to create a workspace instance as a - * legacy free application in the storage (db) + * Does the real work to create a workspace instance as a legacy free application in the storage (db) * * * @param url of the application (last part, its "name") * @param title the application to be created * @param layout layout to use for this instance - * @param parent, url of the parent part if any, null otherwise - * @param isPublic whether the group that will be created for this instance - * should be created with the public user as a member + * @param parent, url of the parent part if any, null otherwise + * @param isPublic whether the group that will be created for this instance should be created with the public user + * as a member * @return */ public static Workspace createWorkspace(ApplicationType type, - String url, + String url, String title, PageLayout layout, Application parent, @@ -239,14 +237,16 @@ public class Workspace extends Application { + (parent == null ? "none" : parent.getOID().toString()) + "and public access is: " + isPublic); } - - if (layout==null) layout = PageLayout.getDefaultLayout(); + + if (layout == null) { + layout = PageLayout.getDefaultLayout(); + } /* A container group is always created fo a portal workspace instance. */ // MODIFIED /* A container group is NOT created fo a portal workspace instance here. */ Workspace workspace = (Workspace) Application.createApplication( - type, url, title, parent, true ); + type, url, title, parent, true); workspace.setupGroups(title, isPublic); workspace.setDefaultLayout(layout); return workspace; @@ -254,7 +254,7 @@ public class Workspace extends Application { /** * Does the real work to create a workspace in the storage (db) - * + * * @param url * @param title * @param layout @@ -279,13 +279,11 @@ public class Workspace extends Application { } /** - * Retrieve the workspace that is created during loading of the - * ccm-portalworkspace application and is set as the defaultworkspace - * for the site. + * Retrieve the workspace that is created during loading of the ccm-portalworkspace application and is set as the + * defaultworkspace for the site. * - * Returns null if there are no workspaces (though presumably if that is the - * case, ccm-portalworkspace hasn't been loaded and so I don't know how you - * are invoking this method!) + * Returns null if there are no workspaces (though presumably if that is the case, ccm-portalworkspace hasn't been + * loaded and so I don't know how you are invoking this method!) * * @return default workspace instance (created during load) */ @@ -314,8 +312,8 @@ public class Workspace extends Application { } - /** - * + /** + * */ @Override public void beforeSave() { @@ -387,13 +385,13 @@ public class Workspace extends Application { } } - /** - * + /** + * * @param title * @param isPublic */ private void setupGroups(String title, boolean isPublic) { - + Group members = new Group(); members.setName(title); members.save(); @@ -404,7 +402,7 @@ public class Workspace extends Application { // own groups so doesn't need a hierarchy and (b) hierarchy would // mean for a given workspace, role would be on the same level // as member groups of sub workspaces - messy & confusing - // getApplicationType().getGroup().addSubgroup(members); + // getApplicationType().getGroup().addSubgroup(members); Role admins = members.createRole("Administrators"); admins.save(); @@ -424,9 +422,9 @@ public class Workspace extends Application { members.save(); } - // getApplicationType().getGroup().addSubgroup(members); + // getApplicationType().getGroup().addSubgroup(members); Group container = getGroup(); // Application.getGroup(): get group - // associated with this application + // associated with this application container.addSubgroup(members); container.save(); @@ -434,7 +432,7 @@ public class Workspace extends Application { } /** - * + * * @return */ public static WorkspaceCollection retrieveAll() { @@ -442,7 +440,7 @@ public class Workspace extends Application { } /** - * + * * @param parent * @return */ @@ -457,13 +455,13 @@ public class Workspace extends Application { } /** - * + * */ public Workspace retrieveSubworkspaceForParty(Party owner) throws DataObjectNotFoundException { DataCollection wks = SessionManager.getSession() - .retrieve(BASE_DATA_OBJECT_TYPE); + .retrieve(BASE_DATA_OBJECT_TYPE); wks.addEqualsFilter("parentResource.id", getID()); wks.addEqualsFilter(PARTY_ID, owner.getID()); @@ -556,7 +554,9 @@ public class Workspace extends Application { group.save(); } - /** Participants are the members of the Party group. */ + /** + * Participants are the members of the Party group. + */ public PartyCollection getParticipants() { Party party = getParty(); @@ -573,24 +573,21 @@ public class Workspace extends Application { "com.arsdigita.kernel.User"); // .retrieve("com.arsdigita.kernel.Party"); Filter f = dc.addNotInSubqueryFilter( - "id", - "com.arsdigita.portalworkspace.WorkspaceParticipantIDs"); + "id", + "com.arsdigita.portalworkspace.WorkspaceParticipantIDs"); f.set("workspaceID", getID()); return new PartyCollection(dc); } /** - *

Get a list of all the distinct "initials" of participants in - * a Portal Site.

+ *

Get a list of all the distinct "initials" of participants in a Portal Site.

* - *

A participant's initial is defined as the first letter of - * their family name when the participant is a user (i.e. a - * person), and the first letter of the group name if the - * participant is a group.

+ *

A participant's initial is defined as the first letter of their family name when the participant is a user + * (i.e. a person), and the first letter of the group name if the participant is a group.

* - *

The returned Iterator contains the initials in increasing - * alphabetical order.

- **/ + *

The returned Iterator contains the initials in increasing alphabetical order.

+ * + */ public Iterator getParticipantInitials() { DataQuery query = SessionManager.getSession().retrieveQuery( "com.arsdigita.portalworkspace.WorkspaceParticipantInitials"); @@ -605,13 +602,12 @@ public class Workspace extends Application { } /** - *

Get a collection of all participants in the Workspace whose - * initial (see {@link getParticipantInitials - * getParticipantInitials} for a definition of a participant's - * initial) is the specified value.

+ *

Get a collection of all participants in the Workspace whose initial (see {@link getParticipantInitials + * getParticipantInitials} for a definition of a participant's initial) is the specified value.

* * @param initial Single-character string, must be uppercase - **/ + * + */ public PartyCollection getParticipantsWithInitial(String initial) { Assert.exists(initial); Assert.isTrue(initial.length() == 1, "Initial needs length 1"); @@ -628,8 +624,8 @@ public class Workspace extends Application { "com.arsdigita.kernel.User"); Filter f = dc.addInSubqueryFilter( - "id", - "com.arsdigita.portalworkspace.WorkspaceParticipantsWithInitial"); + "id", + "com.arsdigita.portalworkspace.WorkspaceParticipantsWithInitial"); f.set("workspaceID", getID()); f.set("nameInitial", initial); @@ -790,7 +786,7 @@ public class Workspace extends Application { } /** - * + * * @param owner * @return */ @@ -811,7 +807,6 @@ public class Workspace extends Application { group.addMember(owner); workspace.setOwner(owner); new KernelExcursion() { - public void excurse() { setEffectiveParty(Kernel.getSystemParty()); PermissionDescriptor pd = new PermissionDescriptor( @@ -840,7 +835,7 @@ public class Workspace extends Application { } /** - * + * * @param owner * @return */ @@ -851,7 +846,7 @@ public class Workspace extends Application { if (personalWorkspaces.next()) { Workspace workspace = (Workspace) Application - .retrieveApplication(personalWorkspaces. + .retrieveApplication(personalWorkspaces. getDataObject()); if (personalWorkspaces.next()) { s_log.error("more than one personal workspaces for this user!!"); diff --git a/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources.properties b/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources.properties index 447bd1665..d61630777 100755 --- a/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources.properties +++ b/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources.properties @@ -28,3 +28,5 @@ cw.workspace.ui.select_user_or_group_to_add=Select user or group to add: cw.permissions.add_a_privilege=Add a privilege cw.workspace.ui.participant_info=Participant Info cw.workspace.ui.participant_roles=Participant Roles +cw.workspace.ui.admin.no_settings=No settings yet +cw.workspace.default_layout=Layout diff --git a/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources_de.properties b/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources_de.properties index 447bd1665..550062750 100755 --- a/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources_de.properties +++ b/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources_de.properties @@ -28,3 +28,5 @@ cw.workspace.ui.select_user_or_group_to_add=Select user or group to add: cw.permissions.add_a_privilege=Add a privilege cw.workspace.ui.participant_info=Participant Info cw.workspace.ui.participant_roles=Participant Roles +cw.workspace.ui.admin.no_settings=Noch keine Einstellungen +cw.workspace.default_layout=Layout diff --git a/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources_en.properties b/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources_en.properties index 447bd1665..a4b578251 100755 --- a/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources_en.properties +++ b/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources_en.properties @@ -28,3 +28,5 @@ cw.workspace.ui.select_user_or_group_to_add=Select user or group to add: cw.permissions.add_a_privilege=Add a privilege cw.workspace.ui.participant_info=Participant Info cw.workspace.ui.participant_roles=Participant Roles +cw.workspace.ui.admin.no_settings= +cw.workspace.default_layout= diff --git a/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources_fr.properties b/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources_fr.properties index 447bd1665..a4b578251 100755 --- a/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources_fr.properties +++ b/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceResources_fr.properties @@ -28,3 +28,5 @@ cw.workspace.ui.select_user_or_group_to_add=Select user or group to add: cw.permissions.add_a_privilege=Add a privilege cw.workspace.ui.participant_info=Participant Info cw.workspace.ui.participant_roles=Participant Roles +cw.workspace.ui.admin.no_settings= +cw.workspace.default_layout=