Author: julien(a)jboss.com
Date: 2007-11-27 11:59:31 -0500 (Tue, 27 Nov 2007)
New Revision: 9132
Modified:
branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/model/StructuralStateManagerImpl.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/UIController.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIContextImpl.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/structural/StructuralStateManager.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModel.java
Log:
- forgot to add state update in StructuralStateManager
Modified:
branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/model/StructuralStateManagerImpl.java
===================================================================
---
branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/model/StructuralStateManagerImpl.java 2007-11-27
16:55:35 UTC (rev 9131)
+++
branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/model/StructuralStateManagerImpl.java 2007-11-27
16:59:31 UTC (rev 9132)
@@ -82,7 +82,7 @@
/**
*
*/
- public ObjectState loadState(String objectId) throws IllegalArgumentException
+ public ObjectState load(String objectId) throws IllegalArgumentException
{
ObjectState objectState = null;
@@ -157,7 +157,7 @@
return type;
}
- public ObjectState createState(String parentId, Class<? extends UIObject> type,
String name, Map<String, String> properties) throws StateChangeVetoException
+ public ObjectState create(String parentId, Class<? extends UIObject> type,
String name, Map<String, String> properties) throws StateChangeVetoException
{
throw new StateChangeVetoException();
}
@@ -172,6 +172,11 @@
throw new StateChangeVetoException();
}
+ public void update(Map<String, String> properties) throws
StateChangeVetoException
+ {
+ throw new StateChangeVetoException();
+ }
+
/**
*
*
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/UIController.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/UIController.java 2007-11-27
16:55:35 UTC (rev 9131)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/UIController.java 2007-11-27
16:59:31 UTC (rev 9132)
@@ -307,7 +307,7 @@
String token = st.nextToken();
buffer.append(token);
String id = buffer.toString();
- ObjectState objectState =
this.presentationServer.getStructuralStateManager().loadState(id);
+ ObjectState objectState =
this.presentationServer.getStructuralStateManager().load(id);
if(objectState != null && objectState.getType() == UIPortal.class)
{
targetPortal = (UIPortal)requestContext.getUIContext().getObject(id);
@@ -336,7 +336,7 @@
String token = st.nextToken();
buffer.append(token);
String id = buffer.toString();
- ObjectState objectState =
this.presentationServer.getStructuralStateManager().loadState(id);
+ ObjectState objectState =
this.presentationServer.getStructuralStateManager().load(id);
if(objectState != null)
{
if(objectState.getType() == UIPage.class)
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIContextImpl.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIContextImpl.java 2007-11-27
16:55:35 UTC (rev 9131)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIContextImpl.java 2007-11-27
16:59:31 UTC (rev 9132)
@@ -56,7 +56,7 @@
private static ObjectState getRootState(StructuralStateManager loader)
{
- return loader.loadState(loader.getRootId());
+ return loader.load(loader.getRootId());
}
public UIContextImpl(StructuralStateManager structuralStateManager)
@@ -81,7 +81,7 @@
if (object == null)
{
//Fetch the state of the UIObject in question
- ObjectState objectState = this.structuralStateManager.loadState(id);
+ ObjectState objectState = this.structuralStateManager.load(id);
object = getImplementation(id, objectState);
objects.put(id, object);
}
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2007-11-27
16:55:35 UTC (rev 9131)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2007-11-27
16:59:31 UTC (rev 9132)
@@ -270,7 +270,7 @@
// ((UIObjectImpl)child).id = this.generateChildId(name);
//
// //State
-// ((UIObjectImpl)child).state =
this.getUIContext().getStructuralStateManager().loadState(((UIObjectImpl)child).id);
+// ((UIObjectImpl)child).state =
this.getUIContext().getStructuralStateManager().load(((UIObjectImpl)child).id);
//
// this.children.add(child);
//
@@ -312,7 +312,7 @@
// //Parent..load using parentId from state being used
// if(loadParent && state.getParentId() != null &&
state.getParentId().trim().length()>0)
// {
-// ObjectState parentState =
uiContext.getStructuralStateManager().loadState(state.getParentId());
+// ObjectState parentState =
uiContext.getStructuralStateManager().load(state.getParentId());
// this.parent = uiContext.getObject(state.getParentId(),
parentState.getType());
// }
//
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/structural/StructuralStateManager.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/structural/StructuralStateManager.java 2007-11-27
16:55:35 UTC (rev 9131)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/structural/StructuralStateManager.java 2007-11-27
16:59:31 UTC (rev 9132)
@@ -43,14 +43,16 @@
* @return the state of the object or null if such state does not exist
* @throws IllegalArgumentException if the object id argument is null
*/
- ObjectState loadState(String objectId) throws IllegalArgumentException;
+ ObjectState load(String objectId) throws IllegalArgumentException;
String getRootId();
- ObjectState createState(String parentId, Class<? extends UIObject> type, String
name, Map<String, String> properties) throws StateChangeVetoException;
+ ObjectState create(String parentId, Class<? extends UIObject> type, String name,
Map<String, String> properties) throws StateChangeVetoException;
void destroy(String objectId) throws StateChangeVetoException;
void move(String objectId, String parentId) throws StateChangeVetoException;
+ void update(Map<String, String> properties) throws StateChangeVetoException;
+
}
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModel.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModel.java 2007-11-27
16:55:35 UTC (rev 9131)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModel.java 2007-11-27
16:59:31 UTC (rev 9132)
@@ -53,7 +53,7 @@
return context;
}
- public ObjectState loadState(String objectId) throws IllegalArgumentException
+ public ObjectState load(String objectId) throws IllegalArgumentException
{
if (objectId == null)
{
@@ -180,7 +180,7 @@
}
}
- public ObjectState createState(String parentId, Class<? extends UIObject> type,
String name, Map<String, String> properties) throws StateChangeVetoException
+ public ObjectState create(String parentId, Class<? extends UIObject> type,
String name, Map<String, String> properties) throws StateChangeVetoException
{
throw new StateChangeVetoException();
}
@@ -194,4 +194,9 @@
{
throw new StateChangeVetoException();
}
+
+ public void update(Map<String, String> properties) throws
StateChangeVetoException
+ {
+ throw new StateChangeVetoException();
+ }
}