diff --git a/ccm-cms/src/com/arsdigita/cms/portlet/TaskPortlet.java b/ccm-cms/src/com/arsdigita/cms/portlet/TaskPortlet.java
index 86b7e03ca..387259f62 100755
--- a/ccm-cms/src/com/arsdigita/cms/portlet/TaskPortlet.java
+++ b/ccm-cms/src/com/arsdigita/cms/portlet/TaskPortlet.java
@@ -50,6 +50,7 @@ public class TaskPortlet extends Portlet {
public static final String BASE_DATA_OBJECT_TYPE =
"com.arsdigita.cms.portlet.TaskPortlet";
+ @Override
protected String getBaseDataObjectType() {
return BASE_DATA_OBJECT_TYPE;
}
@@ -66,6 +67,7 @@ public class TaskPortlet extends Portlet {
set("numTasks", new Integer(taskCount));
}
+ @Override
protected AbstractPortletRenderer doGetPortletRenderer() {
return new TaskPortletRenderer(this);
}
@@ -100,6 +102,7 @@ public class TaskPortlet extends Portlet {
DomainObjectFactory.registerInstantiator(BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator()
{
+ @Override
public DomainObject doNewInstance(DataObject dataObject)
{
return new TaskPortlet(dataObject);
@@ -108,6 +111,7 @@ public class TaskPortlet extends Portlet {
new ResourceTypeConfig(BASE_DATA_OBJECT_TYPE)
{
+ @Override
public ResourceConfigFormSection getCreateFormSection(
final ResourceType resType,
final RequestLocal parentAppRL)
@@ -115,6 +119,7 @@ public class TaskPortlet extends Portlet {
return new TaskPortletEditor(resType, parentAppRL);
}
+ @Override
public ResourceConfigFormSection getModifyFormSection(
final RequestLocal application)
{
@@ -142,6 +147,7 @@ public class TaskPortlet extends Portlet {
setup.setDescription("Displays a Task List");
setup.setProfile(PortletType.WIDE_PROFILE);
setup.setInstantiator(new ACSObjectInstantiator() {
+ @Override
protected DomainObject doNewInstance(DataObject dataObject) {
return new TaskPortlet(dataObject);
}
@@ -149,6 +155,7 @@ public class TaskPortlet extends Portlet {
setup.run();
new ResourceTypeConfig(TaskPortlet.BASE_DATA_OBJECT_TYPE) {
+ @Override
public ResourceConfigFormSection getCreateFormSection
(final ResourceType resType, final RequestLocal parentAppRL) {
final ResourceConfigFormSection config =
@@ -157,6 +164,7 @@ public class TaskPortlet extends Portlet {
return config;
}
+ @Override
public ResourceConfigFormSection getModifyFormSection
(final RequestLocal application) {
final TaskPortletEditor config =
diff --git a/ccm-core/src/com/arsdigita/ui/sitemap/DisplayActions.java.nolongerInUse b/ccm-core/src/com/arsdigita/ui/sitemap/DisplayActions.java.nolongerInUse
deleted file mode 100755
index f9da84273..000000000
--- a/ccm-core/src/com/arsdigita/ui/sitemap/DisplayActions.java.nolongerInUse
+++ /dev/null
@@ -1,658 +0,0 @@
-/*
- * Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-package com.arsdigita.ui.sitemap;
-
-
-import com.arsdigita.bebop.BoxPanel;
-import com.arsdigita.bebop.Form;
-import com.arsdigita.bebop.Label;
-import com.arsdigita.bebop.PageState;
-import com.arsdigita.bebop.SingleSelectionModel;
-import com.arsdigita.bebop.ToggleLink;
-import com.arsdigita.bebop.event.ActionEvent;
-import com.arsdigita.bebop.event.ActionListener;
-import com.arsdigita.bebop.event.ChangeEvent;
-import com.arsdigita.bebop.event.ChangeListener;
-import com.arsdigita.bebop.event.FormProcessListener;
-import com.arsdigita.bebop.event.FormSectionEvent;
-import com.arsdigita.bebop.event.PrintEvent;
-import com.arsdigita.bebop.event.PrintListener;
-import com.arsdigita.bebop.form.Option;
-import com.arsdigita.bebop.form.RadioGroup;
-import com.arsdigita.bebop.form.Submit;
-import com.arsdigita.bebop.form.TextField;
-import com.arsdigita.bebop.parameters.NotNullValidationListener;
-import com.arsdigita.kernel.PackageInstance;
-import com.arsdigita.kernel.PackageType;
-import com.arsdigita.kernel.PackageTypeCollection;
-import com.arsdigita.kernel.SiteNode;
-import com.arsdigita.kernel.SiteNodeCollection;
-import com.arsdigita.persistence.PersistenceException;
-import com.arsdigita.ui.util.GlobalizationUtil;
-import java.math.BigDecimal;
-import org.apache.log4j.Logger;
-
-/**
- *
- * The DisplayActions class does the following: It listens for
- * change events in the
- * Tree selection model, and when it detects one, it draws two box panels;
- * one above the other. The Top box panel is for SiteNode info and cfg, and the
- * bottom is for package instance cfg.
- *
- * Every time a selection event is heard, this class:
- *
- * - 1) Gets the ID of the node
- *
- 2) creates a site node from the ID
- *
- 3) Extracts the Name of the node
- *
- 4) Builds a title for the top box panel with a call to this.makeTitle()
- *
- 5) Determines if there is a package instance mounted on the node.
- * If there is, the title for the bottom is set with a call to makelowertitle.
- * - 6) sets visible the appropriate action links for the node, like this:
- *
- * - a) If Node has no instance, and is a leaf node, Offer "AddSubnode",
- * "SetPermissions", and "RemoveNode" action options in the Top panel.
- * "MountPackageInstance" is offered in the lower panel.
- *
- b) If node has no instance, but it has children, then offer "AddSubnode",
- * and "SetPermissions" in the Top panel, and "MountPackageInstance"
- * in the Lower Panel.
- *
- c) If Node has an instance, offer "SetPermissions" and "AddSubnode"
- * in top panel, and "unmountInstance" in lower panel;
- *
- *
- *
- *
- *
- * @author Jim Parsons
- **/
-
-public class DisplayActions extends BoxPanel
- implements ActionListener, ChangeListener {
-
- public static final String versionId = "$Id: DisplayActions.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $";
-
-
- private static final Logger s_log =
- Logger.getLogger(DisplayActions.class);
-
-
- private final SingleSelectionModel m_sitenodeselectionmodel;
-
- //First, the vars for the two panels
- BoxPanel m_nodeMaintenancePanel;
- BoxPanel m_pkgMaintenancePanel;
-
- //nodeMaintenancePanel links get their own panel...
- BoxPanel m_linkcontainer;
-
- //Now instances of all of the links, components, and forms necessary
- private Label m_nodetitle;
- private Label m_pkgtitle;
- private String m_nodetitleString;
- private String m_pkgtitleString;
-
- private ToggleLink m_addSubNodeLink;
- private ToggleLink m_setPermissionsLink;
- private ToggleLink m_removeNodeLink;
- private ToggleLink m_unmountPackageLink;
- private ToggleLink m_mountPackageLink;
- private RadioGroup m_grp;
-
- //Four forms are needed for this class. They are:
- //1) AddSubnode form, with textfield for name
- //2) removeNode form, with confirmation/cancel
- //3) unmountInstance form, with confirmation/cancel
- //4) mountInstance form, with selection box
- //
- //These forms and all listeners are included as inner classes...
- AddSubnodeForm m_addSubnodeForm;
- RemoveNodeForm m_removeNodeForm;
- UnmountInstanceForm m_unmountInstanceForm;
- MountInstanceForm m_mountInstanceForm;
-
- /**
- *
- * Constructor for DisplayActions
- *
- */
- public DisplayActions (SingleSelectionModel m) {
- super(VERTICAL, false);
-
- m_sitenodeselectionmodel = m;
- m_sitenodeselectionmodel.addChangeListener(this);
-
- //First, construct the two box panels...
- m_nodeMaintenancePanel = new BoxPanel(VERTICAL,true);
- m_pkgMaintenancePanel = new BoxPanel(VERTICAL,true);
-
-
-
- //Now add the title labels to the above panels
- m_nodetitle = new Label(GlobalizationUtil.globalize("ui.sitemap.site_node"));
- m_nodetitle.addPrintListener( new PrintListener()
- {
- public void prepare(PrintEvent e)
- {
- Label t = (Label)e.getTarget();
- t.setLabel("Site Node: " + m_nodetitleString);
- }
- });
- m_pkgtitle = new Label(GlobalizationUtil.globalize("ui.sitemap.mounted_instance"));
- m_pkgtitle.addPrintListener( new PrintListener()
- {
- public void prepare(PrintEvent e)
- {
- Label t = (Label)e.getTarget();
- t.setLabel("Mounted Instance: " + m_pkgtitleString);
- }
- });
-
- //Now create one more panel to hold the SiteNode action links
- m_linkcontainer = new BoxPanel(HORIZONTAL,false);
-
- m_nodeMaintenancePanel.add(m_nodetitle);
- m_nodeMaintenancePanel.add(m_linkcontainer);
- m_pkgMaintenancePanel.add(m_pkgtitle);
-
- //instance action links and add them to m_linkcontainer
- m_addSubNodeLink = new ToggleLink("[Add New Subnode]");
- m_setPermissionsLink = new ToggleLink("[Set Permissions]");
- m_removeNodeLink = new ToggleLink("[Remove This Node]");
- m_unmountPackageLink = new ToggleLink("[Unmount This Package Instance]");
- m_mountPackageLink = new ToggleLink("[Mount a new Package Instance]");
-
-
- //This must be constructed before the mountPackageForm
- m_grp = new RadioGroup("instancegroup");
- m_grp.setClassAttr("vertical");
- populateRadioGroup(m_grp);
-
- //Add link listeners here...
- m_addSubNodeLink.addActionListener(new addSubnodeListener());
- m_removeNodeLink.addActionListener(new removeNodeListener());
- m_unmountPackageLink.addActionListener(new unmountPackageListener());
- m_mountPackageLink.addActionListener(new mountPackageListener());
-
- //Set up Forms and add to proper containers...
- m_addSubnodeForm = new AddSubnodeForm();
- m_removeNodeForm = new RemoveNodeForm();
- m_unmountInstanceForm = new UnmountInstanceForm();
- m_mountInstanceForm = new MountInstanceForm();
-
-
-
- m_nodeMaintenancePanel.add(m_addSubnodeForm);
- m_nodeMaintenancePanel.add(m_removeNodeForm);
- m_pkgMaintenancePanel.add(m_unmountInstanceForm);
- m_pkgMaintenancePanel.add(m_mountInstanceForm);
- m_pkgMaintenancePanel.add(m_unmountPackageLink);
- m_pkgMaintenancePanel.add(m_mountPackageLink);
-
-
- m_linkcontainer.add(m_addSubNodeLink);
- m_linkcontainer.add(m_setPermissionsLink);
- m_linkcontainer.add(m_removeNodeLink);
-
-
- add(m_nodeMaintenancePanel);
- add(m_pkgMaintenancePanel);
-
-
- }
-
- // FIXME: what is the point of this? -- 2002-11-26
- public void actionPerformed(ActionEvent e) {
- s_log.debug("In actionPerformed listener method.");
- }
-
- /**
- * The computeDefaultState method.
- * This method:
- * 1) gets key of selected tree node
- * 2) generates SiteNode from the key
- * 3) Determines if the node has any children
- * 4) Determines if an instance is mounted on the node
- */
-
- public NodeState computeDefaultState(PageState p) {
- NodeState n;
- BigDecimal bd =
- new BigDecimal((String) m_sitenodeselectionmodel.getSelectedKey(p));
-
- try {
- SiteNode sn;
- sn = new SiteNode(bd);
-
- m_nodetitleString = "Site Node: " + sn.getName();
-
- //Now we check for children and instances
- boolean hasChildren = false;
- boolean hasInstance = false;
- SiteNodeCollection snc = null;
- snc = sn.getChildren();
- //if(snc != null)
- if ( !snc.isEmpty() ) {
- hasChildren = true;
- }
- snc.close();
-
- PackageInstance pi = null;
- pi = sn.getPackageInstance();
- if(pi != null) {
- hasInstance = true;
- m_pkgtitleString = "Package Instance: " + pi.getName();
- } else {
- m_pkgtitleString = "Package Instance: None Mounted";
- }
-
- //Now we know what type of node we are dealing with...
- //All we need to do is set the proper components visible
- n = new NodeState(p, hasChildren, hasInstance);
- return n;
- } catch(com.arsdigita.domain.DataObjectNotFoundException ed) {
- s_log.warn("Problem in ComputeDefaultState");
- }
-
- return null;
-
- }
- /**
- * stateChanged listens for Tree select events.
- *
- */
- public void stateChanged(ChangeEvent e)
- {
- PageState s = e.getPageState();
-
- if ( e.getSource() == m_sitenodeselectionmodel )
- {
- //Since clearSelection() calls generate
- //events, we need to make sure there is
- //something to do here...
- if(m_sitenodeselectionmodel.isSelected(s))
- {
- NodeState n = computeDefaultState(s);
- showActions(n);
- }
- }
- }
- private void resetDefaults(PageState p)
- {
- //set background canvas
- m_addSubNodeLink.setVisible(p, false);
- m_addSubNodeLink.setSelected(p, false);
- m_setPermissionsLink.setVisible(p, false);
- m_setPermissionsLink.setSelected(p, false);
- m_unmountPackageLink.setVisible(p, false);
- m_unmountPackageLink.setSelected(p, false);
- m_mountPackageLink.setVisible(p, false);
- m_mountPackageLink.setSelected(p, false);
- m_removeNodeLink.setVisible(p, false);
- m_removeNodeLink.setSelected(p, false);
- m_mountInstanceForm.setVisible(p, false);
- m_unmountInstanceForm.setVisible(p, false);
- m_addSubnodeForm.setVisible(p, false);
- m_removeNodeForm.setVisible(p, false);
-
- }
- private void showActions(NodeState n)
- {
- boolean hasChildren = n.getHasChildren();
- boolean hasInstance = n.getHasInstance();
- PageState p = n.getPageState();
-
- //Lets freshen up the GUI first...
- resetDefaults(p);
-
- //There is a simple matrix for this method, with 4 conditions:
- if((hasChildren == false) && (hasInstance == false))
- {
- m_addSubNodeLink.setVisible(p, true);
- m_setPermissionsLink.setVisible(p, true);
- m_removeNodeLink.setVisible(p, true);
- m_mountPackageLink.setVisible(p, true);
- }
- else if((hasChildren == true) && (hasInstance == false))
- {
- m_addSubNodeLink.setVisible(p, true);
- m_setPermissionsLink.setVisible(p, true);
- m_mountPackageLink.setVisible(p, true);
- }
- else if((hasChildren == false) && (hasInstance == true))
- {
- m_addSubNodeLink.setVisible(p, true);
- m_setPermissionsLink.setVisible(p, true);
- m_unmountPackageLink.setVisible(p, true);
- }
- else //((hasChildren == true) && (hasInstance == true))
- {
- m_addSubNodeLink.setVisible(p, true);
- m_setPermissionsLink.setVisible(p, true);
- m_unmountPackageLink.setVisible(p, true);
- }
-
- }
-
- private void populateRadioGroup(RadioGroup grp) {
- grp.clearOptions();
- PackageTypeCollection collection = PackageType.retrieveAll();
- while(collection.next()) {
- grp.addOption( new Option(collection.getPackageType().getKey(),
- collection.getPackageType().getPrettyName()));
- }
- }
- ////////////////////////////////////
- ///////Inner Classes////////////////
-
- //This class is a utility class for passing state info around...
- public class NodeState
- {
- public boolean hasChildren = false;
- public boolean hasInstance = false;
- public PageState ps;
-
- public NodeState(PageState s, boolean children, boolean instance)
- {
- ps = s;
- hasChildren = children;
- hasInstance = instance;
- }
-
- public void setHasChildren(boolean val)
- {
- hasChildren = val;
- }
- public void setHasInstance(boolean val)
- {
- hasInstance = val;
- }
- public void setPageState(PageState s)
- {
- ps = s;
- }
- public boolean getHasChildren()
- {
- return hasChildren;
- }
- public boolean getHasInstance()
- {
- return hasInstance;
- }
- public PageState getPageState()
- {
- return ps;
- }
- }
- public class AddSubnodeForm extends Form implements FormProcessListener
- {
- private TextField nodeName;
- private Label instruction;
- private Submit button;
-
- public AddSubnodeForm()
- {
- super("addsubnodeform");
- instruction = new Label(GlobalizationUtil.globalize("ui.sitemap.enter_new_node_name_in_text_field"));
- nodeName = new TextField("nodeName");
- nodeName.setDefaultValue("New Node");
- nodeName.addValidationListener(new NotNullValidationListener("Choose a name for the new site node"));
- button = new Submit("Create Subnode");
- button.setButtonLabel("Create Subnode");
- add(instruction);
- add(nodeName);
- add(button);
- addProcessListener(this);
- }
-
- public void process(FormSectionEvent e)
- {
- SiteNode sn;
- PageState s = e.getPageState();
- //get the ID of the parent node, and create a site node
- BigDecimal bd =
- new BigDecimal((String) m_sitenodeselectionmodel.getSelectedKey(s));
- try
- {
- sn = new SiteNode(bd);
- SiteNode newnode = SiteNode.createSiteNode(nodeName.getValue(s).toString(),sn);
- newnode.save();
-
- //Now rebuild tree here...
- }catch(com.arsdigita.domain.DataObjectNotFoundException ed)
- {
- s_log.warn("Problem in AddSubnodeForm");
- }
- NodeState n = computeDefaultState(s);
- showActions(n);
- }
-
- }
-
- public class RemoveNodeForm extends Form implements FormProcessListener
- {
- private Label instruction;
- private Submit button;
-
- public RemoveNodeForm()
- {
- super("removenodeform");
- instruction = new Label(GlobalizationUtil.globalize("ui.sitemap.are_you_sure_you_want_to_remove_this_node"));
- button = new Submit("Remove Subnode");
- button.setButtonLabel("Remove Subnode");
- add(instruction);
- add(button);
- addProcessListener(this);
- }
-
- public void process(FormSectionEvent e)
- {
- SiteNode sn;
- PageState s = e.getPageState();
- //get the ID of the parent node, and create a site node
- BigDecimal bd =
- new BigDecimal((String) m_sitenodeselectionmodel.getSelectedKey(s));
- try
- {
- sn = new SiteNode(bd);
-
- try
- {
- sn.delete();
- } catch(PersistenceException pe)
- {
- s_log.warn("Something in the DisplayAction code has gone horribly wrong...");
- }
- }catch(com.arsdigita.domain.DataObjectNotFoundException ed)
- {
- s_log.warn("Problem in RemoveInstanceForm");
- }
- m_sitenodeselectionmodel.clearSelection(s);
- resetDefaults(s);
- }
- }
-
- public class UnmountInstanceForm extends Form implements FormProcessListener
- {
- private Label instruction;
- private Submit button;
-
- public UnmountInstanceForm()
- {
- super("unmountinstanceform");
- instruction = new Label(GlobalizationUtil.globalize("ui.sitemap.are_you_sure_you_want_to_umount_this_instance"));
- button = new Submit("Unmount");
- button.setButtonLabel("Unmount");
- add(instruction);
- add(button);
- addProcessListener(this);
- }
-
- public void process(FormSectionEvent e)
- {
- SiteNode sn;
- PageState s = e.getPageState();
- //get the ID of the parent node, and create a site node
- BigDecimal bd =
- new BigDecimal((String) m_sitenodeselectionmodel.getSelectedKey(s));
- try
- {
- sn = new SiteNode(bd);
- //XXX Ugly hack to prevent SiteNode from being thrown away...
- sn.getParent();
- sn.unMountPackage();
- sn.save();
- }catch(com.arsdigita.domain.DataObjectNotFoundException ed)
- {
- s_log.warn("Problem in UnmountInstanceForm");
- }
- NodeState n = computeDefaultState(s);
- showActions(n);
- }
- }
-
- public class MountInstanceForm extends Form implements FormProcessListener
- {
- private Label instruction;
- private Submit button;
- private TextField instanceName;
-
- public MountInstanceForm()
- {
- //Set up UI components...
- super("mountinstanveform");
- instruction = new Label(GlobalizationUtil.globalize("ui.sitemap.enter_name_for_new_package_instance_in_text_field_then_select_a_package_to_mount_from_list"));
- instanceName = new TextField("instanceName");
- instanceName.setDefaultValue("New Instance");
- instanceName.addValidationListener(new NotNullValidationListener("Choose a name for the new package instance"));
- button = new Submit("Mount Package");
- button.setButtonLabel("Mount Package");
- add(instanceName);
- add(instruction);
- add(button);
- m_grp.addValidationListener(new NotNullValidationListener("Selecting an Instance to mount"));
- add(m_grp);
- addProcessListener(this);
- }
-
- public void process(FormSectionEvent e)
- {
- SiteNode sn;
- String keyresult;
- PageState s = e.getPageState();
- BigDecimal bd =
- new BigDecimal((String) m_sitenodeselectionmodel.getSelectedKey(s));
- try
- {
- sn = new SiteNode(bd);
-
- //XXX Ugly hack to prevent SiteNode from being thrown away...
- sn.getParent();
-
- keyresult = (String)m_grp.getValue(s);
- PackageType pt = PackageType.findByKey(keyresult);
-
- PackageInstance pi =
- pt.createInstance(instanceName.getValue(s).toString());
- sn.mountPackage(pi);
-
- sn.save();
- }catch(com.arsdigita.domain.DataObjectNotFoundException ed)
- {
- s_log.warn("Problem in MountInstanceForm");
- }
- NodeState n = computeDefaultState(s);
- showActions(n);
- }
-
- }
-
-
-
- /////////////////////////////////////
- //The classes below are impl's of the ActionListener interface
- //and are for the ToggleLinks...
-
- class addSubnodeListener implements com.arsdigita.bebop.event.ActionListener
- {
- public void actionPerformed(ActionEvent event)
- {
- //Here we have to turn off unnecessary links,
- //and turn on the appropriate form.
- PageState p = event.getPageState();
- //ResetDefaults(p);
- m_addSubnodeForm.setVisible(p, true);
- m_setPermissionsLink.setVisible(p, false);
- m_removeNodeLink.setVisible(p, false);
- m_unmountPackageLink.setVisible(p,false);
- m_unmountInstanceForm.setVisible(p,false);
- }
- }
-
- class removeNodeListener implements com.arsdigita.bebop.event.ActionListener
- {
- public void actionPerformed(ActionEvent event)
- {
- //Here we have to turn off unnecessary links,
- //and turn on the appropriate form.
- PageState p = event.getPageState();
- //ResetDefaults(p);
- m_removeNodeForm.setVisible(p, true);
- m_setPermissionsLink.setVisible(p, false);
- m_addSubNodeLink.setVisible(p, false);
- m_unmountPackageLink.setVisible(p,false);
- m_unmountInstanceForm.setVisible(p,false);
- }
- }
-
- class mountPackageListener implements com.arsdigita.bebop.event.ActionListener
- {
- public void actionPerformed(ActionEvent event)
- {
- //Here we have to turn off unnecessary links,
- //and turn on the appropriate form.
- PageState p = event.getPageState();
- m_removeNodeForm.setVisible(p, false);
- m_setPermissionsLink.setVisible(p, false);
- m_addSubNodeLink.setVisible(p, false);
- m_removeNodeLink.setVisible(p, false);
- m_unmountPackageLink.setVisible(p,false);
- m_unmountInstanceForm.setVisible(p,false);
- m_mountInstanceForm.setVisible(p,true);
- }
- }
-
- class unmountPackageListener implements com.arsdigita.bebop.event.ActionListener
- {
- public void actionPerformed(ActionEvent event)
- {
- //Here we have to turn off unnecessary links,
- //and turn on the appropriate form.
- PageState p = event.getPageState();
- //ResetDefaults(p);
- m_removeNodeForm.setVisible(p, false);
- m_setPermissionsLink.setVisible(p, false);
- m_addSubNodeLink.setVisible(p, false);
- m_removeNodeLink.setVisible(p, false);
- m_unmountPackageLink.setVisible(p,false);
- m_unmountInstanceForm.setVisible(p,true);
- m_mountInstanceForm.setVisible(p,false);
- }
- }
-
-}
diff --git a/ccm-core/src/com/arsdigita/ui/sitemap/SiteListing.java.nolongerInUse b/ccm-core/src/com/arsdigita/ui/sitemap/SiteListing.java.nolongerInUse
deleted file mode 100755
index f8db2d9a6..000000000
--- a/ccm-core/src/com/arsdigita/ui/sitemap/SiteListing.java.nolongerInUse
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-package com.arsdigita.ui.sitemap;
-
-
-import com.arsdigita.bebop.BoxPanel;
-import com.arsdigita.bebop.Label;
-import com.arsdigita.bebop.List;
-import com.arsdigita.bebop.PageState;
-import com.arsdigita.bebop.ToggleLink;
-import com.arsdigita.bebop.Tree;
-import com.arsdigita.bebop.event.ActionEvent;
-import com.arsdigita.bebop.event.ActionListener;
-import com.arsdigita.bebop.event.ChangeEvent;
-import com.arsdigita.bebop.event.ChangeListener;
-import com.arsdigita.bebop.tree.TreeModelBuilder;
-import com.arsdigita.kernel.SiteNode;
-import com.arsdigita.ui.util.GlobalizationUtil;
-import com.arsdigita.util.LockableImpl;
-import org.apache.log4j.Logger;
-
-/**
- *
- * @version $Id: SiteListing.java 287 2005-02-22 00:29:02Z sskracic $
- */
-public class SiteListing extends BoxPanel
- implements ChangeListener, ActionListener {
-
- private static final Logger s_log =
- Logger.getLogger(SiteListing.class);
-
- private List m_list;
-
- private Tree m_tree;
-
- private ToggleLink m_addLink;
-
- /**
- * Constructor, builds a list of ....
- */
- public SiteListing () {
- super(BoxPanel.VERTICAL, false);
- SiteNode sn;
- try {
- sn = SiteNode.getSiteNode("/");
- m_tree = new Tree(new SitemapTreeModelBuilder());
- add(new Label(GlobalizationUtil.globalize("ui.sitemap.h4sitemap_treeh4"), false));
- add(m_tree);
- m_tree.addChangeListener(this);
- } catch(com.arsdigita.domain.DataObjectNotFoundException e) {
- s_log.warn ("Problem Creating Site Map Tree");
- e.printStackTrace();
- }
-
- m_addLink = new ToggleLink(new Label(GlobalizationUtil.globalize("ui.sitemap.configure_sitemap_admin_page")));
- add(m_addLink);
- Label l = new Label(GlobalizationUtil.globalize("ui.sitemap.configure_sitemap_admin_page"));
- l.setFontWeight(Label.BOLD);
- m_addLink.setSelectedComponent(l);
- m_addLink.addActionListener(this);
-
- }
-
- /**
- * Getter method.
- *
- * @return Returs a list containing the instantiated applications (nodes)
- */
- public List getList() {
- return m_list;
- }
-
- /**
- * Getter method.
- *
- * @return
- */
- public Tree getTree() {
- return m_tree;
- }
-
- /**
- *
- * @return
- */
- public ToggleLink getCFGLink() {
- return m_addLink;
- }
-
- // List selection has changed
- public void stateChanged(ChangeEvent e) {
- PageState s = e.getPageState();
- if ( m_tree.isSelected(s) ) {
- m_addLink.setSelected(s, false);
- }
- }
-
- // Toggle link has been clicked
- public void actionPerformed(ActionEvent e) {
- PageState s = e.getPageState();
- if ( m_addLink.isSelected(s) ) {
- m_tree.clearSelection(s);
- }
- }
-
- private class SitemapTreeModelBuilder extends LockableImpl
- implements TreeModelBuilder {
-
- public com.arsdigita.bebop.tree.TreeModel makeModel(Tree t, PageState s) {
- return new SiteNodeTreeModel(SiteNode.getRootSiteNode());
- }
- }
-}
diff --git a/ccm-core/src/com/arsdigita/ui/sitemap/SiteMapAdminPane.java.nolongerInUse b/ccm-core/src/com/arsdigita/ui/sitemap/SiteMapAdminPane.java.nolongerInUse
deleted file mode 100755
index 25e6f6b91..000000000
--- a/ccm-core/src/com/arsdigita/ui/sitemap/SiteMapAdminPane.java.nolongerInUse
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-package com.arsdigita.ui.sitemap;
-
-
-import com.arsdigita.ui.util.GlobalizationUtil ;
-
-
-import com.arsdigita.bebop.Label;
-import com.arsdigita.bebop.Page;
-import com.arsdigita.bebop.PageState;
-import com.arsdigita.bebop.SimpleContainer;
-import com.arsdigita.bebop.SingleSelectionModel;
-import com.arsdigita.bebop.ToggleLink;
-import com.arsdigita.bebop.event.ActionListener;
-import com.arsdigita.bebop.event.ActionEvent;
-
-/**
- *
- * @version $Id: SiteMapAdminPane.java 287 2005-02-22 00:29:02Z sskracic $
- */
-public class SiteMapAdminPane extends SimpleContainer
- implements ActionListener {
-
- private SingleSelectionModel m_processes;
- private ToggleLink m_addLink;
-
- private Label m_noSelection;
- private DisplayActions m_displayActions;
- private Label m_cfgSiteMap;
-
- /**
- * Constructor
- *
- * @param m
- * @param l
- */
- public SiteMapAdminPane (SingleSelectionModel m, ToggleLink l) {
- super();
- m_processes = m;
- m_addLink = l;
-
- m_noSelection = new Label(GlobalizationUtil.globalize(
- "ui.sitemap.h4emselect_sitenode_to_view_detailsemh4"), false);
- add(m_noSelection);
-
- m_displayActions = new DisplayActions(m);
- add(m_displayActions);
-
-
- //Have this call a class that outputs the config menu...
- m_cfgSiteMap = new Label(GlobalizationUtil.globalize(
- "ui.sitemap.configuration_menu_placeholder"));
- add(m_cfgSiteMap);
- }
-
- /**
- *
- * @param p
- */
- public void register(Page p) {
- super.register(p);
- p.setVisibleDefault(m_noSelection, true);
- p.setVisibleDefault(m_displayActions, false);
- p.setVisibleDefault(m_cfgSiteMap, false);
- p.addActionListener( this );
- }
-
- /**
- *
- * @param e
- */
- public void actionPerformed(ActionEvent e) {
- PageState s = e.getPageState();
- boolean proc = m_processes.isSelected(s);
- boolean add = m_addLink.isSelected(s);
-
- m_noSelection.setVisible(s, ! ( proc || add ));
- m_displayActions.setVisible(s, proc);
- m_cfgSiteMap.setVisible(s, add);
- }
-
-}
diff --git a/ccm-core/src/com/arsdigita/ui/sitemap/SiteNodeTreeModel.java,nolongerInUse b/ccm-core/src/com/arsdigita/ui/sitemap/SiteNodeTreeModel.java,nolongerInUse
deleted file mode 100755
index 7bc90811c..000000000
--- a/ccm-core/src/com/arsdigita/ui/sitemap/SiteNodeTreeModel.java,nolongerInUse
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-package com.arsdigita.ui.sitemap;
-
-import com.arsdigita.kernel.ui.DataQueryTreeModel;
-import com.arsdigita.kernel.SiteNode;
-
-
-/**
- *
- * @version $Id: SiteNodeTreeModel.java 287 2005-02-22 00:29:02Z sskracic $
- */
-public class SiteNodeTreeModel extends DataQueryTreeModel {
-
- public SiteNodeTreeModel (SiteNode rootSiteNode) {
- super(rootSiteNode.getID(),
- "com.arsdigita.ui.sitemap.getRootNode",
- "com.arsdigita.ui.sitemap.getSubNodes");
- }
-}
diff --git a/ccm-core/src/com/arsdigita/ui/sitemap/package.html b/ccm-core/src/com/arsdigita/ui/sitemap/package.html
deleted file mode 100755
index 4c6805917..000000000
--- a/ccm-core/src/com/arsdigita/ui/sitemap/package.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-com.arsdigita.ui.sitemap
-
-
-
-
- User interface for dynamically updating URL to application
- mappings.
-
-
- This package uses tro large exend the old style application API
- (kernel.Package, kernel.SiteNode, etc) and is deprecated ifself.
- It is replace by ~/portal/admin/sitemap.jsp
-
-
-
diff --git a/ccm-core/src/com/arsdigita/populate.nolongerInUse/PopulateUsers.java.nolongerInUse b/ccm-core/test/src/com/arsdigita/populate/PopulateUsers.java
similarity index 100%
rename from ccm-core/src/com/arsdigita/populate.nolongerInUse/PopulateUsers.java.nolongerInUse
rename to ccm-core/test/src/com/arsdigita/populate/PopulateUsers.java
diff --git a/ccm-core/src/com/arsdigita/populate.nolongerInUse/Utilities.java.nolongerInUse b/ccm-core/test/src/com/arsdigita/populate/Utilities.java
similarity index 100%
rename from ccm-core/src/com/arsdigita/populate.nolongerInUse/Utilities.java.nolongerInUse
rename to ccm-core/test/src/com/arsdigita/populate/Utilities.java
diff --git a/ccm-core/src/com/arsdigita/populate.nolongerInUse/apps.nolongerInUse/AbstractPopulateApp.java.nolongerInUse b/ccm-core/test/src/com/arsdigita/populate/apps/AbstractPopulateApp.java
similarity index 100%
rename from ccm-core/src/com/arsdigita/populate.nolongerInUse/apps.nolongerInUse/AbstractPopulateApp.java.nolongerInUse
rename to ccm-core/test/src/com/arsdigita/populate/apps/AbstractPopulateApp.java
diff --git a/ccm-core/src/com/arsdigita/populate.nolongerInUse/apps.nolongerInUse/Initializer.java.nolongerInUse b/ccm-core/test/src/com/arsdigita/populate/apps/Initializer.java
similarity index 100%
rename from ccm-core/src/com/arsdigita/populate.nolongerInUse/apps.nolongerInUse/Initializer.java.nolongerInUse
rename to ccm-core/test/src/com/arsdigita/populate/apps/Initializer.java
diff --git a/ccm-core/src/com/arsdigita/populate.nolongerInUse/apps.nolongerInUse/PopulateApp.java.nolongerInUse b/ccm-core/test/src/com/arsdigita/populate/apps/PopulateApp.java
similarity index 100%
rename from ccm-core/src/com/arsdigita/populate.nolongerInUse/apps.nolongerInUse/PopulateApp.java.nolongerInUse
rename to ccm-core/test/src/com/arsdigita/populate/apps/PopulateApp.java
diff --git a/ccm-core/src/com/arsdigita/populate.nolongerInUse/apps.nolongerInUse/PopulateAppPair.java.nolongerInUse b/ccm-core/test/src/com/arsdigita/populate/apps/PopulateAppPair.java
similarity index 100%
rename from ccm-core/src/com/arsdigita/populate.nolongerInUse/apps.nolongerInUse/PopulateAppPair.java.nolongerInUse
rename to ccm-core/test/src/com/arsdigita/populate/apps/PopulateAppPair.java
diff --git a/ccm-core/src/com/arsdigita/populate.nolongerInUse/apps.nolongerInUse/PopulateAppPairCollection.java.nolongerInUse b/ccm-core/test/src/com/arsdigita/populate/apps/PopulateAppPairCollection.java
similarity index 100%
rename from ccm-core/src/com/arsdigita/populate.nolongerInUse/apps.nolongerInUse/PopulateAppPairCollection.java.nolongerInUse
rename to ccm-core/test/src/com/arsdigita/populate/apps/PopulateAppPairCollection.java
diff --git a/ccm-core/src/com/arsdigita/populate.nolongerInUse/apps.nolongerInUse/PopulateApps.java.nolongerInUse b/ccm-core/test/src/com/arsdigita/populate/apps/PopulateApps.java
similarity index 100%
rename from ccm-core/src/com/arsdigita/populate.nolongerInUse/apps.nolongerInUse/PopulateApps.java.nolongerInUse
rename to ccm-core/test/src/com/arsdigita/populate/apps/PopulateApps.java
diff --git a/ccm-core/src/com/arsdigita/populate.nolongerInUse/portlets.nolongerInUse/AbstractPopulatePortlet.java.nolongerInUse b/ccm-core/test/src/com/arsdigita/populate/portlets/AbstractPopulatePortlet.java
similarity index 100%
rename from ccm-core/src/com/arsdigita/populate.nolongerInUse/portlets.nolongerInUse/AbstractPopulatePortlet.java.nolongerInUse
rename to ccm-core/test/src/com/arsdigita/populate/portlets/AbstractPopulatePortlet.java
diff --git a/ccm-core/src/com/arsdigita/populate.nolongerInUse/portlets.nolongerInUse/PopulatePortlet.java.nolongerInUse b/ccm-core/test/src/com/arsdigita/populate/portlets/PopulatePortlet.java
similarity index 100%
rename from ccm-core/src/com/arsdigita/populate.nolongerInUse/portlets.nolongerInUse/PopulatePortlet.java.nolongerInUse
rename to ccm-core/test/src/com/arsdigita/populate/portlets/PopulatePortlet.java
diff --git a/ccm-core/src/com/arsdigita/populate.nolongerInUse/portlets.nolongerInUse/PopulatePortletCollection.java.nolongerInUse b/ccm-core/test/src/com/arsdigita/populate/portlets/PopulatePortletCollection.java
similarity index 100%
rename from ccm-core/src/com/arsdigita/populate.nolongerInUse/portlets.nolongerInUse/PopulatePortletCollection.java.nolongerInUse
rename to ccm-core/test/src/com/arsdigita/populate/portlets/PopulatePortletCollection.java
diff --git a/ccm-core/src/com/arsdigita/populate.nolongerInUse/portlets.nolongerInUse/PopulatePortlets.java.nolongerInUse b/ccm-core/test/src/com/arsdigita/populate/portlets/PopulatePortlets.java
similarity index 100%
rename from ccm-core/src/com/arsdigita/populate.nolongerInUse/portlets.nolongerInUse/PopulatePortlets.java.nolongerInUse
rename to ccm-core/test/src/com/arsdigita/populate/portlets/PopulatePortlets.java
diff --git a/ccm-core/web/WEB-INF/portlet.xml b/ccm-core/web/WEB-INF/portlet.xml
new file mode 100644
index 000000000..d1cc233d9
--- /dev/null
+++ b/ccm-core/web/WEB-INF/portlet.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/ccm-sci-bundle/bundles/devel/cfg/project.xml b/ccm-sci-bundle/bundles/devel/cfg/project.xml
index 993271851..0ba757eb4 100644
--- a/ccm-sci-bundle/bundles/devel/cfg/project.xml
+++ b/ccm-sci-bundle/bundles/devel/cfg/project.xml
@@ -10,8 +10,9 @@
prettyName="Scientific CMS"
version="2.3.0"
release="devel-SNAPSHOT-r2620"
- webxml="web-sci.xml"
- webapp="ROOT"
+ webxml="sci-web.xml"
+ portletxml="sci-portlet.xml"
+ webapp="libreccm"
xsi:schemaLocation="http://ccm.redhat.com/ccm-project file:tools-ng/common/xsd/project.xsd">
diff --git a/ccm-cms/web/WEB-INF/portlet.xml b/ccm-sci-bundle/bundles/devel/cfg/sci-portlet.xml
similarity index 100%
rename from ccm-cms/web/WEB-INF/portlet.xml
rename to ccm-sci-bundle/bundles/devel/cfg/sci-portlet.xml
diff --git a/ccm-sci-bundle/bundles/devel/cfg/web-sci-woPluto.xml b/ccm-sci-bundle/bundles/devel/cfg/sci-web-woPluto.xml
similarity index 100%
rename from ccm-sci-bundle/bundles/devel/cfg/web-sci-woPluto.xml
rename to ccm-sci-bundle/bundles/devel/cfg/sci-web-woPluto.xml
diff --git a/ccm-sci-bundle/bundles/devel/cfg/web-sci.xml b/ccm-sci-bundle/bundles/devel/cfg/sci-web.xml
similarity index 100%
rename from ccm-sci-bundle/bundles/devel/cfg/web-sci.xml
rename to ccm-sci-bundle/bundles/devel/cfg/sci-web.xml
diff --git a/tools-ng/common/xsl/build-template.xsl b/tools-ng/common/xsl/build-template.xsl
index 0fa319634..fb31a804c 100755
--- a/tools-ng/common/xsl/build-template.xsl
+++ b/tools-ng/common/xsl/build-template.xsl
@@ -205,6 +205,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1226,9 +1248,11 @@
+
+ and determines its fully qualified file name. Uses copy-bundle-init to
+ ensure the proper installation bundle.
+ Property "resolved.webxml.source.file" is set to the source. -->
@@ -1311,9 +1335,72 @@
+
+
+
+ portlet.xml done.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${resolved.portletxml.source.file} copied to ${this.deploy.dir}/WEB-INF/portlet.xml
+
+
+
+
+ Merging portlet.xml, not implemented yet.
+
+
+
+
-
+
+
+
-
@@ -1399,7 +1488,7 @@
+ depends="init,deploy-global,deploy-local,copy-webxml,build-portletxml,copy-bundle">
Builds and deploys all applications, also deploys prebuilt applications and config files