Author: julien(a)jboss.com
Date: 2007-05-21 08:17:37 -0400 (Mon, 21 May 2007)
New Revision: 7292
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ContextImpl.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/DashboardContext.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalContainer.java
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java
Log:
minor update of DashboardContext class
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ContextImpl.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ContextImpl.java 2007-05-21
11:41:17 UTC (rev 7291)
+++
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ContextImpl.java 2007-05-21
12:17:37 UTC (rev 7292)
@@ -78,22 +78,22 @@
return null;
}
- public PortalContainer createPortalContainer(String name) throws
DuplicatePortalObjectException
- {
- ContextImpl portalContainer = new ContextImpl(false);
- addChild(name, portalContainer);
- return portalContainer;
- }
+// public PortalContainer createPortalContainer(String name) throws
DuplicatePortalObjectException
+// {
+// ContextImpl portalContainer = new ContextImpl(false);
+// addChild(name, portalContainer);
+// return portalContainer;
+// }
- public PortalContainer getPortalContainer(String name) throws
IllegalArgumentException
- {
- PortalObject child = getChild(name);
- if (child instanceof PortalContainer)
- {
- return (PortalContainer)child;
- }
- return null;
- }
+// public PortalContainer getPortalContainer(String name) throws
IllegalArgumentException
+// {
+// PortalObject child = getChild(name);
+// if (child instanceof PortalContainer)
+// {
+// return (PortalContainer)child;
+// }
+// return null;
+// }
public int getType()
{
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/DashboardContext.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/DashboardContext.java 2007-05-21
11:41:17 UTC (rev 7291)
+++
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/DashboardContext.java 2007-05-21
12:17:37 UTC (rev 7292)
@@ -22,23 +22,138 @@
******************************************************************************/
package org.jboss.portal.core.impl.model.portal;
+import org.jboss.portal.core.model.portal.Context;
+
+import java.util.Collection;
+
/**
+ * An implementation of the <code>Context</code> interface for dashboards.
+ *
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class DashboardContext
+public abstract class DashboardContext implements Context
{
- /** . */
- private final String id;
- public DashboardContext(String id)
+
+
+
+ public Collection getChildren()
{
- this.id = id;
+ throw new UnsupportedOperationException();
}
- public String getId()
+ public Collection getChildren(int mask)
{
- return id;
+ throw new UnsupportedOperationException();
}
+
+
+
+//
+// public Portal getPortal(String name) throws IllegalArgumentException
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public Portal createPortal(String name) throws DuplicatePortalObjectException,
IllegalArgumentException
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public Portal getDefaultPortal()
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public PortalContainer getPortalContainer(String name) throws
IllegalArgumentException
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public PortalContainer createPortalContainer(String name) throws
DuplicatePortalObjectException, IllegalArgumentException
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public PortalObjectId getId()
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public int getType()
+// {
+// return 0; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public String getName()
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public String getListener()
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public void setListener(String listener)
+// {
+// //To change body of implemented methods use File | Settings | File Templates.
+// }
+//
+// public Collection getChildren()
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public Collection getChildren(int mask)
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public PortalObject getParent()
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public PortalObject getChild(String name)
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public void destroyChild(String name) throws NoSuchPortalObjectException,
IllegalArgumentException
+// {
+// //To change body of implemented methods use File | Settings | File Templates.
+// }
+//
+// public PortalObject copy(PortalObject parent, String name, boolean deep) throws
DuplicatePortalObjectException, IllegalArgumentException
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public String getProperty(String name) throws IllegalArgumentException
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public Map getProperties()
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public String getDeclaredProperty(String name) throws IllegalArgumentException
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
+//
+// public void setDeclaredProperty(String name, String value) throws
IllegalArgumentException
+// {
+// //To change body of implemented methods use File | Settings | File Templates.
+// }
+//
+// public Map getDeclaredProperties()
+// {
+// return null; //To change body of implemented methods use File | Settings | File
Templates.
+// }
}
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-05-21
11:41:17 UTC (rev 7291)
+++
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-05-21
12:17:37 UTC (rev 7292)
@@ -69,7 +69,7 @@
private Map childrenMap;
private Map properties;
private Map unmodifiableProperties;
- private DashboardContext dashboardContext;
+// private DashboardContext dashboardContext;
public PortalObjectImpl()
{
@@ -438,10 +438,10 @@
return (String)properties.get(name);
}
- public final boolean isDashboard()
- {
- return getDashboardContext() != null;
- }
+// public final boolean isDashboard()
+// {
+// return getDashboardContext() != null;
+// }
public abstract int getType();
@@ -514,33 +514,33 @@
}
}
- protected final DashboardContext getDashboardContext()
- {
- if (dashboardContext == null)
- {
- // Get parent object
- PortalObjectImpl parent = (PortalObjectImpl)getParent();
+// protected final DashboardContext getDashboardContext()
+// {
+// if (dashboardContext == null)
+// {
+// // Get parent object
+// PortalObjectImpl parent = (PortalObjectImpl)getParent();
+//
+// // We need the parent to find out the context details
+// if (this instanceof ContextImpl)
+// {
+// String dashboard = getDeclaredProperty("dashboard");
+// if ("true".equals(dashboard))
+// {
+// String dashboardId = getName();
+// dashboardContext = new DashboardContext(dashboardId);
+// }
+// }
+// else if (parent != null)
+// {
+// dashboardContext = parent.getDashboardContext();
+// }
+// }
+//
+// //
+// return dashboardContext;
+// }
- // We need the parent to find out the context details
- if (this instanceof ContextImpl)
- {
- String dashboard = getDeclaredProperty("dashboard");
- if ("true".equals(dashboard))
- {
- String dashboardId = getName();
- dashboardContext = new DashboardContext(dashboardId);
- }
- }
- else if (parent != null)
- {
- dashboardContext = parent.getDashboardContext();
- }
- }
-
- //
- return dashboardContext;
- }
-
protected final void addChild(String name, PortalObjectImpl childObject) throws
DuplicatePortalObjectException, IllegalArgumentException
{
objectNode.addChild(name, childObject);
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/PortalContainer.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/PortalContainer.java 2007-05-21
11:41:17 UTC (rev 7291)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/PortalContainer.java 2007-05-21
12:17:37 UTC (rev 7292)
@@ -57,24 +57,22 @@
*/
Portal getDefaultPortal();
- /**
- * Returns an existing portal container or null if such a child does not exist or does
not have the appropriate type.
- *
- * @param name the portal container name
- * @return the specified portal container
- * @throws IllegalArgumentException if the specified name is null
- */
- PortalContainer getPortalContainer(String name) throws IllegalArgumentException;
-
- /**
- * Creates a new portal container.
- *
- * @param name the portal container name
- * @return the newly created portal container
- * @throws DuplicatePortalObjectException if a child with the specified name already
exists
- * @throws IllegalArgumentException if the name argument is null
- */
- PortalContainer createPortalContainer(String name) throws
DuplicatePortalObjectException, IllegalArgumentException;
-
-
+// /**
+// * Returns an existing portal container or null if such a child does not exist or
does not have the appropriate type.
+// *
+// * @param name the portal container name
+// * @return the specified portal container
+// * @throws IllegalArgumentException if the specified name is null
+// */
+// PortalContainer getPortalContainer(String name) throws IllegalArgumentException;
+//
+// /**
+// * Creates a new portal container.
+// *
+// * @param name the portal container name
+// * @return the newly created portal container
+// * @throws DuplicatePortalObjectException if a child with the specified name already
exists
+// * @throws IllegalArgumentException if the name argument is null
+// */
+// PortalContainer createPortalContainer(String name) throws
DuplicatePortalObjectException, IllegalArgumentException;
}
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java 2007-05-21
11:41:17 UTC (rev 7291)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java 2007-05-21
12:17:37 UTC (rev 7292)
@@ -187,10 +187,10 @@
*/
Map getDeclaredProperties();
- /**
- * Return true if the portal object is part of a dashboard.
- *
- * @return if it is a dashboard
- */
- boolean isDashboard();
+// /**
+// * Return true if the portal object is part of a dashboard.
+// *
+// * @return if it is a dashboard
+// */
+// boolean isDashboard();
}
Show replies by date