Author: julien_viet
Date: 2009-10-24 10:00:56 -0400 (Sat, 24 Oct 2009)
New Revision: 418
Modified:
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PageNavigationTask.java
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PageTask.java
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PortalConfigTask.java
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/NavigationData.java
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/NavigationKey.java
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/OwnerKey.java
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PageData.java
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PageKey.java
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PortalData.java
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PortalKey.java
Log:
minor renaming
Modified:
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PageNavigationTask.java
===================================================================
---
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PageNavigationTask.java 2009-10-24
13:57:58 UTC (rev 417)
+++
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PageNavigationTask.java 2009-10-24
14:00:56 UTC (rev 418)
@@ -48,7 +48,7 @@
protected PageNavigationTask(NavigationKey key)
{
this.key = key;
- this.siteType = Mapper.parseSiteType(key.getOwnerType());
+ this.siteType = Mapper.parseSiteType(key.getType());
}
public static class Load extends PageNavigationTask implements
CacheableDataTask<NavigationKey, NavigationData>
@@ -95,7 +95,7 @@
public void run(POMSession session) throws Exception
{
Workspace workspace = session.getWorkspace();
- Site site = workspace.getSite(siteType, key.getOwnerId());
+ Site site = workspace.getSite(siteType, key.getId());
if (site != null)
{
Navigation nav = site.getRootNavigation();
@@ -107,7 +107,7 @@
}
else
{
- System.out.println("Cannot load page navigation as the corresponding
portal " + key.getOwnerId()
+ System.out.println("Cannot load page navigation as the corresponding
portal " + key.getId()
+ " with type " + siteType + " does not exist");
}
}
@@ -115,7 +115,7 @@
@Override
public String toString()
{
- return "PageNavigation.Load[ownerType=" + key.getOwnerType() +
",ownerId=" + key.getOwnerId() + "]";
+ return "PageNavigation.Load[ownerType=" + key.getType() +
",ownerId=" + key.getId() + "]";
}
}
@@ -165,11 +165,11 @@
public void run(POMSession session) throws Exception
{
Workspace workspace = session.getWorkspace();
- Site site = workspace.getSite(siteType, key.getOwnerId());
+ Site site = workspace.getSite(siteType, key.getId());
if (site == null)
{
throw new IllegalArgumentException("Cannot insert page navigation
"
- + " as the corresponding portal " + key.getOwnerId() + "
with type " + siteType + " does not exist");
+ + " as the corresponding portal " + key.getId() + " with
type " + siteType + " does not exist");
}
// Delete node descendants first
@@ -189,7 +189,7 @@
@Override
public String toString()
{
- return "PageNavigation.Save[ownerType=" + key.getOwnerType() +
",ownerId=" + key.getOwnerId() + "]";
+ return "PageNavigation.Save[ownerType=" + key.getType() +
",ownerId=" + key.getId() + "]";
}
}
@@ -229,11 +229,11 @@
public void run(POMSession session) throws Exception
{
Workspace workspace = session.getWorkspace();
- Site site = workspace.getSite(siteType, key.getOwnerId());
+ Site site = workspace.getSite(siteType, key.getId());
if (site == null)
{
throw new IllegalArgumentException("Cannot insert page navigation
"
- + " as the corresponding portal " + key.getOwnerId() + "
with type " + siteType + " does not exist");
+ + " as the corresponding portal " + key.getId() + " with
type " + siteType + " does not exist");
}
// Delete descendants
@@ -250,7 +250,7 @@
@Override
public String toString()
{
- return "PageNavigation.Remove[ownerType=" + key.getOwnerType() +
",ownerId=" + key.getOwnerId() + "]";
+ return "PageNavigation.Remove[ownerType=" + key.getType() +
",ownerId=" + key.getId() + "]";
}
}
}
\ No newline at end of file
Modified:
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PageTask.java
===================================================================
---
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PageTask.java 2009-10-24
13:57:58 UTC (rev 417)
+++
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PageTask.java 2009-10-24
14:00:56 UTC (rev 418)
@@ -66,8 +66,8 @@
protected PageTask(PageKey key)
{
this.key = key;
- this.ownerType = key.getOwnerType();
- this.ownerId = key.getOwnerId();
+ this.ownerType = key.getType();
+ this.ownerId = key.getId();
this.name = key.getName();
this.siteType = Mapper.parseSiteType(ownerType);
}
@@ -98,8 +98,8 @@
super(key);
//
- this.cloneOwnerType = cloneKey.getOwnerType();
- this.cloneOwnerId = cloneKey.getOwnerId();
+ this.cloneOwnerType = cloneKey.getType();
+ this.cloneOwnerId = cloneKey.getId();
this.cloneName = cloneKey.getName();
this.deep = deep;
this.cloneSiteType = Mapper.parseSiteType(cloneOwnerType);
Modified:
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PortalConfigTask.java
===================================================================
---
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PortalConfigTask.java 2009-10-24
13:57:58 UTC (rev 417)
+++
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PortalConfigTask.java 2009-10-24
14:00:56 UTC (rev 418)
@@ -48,7 +48,7 @@
protected PortalConfigTask(PortalKey key)
{
this.key = key;
- this.type = Mapper.parseSiteType(key.getOwnerType());
+ this.type = Mapper.parseSiteType(key.getType());
}
public static class Remove extends PortalConfigTask implements
CacheableDataTask<PortalKey, PortalData>
@@ -87,10 +87,10 @@
public void run(POMSession session)
{
Workspace workspace = session.getWorkspace();
- Site site = workspace.getSite(type, key.getOwnerId());
+ Site site = workspace.getSite(type, key.getId());
if (site == null)
{
- throw new NullPointerException("Could not remove non existing portal
" + key.getOwnerId());
+ throw new NullPointerException("Could not remove non existing portal
" + key.getId());
}
else
{
@@ -101,7 +101,7 @@
@Override
public String toString()
{
- return "PortalConfig.Remove[ownerType=" + key.getOwnerType() +
",ownerId=" + key.getOwnerId() + "]";
+ return "PortalConfig.Remove[ownerType=" + key.getType() +
",ownerId=" + key.getId() + "]";
}
}
@@ -151,7 +151,7 @@
public void run(POMSession session) throws Exception
{
Workspace workspace = session.getWorkspace();
- Site site = workspace.getSite(type, key.getOwnerId());
+ Site site = workspace.getSite(type, key.getId());
if (site != null)
{
if (!overwrite)
@@ -178,7 +178,7 @@
@Override
public String toString()
{
- return "PortalConfig.Save[ownerType=" + key.getOwnerType() +
",ownerId=" + key.getOwnerId() + "]";
+ return "PortalConfig.Save[ownerType=" + key.getType() +
",ownerId=" + key.getId() + "]";
}
}
@@ -226,7 +226,7 @@
public void run(POMSession session)
{
Workspace workspace = session.getWorkspace();
- Site site = workspace.getSite(type, key.getOwnerId());
+ Site site = workspace.getSite(type, key.getId());
if (site != null)
{
this.config = new Mapper(session).load(site);
@@ -236,7 +236,7 @@
@Override
public String toString()
{
- return "PortalConfig.Load[ownerType=" + key.getOwnerType() +
",ownerId=" + key.getOwnerId() + "]";
+ return "PortalConfig.Load[ownerType=" + key.getType() +
",ownerId=" + key.getId() + "]";
}
}
}
Modified:
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/NavigationData.java
===================================================================
---
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/NavigationData.java 2009-10-24
13:57:58 UTC (rev 417)
+++
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/NavigationData.java 2009-10-24
14:00:56 UTC (rev 418)
@@ -91,12 +91,12 @@
public String getOwnerType()
{
- return key.getOwnerType();
+ return key.getType();
}
public String getOwnerId()
{
- return key.getOwnerId();
+ return key.getId();
}
public String getDescription()
Modified:
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/NavigationKey.java
===================================================================
---
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/NavigationKey.java 2009-10-24
13:57:58 UTC (rev 417)
+++
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/NavigationKey.java 2009-10-24
14:00:56 UTC (rev 418)
@@ -27,9 +27,9 @@
public class NavigationKey extends OwnerKey
{
- public NavigationKey(String ownerType, String ownerId)
+ public NavigationKey(String type, String id)
{
- super(ownerType, ownerId);
+ super(type, id);
}
public static NavigationKey create(String compositeId)
Modified:
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/OwnerKey.java
===================================================================
---
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/OwnerKey.java 2009-10-24
13:57:58 UTC (rev 417)
+++
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/OwnerKey.java 2009-10-24
14:00:56 UTC (rev 418)
@@ -28,39 +28,39 @@
{
/** . */
- private final String ownerType;
+ private final String type;
/** . */
- private final String ownerId;
+ private final String id;
- public OwnerKey(String ownerType, String ownerId)
+ public OwnerKey(String type, String id)
{
- if (ownerType == null)
+ if (type == null)
{
throw new NullPointerException();
}
- if (ownerId == null)
+ if (id == null)
{
throw new NullPointerException();
}
- this.ownerType = ownerType;
- this.ownerId = ownerId;
+ this.type = type;
+ this.id = id;
}
- public String getOwnerType()
+ public String getType()
{
- return ownerType;
+ return type;
}
- public String getOwnerId()
+ public String getId()
{
- return ownerId;
+ return id;
}
@Override
public int hashCode()
{
- return ownerId.hashCode() ^ ownerType.hashCode();
+ return id.hashCode() ^ type.hashCode();
}
@Override
@@ -69,7 +69,7 @@
if (obj instanceof OwnerKey)
{
OwnerKey that = (OwnerKey)obj;
- return ownerType.equals(that.ownerType) &&
ownerId.equals(that.ownerId);
+ return type.equals(that.type) && id.equals(that.id);
}
return false;
}
Modified:
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PageData.java
===================================================================
---
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PageData.java 2009-10-24
13:57:58 UTC (rev 417)
+++
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PageData.java 2009-10-24
14:00:56 UTC (rev 418)
@@ -80,12 +80,12 @@
public String getOwnerType()
{
- return key.getOwnerType();
+ return key.getType();
}
public String getOwnerId()
{
- return key.getOwnerId();
+ return key.getId();
}
public String getEditPermission()
Modified:
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PageKey.java
===================================================================
---
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PageKey.java 2009-10-24
13:57:58 UTC (rev 417)
+++
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PageKey.java 2009-10-24
14:00:56 UTC (rev 418)
@@ -30,9 +30,9 @@
/** . */
private final String name;
- public PageKey(String ownerType, String ownerId, String name)
+ public PageKey(String type, String id, String name)
{
- super(ownerType, ownerId);
+ super(type, id);
//
if (name == null)
Modified:
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PortalData.java
===================================================================
---
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PortalData.java 2009-10-24
13:57:58 UTC (rev 417)
+++
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PortalData.java 2009-10-24
14:00:56 UTC (rev 418)
@@ -94,12 +94,12 @@
public String getName()
{
- return key.getOwnerId();
+ return key.getId();
}
public String getType()
{
- return key.getOwnerType();
+ return key.getType();
}
public String getLocale()
Modified:
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PortalKey.java
===================================================================
---
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PortalKey.java 2009-10-24
13:57:58 UTC (rev 417)
+++
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/data/PortalKey.java 2009-10-24
14:00:56 UTC (rev 418)
@@ -27,9 +27,9 @@
public class PortalKey extends OwnerKey
{
- public PortalKey(String ownerType, String ownerId)
+ public PortalKey(String type, String id)
{
- super(ownerType, ownerId);
+ super(type, id);
}
public static PortalKey create(String compositeId)