Author: julien_viet
Date: 2010-04-27 16:45:20 -0400 (Tue, 27 Apr 2010)
New Revision: 2847
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/WorkspaceObjectImpl.java
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/workspace/WorkspaceTestCase.java
Log:
GTNMOP-24: Implement getName() method on a few mop objects
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/WorkspaceObjectImpl.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/WorkspaceObjectImpl.java 2010-04-27
19:15:47 UTC (rev 2846)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/WorkspaceObjectImpl.java 2010-04-27
20:45:20 UTC (rev 2847)
@@ -61,6 +61,11 @@
return model.getAdapter(this, adaptedType, false) != null;
}
+ public String getName()
+ {
+ return getNodeName();
+ }
+
@Override
public String toString()
{
Modified:
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/workspace/WorkspaceTestCase.java
===================================================================
---
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/workspace/WorkspaceTestCase.java 2010-04-27
19:15:47 UTC (rev 2846)
+++
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/workspace/WorkspaceTestCase.java 2010-04-27
20:45:20 UTC (rev 2847)
@@ -50,6 +50,7 @@
Workspace workspace = model.getWorkspace();
Site site = workspace.addSite(ObjectType.GROUP_SITE, "site");
assertNotNull(site);
+ assertEquals("site", site.getName());
Site s2 = model.findObjectById(ObjectType.SITE, site.getObjectId());
assertEquals(site, s2);
assertEquals(workspace, site.getWorkspace());
Show replies by date