Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-06-03 08:41:51 +0000
committerEike Stepper2012-06-03 08:41:51 +0000
commitcbaeb4064af374537528beb70c1cb41dd68385e3 (patch)
treea97f4a6a5e10d5f8c2b2d5e4f02eb0587ab39067
parent67dd1cdc91bb74ab6acbaa3e1b8c179f563d6200 (diff)
downloadcdo-cbaeb4064af374537528beb70c1cb41dd68385e3.tar.gz
cdo-cbaeb4064af374537528beb70c1cb41dd68385e3.tar.xz
cdo-cbaeb4064af374537528beb70c1cb41dd68385e3.zip
[381472] Design a repository administration API
https://bugs.eclipse.org/bugs/show_bug.cgi?id=381472
-rw-r--r--plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepository.java29
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/admin/CDOAdminRepository.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java3
3 files changed, 18 insertions, 20 deletions
diff --git a/plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepository.java b/plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepository.java
index 211fd30d90..156e7e6608 100644
--- a/plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepository.java
+++ b/plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepository.java
@@ -39,12 +39,14 @@ public class CDOAdminClientRepository extends Notifier implements CDOAdminReposi
private State state;
- private long creationTime;
-
private String storeType;
private Set<ObjectType> objectIDTypes;
+ private long creationTime;
+
+ private CDOID rootResourceID;
+
private boolean supportingAudits;
private boolean supportingBranches;
@@ -62,7 +64,6 @@ public class CDOAdminClientRepository extends Notifier implements CDOAdminReposi
uuid = in.readString();
type = in.readEnum(Type.class);
state = in.readEnum(State.class);
- creationTime = in.readLong();
storeType = in.readString();
Set<CDOID.ObjectType> objectIDTypes = new HashSet<ObjectType>();
@@ -73,6 +74,8 @@ public class CDOAdminClientRepository extends Notifier implements CDOAdminReposi
objectIDTypes.add(objectIDType);
}
+ creationTime = in.readLong();
+ rootResourceID = (CDOID)in.readObject();
supportingAudits = in.readBoolean();
supportingBranches = in.readBoolean();
supportingEcore = in.readBoolean();
@@ -105,11 +108,6 @@ public class CDOAdminClientRepository extends Notifier implements CDOAdminReposi
return state;
}
- public long getCreationTime()
- {
- return creationTime;
- }
-
public String getStoreType()
{
return storeType;
@@ -120,6 +118,16 @@ public class CDOAdminClientRepository extends Notifier implements CDOAdminReposi
return objectIDTypes;
}
+ public long getCreationTime()
+ {
+ return creationTime;
+ }
+
+ public CDOID getRootResourceID()
+ {
+ return rootResourceID;
+ }
+
public boolean isSupportingAudits()
{
return supportingAudits;
@@ -145,11 +153,6 @@ public class CDOAdminClientRepository extends Notifier implements CDOAdminReposi
return idGenerationLocation;
}
- public CDOID getRootResourceID()
- {
- throw new UnsupportedOperationException();
- }
-
public long getTimeStamp() throws UnsupportedOperationException
{
throw new UnsupportedOperationException();
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/admin/CDOAdminRepository.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/admin/CDOAdminRepository.java
index 3021aac10b..2d2567e114 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/admin/CDOAdminRepository.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/admin/CDOAdminRepository.java
@@ -11,7 +11,6 @@
package org.eclipse.emf.cdo.common.admin;
import org.eclipse.emf.cdo.common.CDOCommonRepository;
-import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.event.INotifier;
@@ -39,10 +38,5 @@ public interface CDOAdminRepository extends CDOCommonRepository, INotifier
/**
* May be unsupported on the client side.
*/
- public CDOID getRootResourceID() throws UnsupportedOperationException;
-
- /**
- * May be unsupported on the client side.
- */
public long getTimeStamp() throws UnsupportedOperationException;
}
diff --git a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java
index 2d9c26ab44..77090849a2 100644
--- a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java
+++ b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java
@@ -164,7 +164,6 @@ public class CDOAdminServerRepository extends Notifier implements CDOAdminReposi
out.writeString(getUUID());
out.writeEnum(getType());
out.writeEnum(getState());
- out.writeLong(getCreationTime());
out.writeString(getStoreType());
Set<CDOID.ObjectType> objectIDTypes = getObjectIDTypes();
@@ -175,6 +174,8 @@ public class CDOAdminServerRepository extends Notifier implements CDOAdminReposi
out.writeEnum(objectIDType);
}
+ out.writeLong(getCreationTime());
+ out.writeObject(getRootResourceID());
out.writeBoolean(isSupportingAudits());
out.writeBoolean(isSupportingBranches());
out.writeBoolean(isSupportingEcore());

Back to the top