Author: weaver
Date: Wed Aug 17 11:04:24 2005
New Revision: 233225
URL: http://svn.apache.org/viewcvs?rev=233225&view=rev
Log:
- Extracted Defaults into an interface.
- Added ability to access Defaults from the Page interface
Added:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/page/Defaults.java
- copied, changed from r232284,
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/Defaults.java
Modified:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/page/Page.java
Copied:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/page/Defaults.java
(from r232284,
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/Defaults.java)
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/page/Defaults.java?p2=portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/page/Defaults.java&p1=portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/Defaults.java&r1=232284&r2=233225&rev=233225&view=diff
==============================================================================
---
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/Defaults.java
(original)
+++
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/page/Defaults.java
Wed Aug 17 11:04:24 2005
@@ -1,76 +1,17 @@
-/*
- * Copyright 2000-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.jetspeed.om.page.psml;
-
-// Java imports
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * @version $Id$
- */
-public class Defaults
-{
-
- private String skin = null;
- private Map decoratorMap = new HashMap();
-
- public Defaults()
- {
- }
-
- public String getSkin()
- {
- return this.skin;
- }
-
- public void setSkin(String skin)
- {
- this.skin = skin;
- }
-
- public String getDecorator(String type)
- {
- return (String)decoratorMap.get(type);
- }
-
- public void setDecorator(String type, String decorator)
- {
- decoratorMap.put(type,decorator);
- }
-
- public String getLayoutDecorator()
- {
- return getDecorator("layout");
- }
-
- public void setLayoutDecorator(String decorator)
- {
- setDecorator("layout",decorator);
- }
-
- public String getPortletDecorator()
- {
- return getDecorator("portlet");
- }
-
- public void setPortletDecorator(String decorator)
- {
- setDecorator("portlet",decorator);
- }
+
+package org.apache.jetspeed.om.page;
+
+
+
+
+public interface Defaults {
+
+ public String getSkin();
+
+ public String getDecorator(String type);
+
+ public String getLayoutDecorator();
+
+ public String getPortletDecorator();
}
Modified:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/page/Page.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/page/Page.java?rev=233225&r1=233224&r2=233225&view=diff
==============================================================================
---
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/page/Page.java
(original)
+++
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/om/page/Page.java
Wed Aug 17 11:04:24 2005
@@ -17,6 +17,8 @@
import java.util.List;
+import org.apache.jetspeed.om.page.psml.DefaultsImpl;
+
/**
* This interface represents a complete page document used by Jetspeed
* to layout a user-customizable portal page.
@@ -107,5 +109,11 @@
* @param definitions definition list
*/
void setMenuDefinitions(List definitions);
+
+ /**
+ * Returns the defaults object defined for this page.
+ * @return
+ */
+ Defaults getDefaults();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]