From: <pb...@fe...> - 2012-12-22 10:11:11
|
Author: pboy Date: 2012-12-22 10:11:00 +0000 (Sat, 22 Dec 2012) New Revision: 2430 Modified: contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/Initializer.java contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/AddPortletType.java contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/FilteredItemListPortlet.java contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/FilteredItemListPortletEditor.java contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/FilteredItemListPortletRenderer.java contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/SelectedFile.java contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/SelectedMonth.java Log: First parft of update to version 2, fixed all syntactic errors. Not yet ready to compile! Modified: contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/Initializer.java =================================================================== --- contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/Initializer.java 2012-12-22 10:09:42 UTC (rev 2429) +++ contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/Initializer.java 2012-12-22 10:11:00 UTC (rev 2430) @@ -49,6 +49,9 @@ private static Logger s_log = Logger.getLogger (Initializer.class.getName()); + /** + * Constructor + */ public Initializer() { final String url = RuntimeConfig.getConfig().getJDBCURL(); final int database = DbHelper.getDatabaseFromURL(url); Modified: contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/AddPortletType.java =================================================================== --- contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/AddPortletType.java 2012-12-22 10:09:42 UTC (rev 2429) +++ contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/AddPortletType.java 2012-12-22 10:11:00 UTC (rev 2430) @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2001-2012 London Borough of Camden 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 uk.gov.camden.aplaws.intranet.portal; import org.apache.commons.cli.CommandLine; @@ -5,7 +23,7 @@ import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.KernelExcursion; -import com.arsdigita.london.util.Program; +import com.arsdigita.util.cmd.Program; import com.arsdigita.london.util.Transaction; import com.arsdigita.portal.PortletType; Modified: contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/FilteredItemListPortlet.java =================================================================== --- contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/FilteredItemListPortlet.java 2012-12-22 10:09:42 UTC (rev 2429) +++ contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/FilteredItemListPortlet.java 2012-12-22 10:11:00 UTC (rev 2430) @@ -1,15 +1,36 @@ +/* + * Copyright (C) 2001-2012 London Borough of Camden 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 uk.gov.camden.aplaws.intranet.portal; -import javax.servlet.http.HttpServletRequest; - import com.arsdigita.bebop.portal.AbstractPortletRenderer; -import com.arsdigita.london.navigation.DataCollectionDefinition; -import com.arsdigita.london.navigation.portlet.ItemListPortlet; +import com.arsdigita.navigation.DataCollectionDefinition; +import com.arsdigita.navigation.portlet.ItemListPortlet; import com.arsdigita.persistence.DataObject; import com.arsdigita.util.StringUtils; import com.arsdigita.web.Web; +import javax.servlet.http.HttpServletRequest; +/** + * + * @author unkown + */ public class FilteredItemListPortlet extends ItemListPortlet { public static final String BASE_DATA_OBJECT_TYPE = @@ -17,10 +38,18 @@ public static final String CUSTOM_FILTER = "customFilter"; + /** + * + * @param dobj + */ public FilteredItemListPortlet(DataObject dobj) { super(dobj); } + /** + * + * @param customFilter + */ public void setCustomFilter(String customFilter) { set(CUSTOM_FILTER, customFilter); } @@ -28,6 +57,7 @@ /** * Apply custom column sorting from the request parameter. */ + @Override public String getOrdering() { String ordering = super.getOrdering(); HttpServletRequest req = Web.getRequest(); @@ -45,14 +75,29 @@ return ordering; } + /** + * + * @return + */ public String getCustomFilter() { return (String)get(CUSTOM_FILTER); } + + /** + * + * @return + */ + @Override protected DataCollectionDefinition newDataCollectionDefinition() { return new FilteredCMSDataCollectionDefinition(); } + /** + * + * @return + */ + @Override public DataCollectionDefinition getDataCollectionDefinition() { FilteredCMSDataCollectionDefinition def = (FilteredCMSDataCollectionDefinition) super.getDataCollectionDefinition(); @@ -62,6 +107,11 @@ return def; } + /** + * + * @return + */ + @Override protected AbstractPortletRenderer doGetPortletRenderer() { return new FilteredItemListPortletRenderer(this); } Modified: contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/FilteredItemListPortletEditor.java =================================================================== --- contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/FilteredItemListPortletEditor.java 2012-12-22 10:09:42 UTC (rev 2429) +++ contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/FilteredItemListPortletEditor.java 2012-12-22 10:11:00 UTC (rev 2430) @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2001-2012 London Borough of Camden 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 uk.gov.camden.aplaws.intranet.portal; import java.util.TooManyListenersException; @@ -21,25 +39,41 @@ import com.arsdigita.cms.ContentTypeCollection; import com.arsdigita.cms.contentassets.FileAttachment; import com.arsdigita.kernel.ResourceType; -import com.arsdigita.london.navigation.portlet.ItemListPortlet; -import com.arsdigita.london.navigation.ui.portlet.ItemListPortletEditor; -import com.arsdigita.london.navigation.ui.portlet.ItemListPortletEditor.ItemTypePrintListener; +import com.arsdigita.navigation.portlet.ItemListPortlet; +import com.arsdigita.navigation.ui.portlet.ItemListPortletEditor; +import com.arsdigita.navigation.ui.portlet.ItemListPortletEditor.ItemTypePrintListener; import com.arsdigita.portal.Portlet; import com.arsdigita.util.UncheckedWrapperException; +/** + * + * + */ public class FilteredItemListPortletEditor extends ItemListPortletEditor { private TextField customFilter; + /** + * + * @param resType + * @param parentAppRL + */ public FilteredItemListPortletEditor(ResourceType resType, RequestLocal parentAppRL) { super(resType, parentAppRL); } + /** + * + * @param application + */ public FilteredItemListPortletEditor(RequestLocal application) { super(application); } + /** + * + */ protected void addWidgets() { super.addWidgets(); @@ -48,14 +82,28 @@ add(customFilter); } + /** + * + * @return + */ protected PrintListener getBaseObjectTypes() { return new FAItemTypePrintListener(true); } + /** + * + * @return + */ protected PrintListener getRestrictedObjectTypes() { return new FAItemTypePrintListener(false); } + /** + * + * @param state + * @param portlet + * @throws FormProcessException + */ protected void initWidgets(PageState state, Portlet portlet) throws FormProcessException { @@ -69,6 +117,12 @@ } } + /** + * + * @param state + * @param portlet + * @throws FormProcessException + */ protected void processWidgets(PageState state, Portlet portlet) throws FormProcessException { @@ -78,12 +132,23 @@ myportlet.setCustomFilter((String)customFilter.getValue(state)); } + /** + * + */ public static class FAItemTypePrintListener extends ItemTypePrintListener { + /** + * + * @param all + */ public FAItemTypePrintListener(boolean all) { super(all); } + /** + * + * @param ev + */ public void prepare(PrintEvent ev) { super.prepare(ev); OptionGroup target = (OptionGroup)ev.getTarget(); Modified: contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/FilteredItemListPortletRenderer.java =================================================================== --- contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/FilteredItemListPortletRenderer.java 2012-12-22 10:09:42 UTC (rev 2429) +++ contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/FilteredItemListPortletRenderer.java 2012-12-22 10:11:00 UTC (rev 2430) @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2001-2012 London Borough of Camden 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 uk.gov.camden.aplaws.intranet.portal; import javax.servlet.http.HttpServletRequest; @@ -4,25 +22,42 @@ import org.apache.log4j.Logger; -import com.arsdigita.london.navigation.DataCollectionRenderer; -import com.arsdigita.london.navigation.ui.portlet.ItemListPortletRenderer; +import com.arsdigita.navigation.DataCollectionRenderer; +import com.arsdigita.navigation.ui.portlet.ItemListPortletRenderer; import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.web.Web; import com.arsdigita.xml.Element; +/** + * + * @author unknown + */ public class FilteredItemListPortletRenderer extends ItemListPortletRenderer { private static final Logger s_log = Logger.getLogger(FilteredItemListPortletRenderer.class); + /** + * + * @param portlet + */ public FilteredItemListPortletRenderer(FilteredItemListPortlet portlet) { super(portlet); } + + /** + * + * @return + */ protected DataCollectionRenderer newDataCollectionRenderer() { return new DataCollectionRenderer(); } + /** + * + * @return + */ protected int getPageNumber() { HttpServletRequest req = Web.getRequest(); int pageNumber = 1; Modified: contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/SelectedFile.java =================================================================== --- contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/SelectedFile.java 2012-12-22 10:09:42 UTC (rev 2429) +++ contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/SelectedFile.java 2012-12-22 10:11:00 UTC (rev 2430) @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2001-2012 London Borough of Camden 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 uk.gov.camden.aplaws.intranet.portal; import java.math.BigDecimal; @@ -13,10 +31,14 @@ import com.arsdigita.cms.contentassets.FileAttachment; import com.arsdigita.cms.dispatcher.SimpleXMLGenerator; import com.arsdigita.domain.DomainObjectXMLRenderer; -import com.arsdigita.london.navigation.Navigation; -import com.arsdigita.london.navigation.ui.AbstractComponent; +import com.arsdigita.navigation.Navigation; +import com.arsdigita.navigation.ui.AbstractComponent; import com.arsdigita.xml.Element; +/** + * + * + */ public class SelectedFile extends AbstractComponent { private String paramName; @@ -24,11 +46,20 @@ private static final Logger s_log = Logger.getLogger(SelectedFile.class); + /** + * + */ public void setParamName(String paramName) { // Assert !isLocked() this.paramName = paramName; } + /** + * + * @param request + * @param response + * @return + */ public Element generateXML(HttpServletRequest request, HttpServletResponse response) { Modified: contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/SelectedMonth.java =================================================================== --- contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/SelectedMonth.java 2012-12-22 10:09:42 UTC (rev 2429) +++ contrib/camden/ccm-ldn-camden-aplaws/src/uk/gov/camden/aplaws/intranet/portal/SelectedMonth.java 2012-12-22 10:11:00 UTC (rev 2430) @@ -1,5 +1,29 @@ +/* + * Copyright (C) 2001-2012 London Borough of Camden 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 uk.gov.camden.aplaws.intranet.portal; +import com.arsdigita.navigation.Navigation; +import com.arsdigita.navigation.ui.AbstractComponent; +import com.arsdigita.persistence.DataQuery; +import com.arsdigita.persistence.SessionManager; +import com.arsdigita.xml.Element; + import java.math.BigDecimal; import java.util.Calendar; import java.util.Date; @@ -9,12 +33,11 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import com.arsdigita.london.navigation.Navigation; -import com.arsdigita.london.navigation.ui.AbstractComponent; -import com.arsdigita.persistence.DataQuery; -import com.arsdigita.persistence.SessionManager; -import com.arsdigita.xml.Element; +/** + * + * + */ public class SelectedMonth extends AbstractComponent { private String paramName; @@ -38,6 +61,12 @@ this.catID = new BigDecimal(filterCategoryID); } + /** + * + * @param request + * @param response + * @return + */ public Element generateXML(HttpServletRequest request, HttpServletResponse response) { // example output: // <nav:calendar firstWeekday="2" id="calendar" lastDay="31" month="1" [day="19"] year="2007" |