You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by je...@apache.org on 2013/06/18 21:52:23 UTC
svn commit: r1494271 - in
/chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory:
server/ storedobj/api/ storedobj/impl/
Author: jens
Date: Tue Jun 18 19:52:23 2013
New Revision: 1494271
URL: http://svn.apache.org/r1494271
Log:
InMemory: more refactoring
Modified:
chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryNavigationServiceImpl.java
chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/StoredObject.java
chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java
chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoredObjectImpl.java
Modified: chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryNavigationServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryNavigationServiceImpl.java?rev=1494271&r1=1494270&r2=1494271&view=diff
==============================================================================
--- chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryNavigationServiceImpl.java (original)
+++ chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryNavigationServiceImpl.java Tue Jun 18 19:52:23 2013
@@ -250,7 +250,7 @@ public class InMemoryNavigationServiceIm
result = getObjectParentsIntern(repositoryId, spo, filter,
context.isObjectInfoRequired() ? objectInfos : null, includeAllowableActions, includeRelationships,
- renditionFilter, context.getUsername());
+ renditionFilter, includeRelativePathSegment, context.getUsername());
// To be able to provide all Atom links in the response we need
// additional information:
@@ -362,7 +362,7 @@ public class InMemoryNavigationServiceIm
private List<ObjectParentData> getObjectParentsIntern(String repositoryId, Filing sop, String filter,
ObjectInfoHandler objectInfos, Boolean includeAllowableActions,
- IncludeRelationships includeRelationships, String renditionFilter, String user) {
+ IncludeRelationships includeRelationships, String renditionFilter, Boolean includeRelativePathSegment, String user) {
List<ObjectParentData> result = null;
result = new ArrayList<ObjectParentData>();
@@ -377,7 +377,8 @@ public class InMemoryNavigationServiceIm
includeRelationships, renditionFilter, false, true, null);
parentData.setObject(objData);
- parentData.setRelativePathSegment(sop.getPathSegment());
+ if (null != includeRelativePathSegment && includeRelativePathSegment)
+ parentData.setRelativePathSegment(sop.getPathSegment());
result.add(parentData);
if (objectInfos != null) {
ObjectInfoImpl objectInfo = new ObjectInfoImpl();
Modified: chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/StoredObject.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/StoredObject.java?rev=1494271&r1=1494270&r2=1494271&view=diff
==============================================================================
--- chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/StoredObject.java (original)
+++ chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/StoredObject.java Tue Jun 18 19:52:23 2013
@@ -59,6 +59,14 @@ public interface StoredObject {
* @return id of this object
*/
String getId();
+
+ /**
+ * Set the id of this object
+ *
+ * @param id
+ * id of this object
+ */
+ void setId(String id);
/**
* Retrieve the name of this object
@@ -169,6 +177,13 @@ public interface StoredObject {
void setModifiedAtNow();
/**
+ * Set the date and time of the last modification of this object
+ * @param calendar
+ * timestamp of last modification
+ */
+ void setModifiedAt(GregorianCalendar calendar);
+
+ /**
* Get the repository id of this object where the object is stored.
*
* @return
Modified: chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java?rev=1494271&r1=1494270&r2=1494271&view=diff
==============================================================================
--- chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java (original)
+++ chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java Tue Jun 18 19:52:23 2013
@@ -70,7 +70,7 @@ public class FolderImpl extends StoredOb
}
if (FilterParser.isContainedInFilter(PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS, requestedIds)) {
- String allowedChildObjects = "*"; // TODO: not yet supported
+ String allowedChildObjects = null; // TODO: not yet supported
properties.put(PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS, objFactory.createPropertyIdData(
PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS, allowedChildObjects));
}
Modified: chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoredObjectImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoredObjectImpl.java?rev=1494271&r1=1494270&r2=1494271&view=diff
==============================================================================
--- chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoredObjectImpl.java (original)
+++ chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoredObjectImpl.java Tue Jun 18 19:52:23 2013
@@ -94,6 +94,11 @@ public class StoredObjectImpl implements
}
@Override
+ public void setId(String id) {
+ fId = id;
+ }
+
+ @Override
public String getName() {
return fName;
}
@@ -154,6 +159,11 @@ public class StoredObjectImpl implements
}
@Override
+ public void setModifiedAt(GregorianCalendar cal) {
+ this.fModifiedAt = cal;
+ }
+
+ @Override
public void setRepositoryId(String repositoryId) {
fRepositoryId = repositoryId;
}