From ee67b1f7de9c5e40128a63581fef731dab4a78bf Mon Sep 17 00:00:00 2001 From: David Caruana Date: Thu, 2 Apr 2009 13:50:10 +0000 Subject: [PATCH] Cleanly split CMIS interfaces from CMIS implementation. - org.alfresco.cmis => public interfaces - org.alfresco.cmis.mapping / dictionary / search => implementation git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13808 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/cmis-api-context.xml | 38 +- .../cmis/{dictionary => }/CMISChoice.java | 2 +- .../{dictionary => }/CMISDictionaryModel.java | 2 +- .../CMISDictionaryService.java | 3 +- ...ccessor.java => CMISPropertyAccessor.java} | 6 +- .../alfresco/cmis/CMISPropertyDefinition.java | 163 ++++ .../cmis/{dictionary => }/CMISPropertyId.java | 2 +- ...er.java => CMISPropertyLuceneBuilder.java} | 4 +- .../cmis/{search => }/CMISQueryException.java | 2 +- .../cmis/{search => }/CMISQueryOptions.java | 2 +- .../cmis/{search => }/CMISQueryService.java | 5 +- .../cmis/{search => }/CMISResultSet.java | 3 +- .../{search => }/CMISResultSetColumn.java | 4 +- .../{search => }/CMISResultSetMetaData.java | 3 +- .../cmis/{search => }/CMISResultSetRow.java | 2 +- .../{search => }/CMISResultSetSelector.java | 3 +- .../cmis/{dictionary => }/CMISScope.java | 2 +- .../java/org/alfresco/cmis/CMISServices.java | 113 +++ .../{dictionary => }/CMISTypeDefinition.java | 3 +- .../cmis/{dictionary => }/CMISTypeId.java | 2 +- .../CMISAbstractDictionaryService.java | 6 + .../CMISAbstractTypeDefinition.java | 6 +- ...n.java => CMISBasePropertyDefinition.java} | 740 +++++++++--------- .../cmis/dictionary/CMISDictionaryTest.java | 4 + .../CMISDocumentTypeDefinition.java | 3 + .../dictionary/CMISFolderTypeDefinition.java | 3 + .../dictionary/CMISObjectTypeDefinition.java | 2 + .../dictionary/CMISPolicyTypeDefinition.java | 3 + .../CMISRelationshipTypeDefinition.java | 6 + .../CMISStrictDictionaryService.java | 2 + .../AbstractPropertyAccessor.java | 6 +- .../{dictionary => mapping}/BaseCMISTest.java | 12 +- .../alfresco/cmis/mapping/CMISMapping.java | 26 +- .../CMISPropertyServiceTest.java | 5 +- .../CMISServicesImpl.java} | 97 +-- .../CheckinCommentPropertyAccessor.java | 4 +- .../ContentStreamLengthPropertyAccessor.java | 4 +- ...ContentStreamMimetypePropertyAccessor.java | 4 +- .../ContentStreamUriPropertyAccessor.java | 4 +- .../DirectPropertyAccessor.java | 2 +- .../FixedValuePropertyAccessor.java | 2 +- .../IsImmutablePropertyAccessor.java | 4 +- .../IsLatestMajorVersionPropertyAccessor.java | 4 +- .../IsLatestVersionPropertyAccessor.java | 4 +- .../IsMajorVersionPropertyAccessor.java | 4 +- ...rsionSeriesCheckedOutPropertyAccessor.java | 4 +- .../ObjectIdPropertyAccessor.java | 6 +- .../ObjectTypeIdPropertyAccessor.java | 8 +- .../ParentPropertyAccessor.java | 4 +- ...ionSeriesCheckedOutByPropertyAccessor.java | 4 +- ...ionSeriesCheckedOutIdPropertyAccessor.java | 4 +- .../VersionSeriesIdPropertyAccessor.java | 4 +- .../search/{impl => }/CMISQueryParser.java | 18 +- .../{impl => }/CMISQueryServiceImpl.java | 18 +- .../cmis/search/CMISResultSetColumnImpl.java | 3 +- .../cmis/search/CMISResultSetImpl.java | 6 +- .../search/CMISResultSetMetaDataImpl.java | 10 +- .../cmis/search/CMISResultSetRowImpl.java | 4 +- .../search/CMISResultSetRowIteratorImpl.java | 3 + .../search/CMISResultSetSelectorImpl.java | 3 +- .../search/CmisFunctionEvaluationContext.java | 4 +- .../org/alfresco/cmis/search/QueryTest.java | 13 +- .../service/ServiceDescriptorRegistry.java | 10 +- .../org/alfresco/service/ServiceRegistry.java | 8 +- 64 files changed, 873 insertions(+), 582 deletions(-) rename source/java/org/alfresco/cmis/{dictionary => }/CMISChoice.java (95%) rename source/java/org/alfresco/cmis/{dictionary => }/CMISDictionaryModel.java (99%) rename source/java/org/alfresco/cmis/{dictionary => }/CMISDictionaryService.java (93%) rename source/java/org/alfresco/cmis/{property/PropertyAccessor.java => CMISPropertyAccessor.java} (94%) create mode 100644 source/java/org/alfresco/cmis/CMISPropertyDefinition.java rename source/java/org/alfresco/cmis/{dictionary => }/CMISPropertyId.java (98%) rename source/java/org/alfresco/cmis/{property/PropertyLuceneBuilder.java => CMISPropertyLuceneBuilder.java} (97%) rename source/java/org/alfresco/cmis/{search => }/CMISQueryException.java (95%) rename source/java/org/alfresco/cmis/{search => }/CMISQueryOptions.java (95%) rename source/java/org/alfresco/cmis/{search => }/CMISQueryService.java (90%) rename source/java/org/alfresco/cmis/{search => }/CMISResultSet.java (95%) rename source/java/org/alfresco/cmis/{search => }/CMISResultSetColumn.java (90%) rename source/java/org/alfresco/cmis/{search => }/CMISResultSetMetaData.java (95%) rename source/java/org/alfresco/cmis/{search => }/CMISResultSetRow.java (95%) rename source/java/org/alfresco/cmis/{search => }/CMISResultSetSelector.java (91%) rename source/java/org/alfresco/cmis/{dictionary => }/CMISScope.java (95%) create mode 100644 source/java/org/alfresco/cmis/CMISServices.java rename source/java/org/alfresco/cmis/{dictionary => }/CMISTypeDefinition.java (94%) rename source/java/org/alfresco/cmis/{dictionary => }/CMISTypeId.java (95%) rename source/java/org/alfresco/cmis/dictionary/{CMISPropertyDefinition.java => CMISBasePropertyDefinition.java} (92%) rename source/java/org/alfresco/cmis/{property => mapping}/AbstractPropertyAccessor.java (87%) rename source/java/org/alfresco/cmis/{dictionary => mapping}/BaseCMISTest.java (93%) rename source/java/org/alfresco/cmis/{property => mapping}/CMISPropertyServiceTest.java (98%) rename source/java/org/alfresco/cmis/{CMISService.java => mapping/CMISServicesImpl.java} (91%) rename source/java/org/alfresco/cmis/{property => mapping}/CheckinCommentPropertyAccessor.java (95%) rename source/java/org/alfresco/cmis/{property => mapping}/ContentStreamLengthPropertyAccessor.java (96%) rename source/java/org/alfresco/cmis/{property => mapping}/ContentStreamMimetypePropertyAccessor.java (96%) rename source/java/org/alfresco/cmis/{property => mapping}/ContentStreamUriPropertyAccessor.java (98%) rename source/java/org/alfresco/cmis/{property => mapping}/DirectPropertyAccessor.java (97%) rename source/java/org/alfresco/cmis/{property => mapping}/FixedValuePropertyAccessor.java (96%) rename source/java/org/alfresco/cmis/{property => mapping}/IsImmutablePropertyAccessor.java (96%) rename source/java/org/alfresco/cmis/{property => mapping}/IsLatestMajorVersionPropertyAccessor.java (96%) rename source/java/org/alfresco/cmis/{property => mapping}/IsLatestVersionPropertyAccessor.java (96%) rename source/java/org/alfresco/cmis/{property => mapping}/IsMajorVersionPropertyAccessor.java (96%) rename source/java/org/alfresco/cmis/{property => mapping}/IsVersionSeriesCheckedOutPropertyAccessor.java (96%) rename source/java/org/alfresco/cmis/{property => mapping}/ObjectIdPropertyAccessor.java (96%) rename source/java/org/alfresco/cmis/{property => mapping}/ObjectTypeIdPropertyAccessor.java (95%) rename source/java/org/alfresco/cmis/{property => mapping}/ParentPropertyAccessor.java (96%) rename source/java/org/alfresco/cmis/{property => mapping}/VersionSeriesCheckedOutByPropertyAccessor.java (96%) rename source/java/org/alfresco/cmis/{property => mapping}/VersionSeriesCheckedOutIdPropertyAccessor.java (96%) rename source/java/org/alfresco/cmis/{property => mapping}/VersionSeriesIdPropertyAccessor.java (96%) rename source/java/org/alfresco/cmis/search/{impl => }/CMISQueryParser.java (97%) rename source/java/org/alfresco/cmis/search/{impl => }/CMISQueryServiceImpl.java (89%) diff --git a/config/alfresco/cmis-api-context.xml b/config/alfresco/cmis-api-context.xml index 8317901cee..9b21054b2d 100644 --- a/config/alfresco/cmis-api-context.xml +++ b/config/alfresco/cmis-api-context.xml @@ -9,6 +9,18 @@ + + 0.5 + workspace/SpacesStore/Company Home + + + + + + + + + @@ -29,19 +41,7 @@ - - 0.5 - workspace/SpacesStore/Company Home - - - - - - - - - - + @@ -49,14 +49,14 @@ - + - + @@ -74,21 +74,21 @@ - + org.alfresco.repo.search.impl.querymodel.QueryEngine - + - + - + diff --git a/source/java/org/alfresco/cmis/dictionary/CMISChoice.java b/source/java/org/alfresco/cmis/CMISChoice.java similarity index 95% rename from source/java/org/alfresco/cmis/dictionary/CMISChoice.java rename to source/java/org/alfresco/cmis/CMISChoice.java index a41823c04e..e792bca064 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISChoice.java +++ b/source/java/org/alfresco/cmis/CMISChoice.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.dictionary; +package org.alfresco.cmis; import java.io.Serializable; import java.util.Collection; diff --git a/source/java/org/alfresco/cmis/dictionary/CMISDictionaryModel.java b/source/java/org/alfresco/cmis/CMISDictionaryModel.java similarity index 99% rename from source/java/org/alfresco/cmis/dictionary/CMISDictionaryModel.java rename to source/java/org/alfresco/cmis/CMISDictionaryModel.java index 8f827e44ca..3d92d9e4e4 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISDictionaryModel.java +++ b/source/java/org/alfresco/cmis/CMISDictionaryModel.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.dictionary; +package org.alfresco.cmis; import org.alfresco.cmis.mapping.CMISMapping; import org.alfresco.model.ContentModel; diff --git a/source/java/org/alfresco/cmis/dictionary/CMISDictionaryService.java b/source/java/org/alfresco/cmis/CMISDictionaryService.java similarity index 93% rename from source/java/org/alfresco/cmis/dictionary/CMISDictionaryService.java rename to source/java/org/alfresco/cmis/CMISDictionaryService.java index bdbc94fb0a..a9b7c455dc 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISDictionaryService.java +++ b/source/java/org/alfresco/cmis/CMISDictionaryService.java @@ -22,11 +22,10 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.dictionary; +package org.alfresco.cmis; import java.util.Collection; -import org.alfresco.cmis.CMISDataTypeEnum; import org.alfresco.service.namespace.QName; /** diff --git a/source/java/org/alfresco/cmis/property/PropertyAccessor.java b/source/java/org/alfresco/cmis/CMISPropertyAccessor.java similarity index 94% rename from source/java/org/alfresco/cmis/property/PropertyAccessor.java rename to source/java/org/alfresco/cmis/CMISPropertyAccessor.java index 9cf18dee54..632cc56e5f 100644 --- a/source/java/org/alfresco/cmis/property/PropertyAccessor.java +++ b/source/java/org/alfresco/cmis/CMISPropertyAccessor.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis; import java.io.Serializable; @@ -30,11 +30,11 @@ import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; /** - * CMIS Property Accessor + * CMIS Property Accessor (get and set property values) * * @author davidc */ -public interface PropertyAccessor +public interface CMISPropertyAccessor { /** * Get the CMIS Property Name diff --git a/source/java/org/alfresco/cmis/CMISPropertyDefinition.java b/source/java/org/alfresco/cmis/CMISPropertyDefinition.java new file mode 100644 index 0000000000..24577e087f --- /dev/null +++ b/source/java/org/alfresco/cmis/CMISPropertyDefinition.java @@ -0,0 +1,163 @@ +/* + * Copyright (C) 2005-2007 Alfresco Software Limited. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" + */ +package org.alfresco.cmis; + +import java.util.Collection; + + +/** + * CMIS Property Definition + * + * @author andyh + */ +public interface CMISPropertyDefinition +{ + /** + * Get Property Id + * + * @return + */ + public CMISPropertyId getPropertyId(); + + /** + * Get Owning Type + * + * @return + */ + public CMISTypeDefinition getOwningType(); + + /** + * Get the display name + * + * @return + */ + public String getDisplayName(); + + /** + * Get the description + * + * @return + */ + public String getDescription(); + + /** + * Get the property type + * + * @return + */ + public CMISDataTypeEnum getDataType(); + + /** + * Get the cardinality + * + * @return + */ + public CMISCardinalityEnum getCardinality(); + + /** + * For variable length properties, get the maximum length allowed. Unsupported. + * + * @return + */ + public int getMaximumLength(); + + /** + * For properties of type CMISPropertyType.XML the schema to which the property must conform. Unsupported + * + * @return - the schema URI + */ + public String getSchemaURI(); + + /** + * For properties of type CMISPropertyType.XML the encoding used for the property value + * + * @return the encoding + */ + public String getEncoding(); + + /** + * Get the choices available as values for this property TODO: not implemented yet + * + * @return + */ + public Collection getChoices(); + + /** + * Is this a choice where a user can enter other values (ie a list with common options) + * + * @return + */ + public boolean isOpenChoice(); + + /** + * Is this property required? + * + * @return + */ + public boolean isRequired(); + + /** + * get the default value as a String + * + * @return + */ + public String getDefaultValue(); + + /** + * Is this property updatable? + * + * @return + */ + public CMISUpdatabilityEnum getUpdatability(); + + /** + * Is this property queryable? + * + * @return + */ + public boolean isQueryable(); + + /** + * Is this property orderable in queries? + * + * @return + */ + public boolean isOrderable(); + + /** + * Gets the property accessor (for reading / writing values) + * + * @return + */ + public CMISPropertyAccessor getPropertyAccessor(); + + /** + * Gets the property Lucene builder + * + * @return + */ + public CMISPropertyLuceneBuilder getPropertyLuceneBuilder(); + +} diff --git a/source/java/org/alfresco/cmis/dictionary/CMISPropertyId.java b/source/java/org/alfresco/cmis/CMISPropertyId.java similarity index 98% rename from source/java/org/alfresco/cmis/dictionary/CMISPropertyId.java rename to source/java/org/alfresco/cmis/CMISPropertyId.java index 0d550d4503..ffb7337bc0 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISPropertyId.java +++ b/source/java/org/alfresco/cmis/CMISPropertyId.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.dictionary; +package org.alfresco.cmis; import java.io.Serializable; diff --git a/source/java/org/alfresco/cmis/property/PropertyLuceneBuilder.java b/source/java/org/alfresco/cmis/CMISPropertyLuceneBuilder.java similarity index 97% rename from source/java/org/alfresco/cmis/property/PropertyLuceneBuilder.java rename to source/java/org/alfresco/cmis/CMISPropertyLuceneBuilder.java index e403c5c3e5..6702534d72 100644 --- a/source/java/org/alfresco/cmis/property/PropertyLuceneBuilder.java +++ b/source/java/org/alfresco/cmis/CMISPropertyLuceneBuilder.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis; import java.io.Serializable; import java.util.Collection; @@ -37,7 +37,7 @@ import org.apache.lucene.search.Query; * * @author andyh */ -public interface PropertyLuceneBuilder +public interface CMISPropertyLuceneBuilder { /** * @param lqp diff --git a/source/java/org/alfresco/cmis/search/CMISQueryException.java b/source/java/org/alfresco/cmis/CMISQueryException.java similarity index 95% rename from source/java/org/alfresco/cmis/search/CMISQueryException.java rename to source/java/org/alfresco/cmis/CMISQueryException.java index 9ba62ec6dc..c90821c3bc 100644 --- a/source/java/org/alfresco/cmis/search/CMISQueryException.java +++ b/source/java/org/alfresco/cmis/CMISQueryException.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.search; +package org.alfresco.cmis; import org.alfresco.error.AlfrescoRuntimeException; diff --git a/source/java/org/alfresco/cmis/search/CMISQueryOptions.java b/source/java/org/alfresco/cmis/CMISQueryOptions.java similarity index 95% rename from source/java/org/alfresco/cmis/search/CMISQueryOptions.java rename to source/java/org/alfresco/cmis/CMISQueryOptions.java index f644ae7791..72eb9041ba 100644 --- a/source/java/org/alfresco/cmis/search/CMISQueryOptions.java +++ b/source/java/org/alfresco/cmis/CMISQueryOptions.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.search; +package org.alfresco.cmis; import java.util.Locale; diff --git a/source/java/org/alfresco/cmis/search/CMISQueryService.java b/source/java/org/alfresco/cmis/CMISQueryService.java similarity index 90% rename from source/java/org/alfresco/cmis/search/CMISQueryService.java rename to source/java/org/alfresco/cmis/CMISQueryService.java index 044088bc52..51b94d9104 100644 --- a/source/java/org/alfresco/cmis/search/CMISQueryService.java +++ b/source/java/org/alfresco/cmis/CMISQueryService.java @@ -22,11 +22,8 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.search; +package org.alfresco.cmis; -import org.alfresco.cmis.CMISFullTextSearchEnum; -import org.alfresco.cmis.CMISJoinEnum; -import org.alfresco.cmis.CMISQueryEnum; /** * Support to execute CMIS queries diff --git a/source/java/org/alfresco/cmis/search/CMISResultSet.java b/source/java/org/alfresco/cmis/CMISResultSet.java similarity index 95% rename from source/java/org/alfresco/cmis/search/CMISResultSet.java rename to source/java/org/alfresco/cmis/CMISResultSet.java index 62dede4003..2c3cc81be9 100644 --- a/source/java/org/alfresco/cmis/search/CMISResultSet.java +++ b/source/java/org/alfresco/cmis/CMISResultSet.java @@ -22,7 +22,8 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.search; +package org.alfresco.cmis; + /** diff --git a/source/java/org/alfresco/cmis/search/CMISResultSetColumn.java b/source/java/org/alfresco/cmis/CMISResultSetColumn.java similarity index 90% rename from source/java/org/alfresco/cmis/search/CMISResultSetColumn.java rename to source/java/org/alfresco/cmis/CMISResultSetColumn.java index b66e3b9209..08a679398e 100644 --- a/source/java/org/alfresco/cmis/search/CMISResultSetColumn.java +++ b/source/java/org/alfresco/cmis/CMISResultSetColumn.java @@ -22,10 +22,8 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.search; +package org.alfresco.cmis; -import org.alfresco.cmis.CMISDataTypeEnum; -import org.alfresco.cmis.dictionary.CMISPropertyDefinition; /** * The column meta data for a result set diff --git a/source/java/org/alfresco/cmis/search/CMISResultSetMetaData.java b/source/java/org/alfresco/cmis/CMISResultSetMetaData.java similarity index 95% rename from source/java/org/alfresco/cmis/search/CMISResultSetMetaData.java rename to source/java/org/alfresco/cmis/CMISResultSetMetaData.java index 7efcf689df..56b7944644 100644 --- a/source/java/org/alfresco/cmis/search/CMISResultSetMetaData.java +++ b/source/java/org/alfresco/cmis/CMISResultSetMetaData.java @@ -22,7 +22,8 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.search; +package org.alfresco.cmis; + /** * The meta data associated with a result set diff --git a/source/java/org/alfresco/cmis/search/CMISResultSetRow.java b/source/java/org/alfresco/cmis/CMISResultSetRow.java similarity index 95% rename from source/java/org/alfresco/cmis/search/CMISResultSetRow.java rename to source/java/org/alfresco/cmis/CMISResultSetRow.java index e65f06871d..c9f785f416 100644 --- a/source/java/org/alfresco/cmis/search/CMISResultSetRow.java +++ b/source/java/org/alfresco/cmis/CMISResultSetRow.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.search; +package org.alfresco.cmis; import java.io.Serializable; import java.util.Map; diff --git a/source/java/org/alfresco/cmis/search/CMISResultSetSelector.java b/source/java/org/alfresco/cmis/CMISResultSetSelector.java similarity index 91% rename from source/java/org/alfresco/cmis/search/CMISResultSetSelector.java rename to source/java/org/alfresco/cmis/CMISResultSetSelector.java index 635fbe3ae7..76f563e618 100644 --- a/source/java/org/alfresco/cmis/search/CMISResultSetSelector.java +++ b/source/java/org/alfresco/cmis/CMISResultSetSelector.java @@ -22,9 +22,8 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.search; +package org.alfresco.cmis; -import org.alfresco.cmis.dictionary.CMISTypeDefinition; /** * The meta-data for a result set selector. diff --git a/source/java/org/alfresco/cmis/dictionary/CMISScope.java b/source/java/org/alfresco/cmis/CMISScope.java similarity index 95% rename from source/java/org/alfresco/cmis/dictionary/CMISScope.java rename to source/java/org/alfresco/cmis/CMISScope.java index ca95e76a17..486d3bee60 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISScope.java +++ b/source/java/org/alfresco/cmis/CMISScope.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.dictionary; +package org.alfresco.cmis; import java.util.HashMap; import java.util.Map; diff --git a/source/java/org/alfresco/cmis/CMISServices.java b/source/java/org/alfresco/cmis/CMISServices.java new file mode 100644 index 0000000000..42d2d4d29f --- /dev/null +++ b/source/java/org/alfresco/cmis/CMISServices.java @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2005-2008 Alfresco Software Limited. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" + */ +package org.alfresco.cmis; + +import java.io.Serializable; +import java.util.Map; + +import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.repository.StoreRef; + + +/** + * CMIS Services + * + * @author davidc + */ +public interface CMISServices +{ + /** + * Gets the supported CMIS Version + * + * @return version of CMIS specification supported + */ + public String getCMISVersion(); + + /** + * Gets the default root node path + * + * @return root node path + */ + public String getDefaultRootPath(); + + /** + * Gets the default root node ref + * + * @return root node ref + */ + public NodeRef getDefaultRootNodeRef(); + + /** + * Gets the default store ref + * + * @return store ref + */ + public StoreRef getDefaultRootStoreRef(); + + /** + * Query for node children + * + * @param parent node to query children for + * @param typesFilter types filter + * @return children of node + */ + public NodeRef[] getChildren(NodeRef parent, CMISTypesFilterEnum typesFilter); + + /** + * Query for checked out items + * + * @param username for user + * @param folder (optional) within folder + * @param includeDescendants true => include descendants of folder, false => only children of folder + * @return checked out items + */ + public NodeRef[] getCheckedOut(String username, NodeRef folder, boolean includeDescendants); + + /** + * Get a single property + * + * @param nodeRef + * @param propertyName + * @return value + */ + public Serializable getProperty(NodeRef nodeRef, String propertyName); + + /** + * Get all properties + * + * @param nodeRef + * @return + */ + public Map getProperties(NodeRef nodeRef); + + /** + * Set a single property + * + * @param nodeRef + * @param propertyName + * @param value + */ + public void setProperty(NodeRef nodeRef, String propertyName, Serializable value); +} diff --git a/source/java/org/alfresco/cmis/dictionary/CMISTypeDefinition.java b/source/java/org/alfresco/cmis/CMISTypeDefinition.java similarity index 94% rename from source/java/org/alfresco/cmis/dictionary/CMISTypeDefinition.java rename to source/java/org/alfresco/cmis/CMISTypeDefinition.java index dd2a2dce1d..b7022b8156 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISTypeDefinition.java +++ b/source/java/org/alfresco/cmis/CMISTypeDefinition.java @@ -22,12 +22,11 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.dictionary; +package org.alfresco.cmis; import java.util.Collection; import java.util.Map; -import org.alfresco.cmis.CMISContentStreamAllowedEnum; /** * The base type definition for CMIS diff --git a/source/java/org/alfresco/cmis/dictionary/CMISTypeId.java b/source/java/org/alfresco/cmis/CMISTypeId.java similarity index 95% rename from source/java/org/alfresco/cmis/dictionary/CMISTypeId.java rename to source/java/org/alfresco/cmis/CMISTypeId.java index cb330a585e..fec1c69dd2 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISTypeId.java +++ b/source/java/org/alfresco/cmis/CMISTypeId.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.dictionary; +package org.alfresco.cmis; import java.io.Serializable; diff --git a/source/java/org/alfresco/cmis/dictionary/CMISAbstractDictionaryService.java b/source/java/org/alfresco/cmis/dictionary/CMISAbstractDictionaryService.java index 8f9f1f02f8..7aaef9ae27 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISAbstractDictionaryService.java +++ b/source/java/org/alfresco/cmis/dictionary/CMISAbstractDictionaryService.java @@ -33,6 +33,12 @@ import java.util.Map; import java.util.TreeMap; import org.alfresco.cmis.CMISDataTypeEnum; +import org.alfresco.cmis.CMISDictionaryService; +import org.alfresco.cmis.CMISPropertyDefinition; +import org.alfresco.cmis.CMISPropertyId; +import org.alfresco.cmis.CMISScope; +import org.alfresco.cmis.CMISTypeDefinition; +import org.alfresco.cmis.CMISTypeId; import org.alfresco.cmis.mapping.CMISMapping; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.repo.dictionary.DictionaryDAO; diff --git a/source/java/org/alfresco/cmis/dictionary/CMISAbstractTypeDefinition.java b/source/java/org/alfresco/cmis/dictionary/CMISAbstractTypeDefinition.java index eecce192aa..2bfed79ce2 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISAbstractTypeDefinition.java +++ b/source/java/org/alfresco/cmis/dictionary/CMISAbstractTypeDefinition.java @@ -33,6 +33,10 @@ import java.util.LinkedList; import java.util.Map; import org.alfresco.cmis.CMISContentStreamAllowedEnum; +import org.alfresco.cmis.CMISPropertyDefinition; +import org.alfresco.cmis.CMISPropertyId; +import org.alfresco.cmis.CMISTypeDefinition; +import org.alfresco.cmis.CMISTypeId; import org.alfresco.cmis.dictionary.CMISAbstractDictionaryService.DictionaryRegistry; import org.alfresco.cmis.mapping.CMISMapping; import org.alfresco.error.AlfrescoRuntimeException; @@ -117,7 +121,7 @@ public class CMISAbstractTypeDefinition implements CMISTypeDefinition, Serializa String propertyName = cmisMapping.getCmisPropertyName(propertyQName); String propertyId = cmisMapping.getCmisPropertyId(propertyQName); CMISPropertyId cmisPropertyId = new CMISPropertyId(propertyName, propertyId, propertyQName); - return new CMISPropertyDefinition(cmisMapping, cmisPropertyId, propDef, this); + return new CMISBasePropertyDefinition(cmisMapping, cmisPropertyId, propDef, this); } /** diff --git a/source/java/org/alfresco/cmis/dictionary/CMISPropertyDefinition.java b/source/java/org/alfresco/cmis/dictionary/CMISBasePropertyDefinition.java similarity index 92% rename from source/java/org/alfresco/cmis/dictionary/CMISPropertyDefinition.java rename to source/java/org/alfresco/cmis/dictionary/CMISBasePropertyDefinition.java index a119e9960c..12d6e94d4c 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISPropertyDefinition.java +++ b/source/java/org/alfresco/cmis/dictionary/CMISBasePropertyDefinition.java @@ -1,368 +1,372 @@ -/* - * Copyright (C) 2005-2007 Alfresco Software Limited. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: - * http://www.alfresco.com/legal/licensing" - */ -package org.alfresco.cmis.dictionary; - -import java.io.Serializable; -import java.util.Collection; -import java.util.HashSet; - -import org.alfresco.cmis.CMISCardinalityEnum; -import org.alfresco.cmis.CMISDataTypeEnum; -import org.alfresco.cmis.CMISUpdatabilityEnum; -import org.alfresco.cmis.mapping.CMISMapping; -import org.alfresco.cmis.property.AbstractPropertyAccessor; -import org.alfresco.cmis.property.PropertyAccessor; -import org.alfresco.cmis.property.PropertyLuceneBuilder; -import org.alfresco.repo.dictionary.IndexTokenisationMode; -import org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint; -import org.alfresco.repo.dictionary.constraint.StringLengthConstraint; -import org.alfresco.repo.search.impl.lucene.analysis.DateTimeAnalyser; -import org.alfresco.repo.search.impl.lucene.analysis.DoubleAnalyser; -import org.alfresco.repo.search.impl.lucene.analysis.FloatAnalyser; -import org.alfresco.repo.search.impl.lucene.analysis.IntegerAnalyser; -import org.alfresco.repo.search.impl.lucene.analysis.LongAnalyser; -import org.alfresco.repo.search.impl.lucene.analysis.PathAnalyser; -import org.alfresco.repo.search.impl.lucene.analysis.VerbatimAnalyser; -import org.alfresco.service.cmr.dictionary.Constraint; -import org.alfresco.service.cmr.dictionary.ConstraintDefinition; -import org.alfresco.service.cmr.dictionary.PropertyDefinition; - -/** - * CMIS Property Definition - * - * @author andyh - */ -public class CMISPropertyDefinition implements Serializable -{ - private static final long serialVersionUID = -8119257313852558466L; - - // Properties of Property - private CMISTypeDefinition typeDef; - private CMISPropertyId propertyId; - private String displayName; - private String description; - private CMISDataTypeEnum propertyType; - private CMISCardinalityEnum cardinality; - private int maximumLength = -1; - private String schemaURI = null; - private String encoding = null; - private Collection choices = new HashSet(); - private boolean isOpenChoice = false; - private boolean required; - private String defaultValue; - private CMISUpdatabilityEnum updatability; - private boolean queryable; - private boolean orderable; - private AbstractPropertyAccessor propertyAccessor; - - - /** - * Construct - * - * @param cmisMapping - * @param propertyId - * @param propDef - * @param typeDef - */ - public CMISPropertyDefinition(CMISMapping cmisMapping, CMISPropertyId propertyId, PropertyDefinition propDef, CMISTypeDefinition typeDef) - { - this.propertyId = propertyId; - this.typeDef = typeDef; - displayName = (propDef.getTitle() != null) ? propDef.getTitle() : propertyId.getName(); - description = propDef.getDescription(); - propertyType = cmisMapping.getDataType(propDef.getDataType()); - cardinality = propDef.isMultiValued() ? CMISCardinalityEnum.MULTI_VALUED : CMISCardinalityEnum.SINGLE_VALUED; - for (ConstraintDefinition constraintDef : propDef.getConstraints()) - { - Constraint constraint = constraintDef.getConstraint(); - if (constraint instanceof ListOfValuesConstraint) - { - int position = 1; // CMIS is 1 based (according to XSDs) - ListOfValuesConstraint lovc = (ListOfValuesConstraint) constraint; - for (String allowed : lovc.getAllowedValues()) - { - CMISChoice choice = new CMISChoice(allowed, allowed, position++); - choices.add(choice); - } - } - if (constraint instanceof StringLengthConstraint) - { - StringLengthConstraint slc = (StringLengthConstraint) constraint; - maximumLength = slc.getMaxLength(); - } - } - required = propDef.isMandatory(); - defaultValue = propDef.getDefaultValue(); - updatability = propDef.isProtected() ? CMISUpdatabilityEnum.READ_ONLY : CMISUpdatabilityEnum.READ_AND_WRITE; - queryable = propDef.isIndexed(); - if (queryable) - { - IndexTokenisationMode indexTokenisationMode = IndexTokenisationMode.TRUE; - if (propDef.getIndexTokenisationMode() != null) - { - indexTokenisationMode = propDef.getIndexTokenisationMode(); - } - switch (indexTokenisationMode) - { - case BOTH: - case FALSE: - orderable = true; - break; - case TRUE: - default: - String analyserClassName = propDef.getDataType().getAnalyserClassName(); - if (analyserClassName.equals(DateTimeAnalyser.class.getCanonicalName()) - || analyserClassName.equals(DoubleAnalyser.class.getCanonicalName()) || analyserClassName.equals(FloatAnalyser.class.getCanonicalName()) - || analyserClassName.equals(IntegerAnalyser.class.getCanonicalName()) || analyserClassName.equals(LongAnalyser.class.getCanonicalName()) - || analyserClassName.equals(PathAnalyser.class.getCanonicalName()) || analyserClassName.equals(VerbatimAnalyser.class.getCanonicalName())) - { - orderable = true; - } - else - { - orderable = false; - } - } - } - else - { - orderable = false; - } - propertyAccessor = cmisMapping.getPropertyAccessor(propertyId); - } - - /** - * Get Property Id - * - * @return - */ - public CMISPropertyId getPropertyId() - { - return propertyId; - } - - /** - * Get Owning Type - * - * @return - */ - public CMISTypeDefinition getOwningType() - { - return typeDef; - } - - /** - * Get the display name - * - * @return - */ - public String getDisplayName() - { - return displayName; - } - - /** - * Get the description - * - * @return - */ - public String getDescription() - { - return description; - } - - /** - * Get the property type - * - * @return - */ - public CMISDataTypeEnum getDataType() - { - return propertyType; - } - - /** - * Get the cardinality - * - * @return - */ - public CMISCardinalityEnum getCardinality() - { - return cardinality; - } - - /** - * For variable length properties, get the maximum length allowed. Unsupported. - * - * @return - */ - public int getMaximumLength() - { - return maximumLength; - } - - /** - * For properties of type CMISPropertyType.XML the schema to which the property must conform. Unsupported - * - * @return - the schema URI - */ - public String getSchemaURI() - { - return schemaURI; - } - - /** - * For properties of type CMISPropertyType.XML the encoding used for the property value - * - * @return the encoding - */ - public String getEncoding() - { - return encoding; - } - - /** - * Get the choices available as values for this property TODO: not implemented yet - * - * @return - */ - public Collection getChoices() - { - return choices; - } - - /** - * Is this a choice where a user can enter other values (ie a list with common options) - * - * @return - */ - public boolean isOpenChoice() - { - return isOpenChoice; - } - - /** - * Is this property required? - * - * @return - */ - public boolean isRequired() - { - return required; - } - - /** - * get the default value as a String - * - * @return - */ - public String getDefaultValue() - { - return defaultValue; - } - - /** - * Is this property updatable? - * - * @return - */ - public CMISUpdatabilityEnum getUpdatability() - { - return updatability; - } - - /** - * Is this property queryable? - * - * @return - */ - public boolean isQueryable() - { - return queryable; - } - - /** - * Is this property orderable in queries? - * - * @return - */ - public boolean isOrderable() - { - return orderable; - } - - /** - * Gets the property accessor (for reading / writing values) - * - * @return - */ - public PropertyAccessor getPropertyAccessor() - { - return propertyAccessor; - } - - /** - * Gets the property Lucene builder - * - * @return - */ - public PropertyLuceneBuilder getPropertyLuceneBuilder() - { - return propertyAccessor; - } - - - /* - * (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() - { - StringBuilder builder = new StringBuilder(); - builder.append("CMISPropertyDefinition["); - builder.append("OwningTypeId=").append(getOwningType().getTypeId()).append(", "); - builder.append("PropertyName=").append(getPropertyId().getName()).append(", "); - builder.append("PropertyId=").append(getPropertyId().getId()).append(", "); - builder.append("PropertyQName=").append(getPropertyId().getQName()).append(", "); - builder.append("DisplayName=").append(getDisplayName()).append(", "); - builder.append("Description=").append(getDescription()).append(", "); - builder.append("PropertyType=").append(getDataType()).append(", "); - builder.append("Cardinality=").append(getCardinality()).append(", "); - builder.append("MaximumLength=").append(getMaximumLength()).append(", "); - builder.append("SchemaURI=").append(getSchemaURI()).append(", "); - builder.append("Encoding=").append(getEncoding()).append(", "); - builder.append("Choices=").append(getChoices()).append(", "); - builder.append("IsOpenChoice=").append(isOpenChoice()).append(", "); - builder.append("Required=").append(isRequired()).append(", "); - builder.append("Default=").append(getDefaultValue()).append(", "); - builder.append("Updatable=").append(getUpdatability()).append(", "); - builder.append("Queryable=").append(isQueryable()).append(", "); - builder.append("Orderable=").append(isOrderable()); - builder.append("]"); - return builder.toString(); - } - -} +/* + * Copyright (C) 2005-2007 Alfresco Software Limited. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" + */ +package org.alfresco.cmis.dictionary; + +import java.io.Serializable; +import java.util.Collection; +import java.util.HashSet; + +import org.alfresco.cmis.CMISCardinalityEnum; +import org.alfresco.cmis.CMISChoice; +import org.alfresco.cmis.CMISDataTypeEnum; +import org.alfresco.cmis.CMISPropertyDefinition; +import org.alfresco.cmis.CMISPropertyId; +import org.alfresco.cmis.CMISTypeDefinition; +import org.alfresco.cmis.CMISUpdatabilityEnum; +import org.alfresco.cmis.CMISPropertyAccessor; +import org.alfresco.cmis.CMISPropertyLuceneBuilder; +import org.alfresco.cmis.mapping.AbstractPropertyAccessor; +import org.alfresco.cmis.mapping.CMISMapping; +import org.alfresco.repo.dictionary.IndexTokenisationMode; +import org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint; +import org.alfresco.repo.dictionary.constraint.StringLengthConstraint; +import org.alfresco.repo.search.impl.lucene.analysis.DateTimeAnalyser; +import org.alfresco.repo.search.impl.lucene.analysis.DoubleAnalyser; +import org.alfresco.repo.search.impl.lucene.analysis.FloatAnalyser; +import org.alfresco.repo.search.impl.lucene.analysis.IntegerAnalyser; +import org.alfresco.repo.search.impl.lucene.analysis.LongAnalyser; +import org.alfresco.repo.search.impl.lucene.analysis.PathAnalyser; +import org.alfresco.repo.search.impl.lucene.analysis.VerbatimAnalyser; +import org.alfresco.service.cmr.dictionary.Constraint; +import org.alfresco.service.cmr.dictionary.ConstraintDefinition; +import org.alfresco.service.cmr.dictionary.PropertyDefinition; + +/** + * CMIS Property Definition + * + * @author andyh + */ +public class CMISBasePropertyDefinition implements CMISPropertyDefinition, Serializable +{ + private static final long serialVersionUID = -8119257313852558466L; + + // Properties of Property + private CMISTypeDefinition typeDef; + private CMISPropertyId propertyId; + private String displayName; + private String description; + private CMISDataTypeEnum propertyType; + private CMISCardinalityEnum cardinality; + private int maximumLength = -1; + private String schemaURI = null; + private String encoding = null; + private Collection choices = new HashSet(); + private boolean isOpenChoice = false; + private boolean required; + private String defaultValue; + private CMISUpdatabilityEnum updatability; + private boolean queryable; + private boolean orderable; + private AbstractPropertyAccessor propertyAccessor; + + + /** + * Construct + * + * @param cmisMapping + * @param propertyId + * @param propDef + * @param typeDef + */ + public CMISBasePropertyDefinition(CMISMapping cmisMapping, CMISPropertyId propertyId, PropertyDefinition propDef, CMISTypeDefinition typeDef) + { + this.propertyId = propertyId; + this.typeDef = typeDef; + displayName = (propDef.getTitle() != null) ? propDef.getTitle() : propertyId.getName(); + description = propDef.getDescription(); + propertyType = cmisMapping.getDataType(propDef.getDataType()); + cardinality = propDef.isMultiValued() ? CMISCardinalityEnum.MULTI_VALUED : CMISCardinalityEnum.SINGLE_VALUED; + for (ConstraintDefinition constraintDef : propDef.getConstraints()) + { + Constraint constraint = constraintDef.getConstraint(); + if (constraint instanceof ListOfValuesConstraint) + { + int position = 1; // CMIS is 1 based (according to XSDs) + ListOfValuesConstraint lovc = (ListOfValuesConstraint) constraint; + for (String allowed : lovc.getAllowedValues()) + { + CMISChoice choice = new CMISChoice(allowed, allowed, position++); + choices.add(choice); + } + } + if (constraint instanceof StringLengthConstraint) + { + StringLengthConstraint slc = (StringLengthConstraint) constraint; + maximumLength = slc.getMaxLength(); + } + } + required = propDef.isMandatory(); + defaultValue = propDef.getDefaultValue(); + updatability = propDef.isProtected() ? CMISUpdatabilityEnum.READ_ONLY : CMISUpdatabilityEnum.READ_AND_WRITE; + queryable = propDef.isIndexed(); + if (queryable) + { + IndexTokenisationMode indexTokenisationMode = IndexTokenisationMode.TRUE; + if (propDef.getIndexTokenisationMode() != null) + { + indexTokenisationMode = propDef.getIndexTokenisationMode(); + } + switch (indexTokenisationMode) + { + case BOTH: + case FALSE: + orderable = true; + break; + case TRUE: + default: + String analyserClassName = propDef.getDataType().getAnalyserClassName(); + if (analyserClassName.equals(DateTimeAnalyser.class.getCanonicalName()) + || analyserClassName.equals(DoubleAnalyser.class.getCanonicalName()) || analyserClassName.equals(FloatAnalyser.class.getCanonicalName()) + || analyserClassName.equals(IntegerAnalyser.class.getCanonicalName()) || analyserClassName.equals(LongAnalyser.class.getCanonicalName()) + || analyserClassName.equals(PathAnalyser.class.getCanonicalName()) || analyserClassName.equals(VerbatimAnalyser.class.getCanonicalName())) + { + orderable = true; + } + else + { + orderable = false; + } + } + } + else + { + orderable = false; + } + propertyAccessor = cmisMapping.getPropertyAccessor(propertyId); + } + + /** + * Get Property Id + * + * @return + */ + public CMISPropertyId getPropertyId() + { + return propertyId; + } + + /** + * Get Owning Type + * + * @return + */ + public CMISTypeDefinition getOwningType() + { + return typeDef; + } + + /** + * Get the display name + * + * @return + */ + public String getDisplayName() + { + return displayName; + } + + /** + * Get the description + * + * @return + */ + public String getDescription() + { + return description; + } + + /** + * Get the property type + * + * @return + */ + public CMISDataTypeEnum getDataType() + { + return propertyType; + } + + /** + * Get the cardinality + * + * @return + */ + public CMISCardinalityEnum getCardinality() + { + return cardinality; + } + + /** + * For variable length properties, get the maximum length allowed. Unsupported. + * + * @return + */ + public int getMaximumLength() + { + return maximumLength; + } + + /** + * For properties of type CMISPropertyType.XML the schema to which the property must conform. Unsupported + * + * @return - the schema URI + */ + public String getSchemaURI() + { + return schemaURI; + } + + /** + * For properties of type CMISPropertyType.XML the encoding used for the property value + * + * @return the encoding + */ + public String getEncoding() + { + return encoding; + } + + /** + * Get the choices available as values for this property TODO: not implemented yet + * + * @return + */ + public Collection getChoices() + { + return choices; + } + + /** + * Is this a choice where a user can enter other values (ie a list with common options) + * + * @return + */ + public boolean isOpenChoice() + { + return isOpenChoice; + } + + /** + * Is this property required? + * + * @return + */ + public boolean isRequired() + { + return required; + } + + /** + * get the default value as a String + * + * @return + */ + public String getDefaultValue() + { + return defaultValue; + } + + /** + * Is this property updatable? + * + * @return + */ + public CMISUpdatabilityEnum getUpdatability() + { + return updatability; + } + + /** + * Is this property queryable? + * + * @return + */ + public boolean isQueryable() + { + return queryable; + } + + /** + * Is this property orderable in queries? + * + * @return + */ + public boolean isOrderable() + { + return orderable; + } + + /** + * Gets the property accessor (for reading / writing values) + * + * @return + */ + public CMISPropertyAccessor getPropertyAccessor() + { + return propertyAccessor; + } + + /** + * Gets the property Lucene builder + * + * @return + */ + public CMISPropertyLuceneBuilder getPropertyLuceneBuilder() + { + return propertyAccessor; + } + + + /* + * (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() + { + StringBuilder builder = new StringBuilder(); + builder.append("CMISPropertyDefinition["); + builder.append("OwningTypeId=").append(getOwningType().getTypeId()).append(", "); + builder.append("PropertyName=").append(getPropertyId().getName()).append(", "); + builder.append("PropertyId=").append(getPropertyId().getId()).append(", "); + builder.append("PropertyQName=").append(getPropertyId().getQName()).append(", "); + builder.append("DisplayName=").append(getDisplayName()).append(", "); + builder.append("Description=").append(getDescription()).append(", "); + builder.append("PropertyType=").append(getDataType()).append(", "); + builder.append("Cardinality=").append(getCardinality()).append(", "); + builder.append("MaximumLength=").append(getMaximumLength()).append(", "); + builder.append("SchemaURI=").append(getSchemaURI()).append(", "); + builder.append("Encoding=").append(getEncoding()).append(", "); + builder.append("Choices=").append(getChoices()).append(", "); + builder.append("IsOpenChoice=").append(isOpenChoice()).append(", "); + builder.append("Required=").append(isRequired()).append(", "); + builder.append("Default=").append(getDefaultValue()).append(", "); + builder.append("Updatable=").append(getUpdatability()).append(", "); + builder.append("Queryable=").append(isQueryable()).append(", "); + builder.append("Orderable=").append(isOrderable()); + builder.append("]"); + return builder.toString(); + } + +} diff --git a/source/java/org/alfresco/cmis/dictionary/CMISDictionaryTest.java b/source/java/org/alfresco/cmis/dictionary/CMISDictionaryTest.java index a653a214f4..362449a9f3 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISDictionaryTest.java +++ b/source/java/org/alfresco/cmis/dictionary/CMISDictionaryTest.java @@ -24,6 +24,10 @@ */ package org.alfresco.cmis.dictionary; +import org.alfresco.cmis.CMISPropertyDefinition; +import org.alfresco.cmis.CMISTypeDefinition; +import org.alfresco.cmis.mapping.BaseCMISTest; + public class CMISDictionaryTest extends BaseCMISTest { public void testBasicTypes() diff --git a/source/java/org/alfresco/cmis/dictionary/CMISDocumentTypeDefinition.java b/source/java/org/alfresco/cmis/dictionary/CMISDocumentTypeDefinition.java index d716edb634..767d14936a 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISDocumentTypeDefinition.java +++ b/source/java/org/alfresco/cmis/dictionary/CMISDocumentTypeDefinition.java @@ -27,6 +27,9 @@ package org.alfresco.cmis.dictionary; import java.util.List; import org.alfresco.cmis.CMISContentStreamAllowedEnum; +import org.alfresco.cmis.CMISDictionaryModel; +import org.alfresco.cmis.CMISScope; +import org.alfresco.cmis.CMISTypeId; import org.alfresco.cmis.mapping.CMISMapping; import org.alfresco.model.ContentModel; import org.alfresco.service.cmr.dictionary.AspectDefinition; diff --git a/source/java/org/alfresco/cmis/dictionary/CMISFolderTypeDefinition.java b/source/java/org/alfresco/cmis/dictionary/CMISFolderTypeDefinition.java index dc774cdf22..8811732106 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISFolderTypeDefinition.java +++ b/source/java/org/alfresco/cmis/dictionary/CMISFolderTypeDefinition.java @@ -24,6 +24,9 @@ */ package org.alfresco.cmis.dictionary; +import org.alfresco.cmis.CMISDictionaryModel; +import org.alfresco.cmis.CMISScope; +import org.alfresco.cmis.CMISTypeId; import org.alfresco.cmis.mapping.CMISMapping; import org.alfresco.service.cmr.dictionary.ClassDefinition; import org.alfresco.service.namespace.QName; diff --git a/source/java/org/alfresco/cmis/dictionary/CMISObjectTypeDefinition.java b/source/java/org/alfresco/cmis/dictionary/CMISObjectTypeDefinition.java index 9c9fe57aff..64f838fcdf 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISObjectTypeDefinition.java +++ b/source/java/org/alfresco/cmis/dictionary/CMISObjectTypeDefinition.java @@ -26,6 +26,8 @@ package org.alfresco.cmis.dictionary; import java.util.Collection; +import org.alfresco.cmis.CMISScope; +import org.alfresco.cmis.CMISTypeId; import org.alfresco.cmis.mapping.CMISMapping; import org.alfresco.service.cmr.dictionary.ClassDefinition; import org.alfresco.service.cmr.dictionary.DictionaryService; diff --git a/source/java/org/alfresco/cmis/dictionary/CMISPolicyTypeDefinition.java b/source/java/org/alfresco/cmis/dictionary/CMISPolicyTypeDefinition.java index 050c211968..d4f6f89b3f 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISPolicyTypeDefinition.java +++ b/source/java/org/alfresco/cmis/dictionary/CMISPolicyTypeDefinition.java @@ -26,6 +26,9 @@ package org.alfresco.cmis.dictionary; import java.util.Collection; +import org.alfresco.cmis.CMISDictionaryModel; +import org.alfresco.cmis.CMISScope; +import org.alfresco.cmis.CMISTypeId; import org.alfresco.cmis.dictionary.CMISAbstractDictionaryService.DictionaryRegistry; import org.alfresco.cmis.mapping.CMISMapping; import org.alfresco.service.cmr.dictionary.ClassDefinition; diff --git a/source/java/org/alfresco/cmis/dictionary/CMISRelationshipTypeDefinition.java b/source/java/org/alfresco/cmis/dictionary/CMISRelationshipTypeDefinition.java index 7fb87c99d6..2b5c432c0b 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISRelationshipTypeDefinition.java +++ b/source/java/org/alfresco/cmis/dictionary/CMISRelationshipTypeDefinition.java @@ -29,6 +29,12 @@ import java.util.Collection; import java.util.List; import java.util.Map; +import org.alfresco.cmis.CMISDictionaryModel; +import org.alfresco.cmis.CMISPropertyDefinition; +import org.alfresco.cmis.CMISPropertyId; +import org.alfresco.cmis.CMISScope; +import org.alfresco.cmis.CMISTypeDefinition; +import org.alfresco.cmis.CMISTypeId; import org.alfresco.cmis.dictionary.CMISAbstractDictionaryService.DictionaryRegistry; import org.alfresco.cmis.mapping.CMISMapping; import org.alfresco.error.AlfrescoRuntimeException; diff --git a/source/java/org/alfresco/cmis/dictionary/CMISStrictDictionaryService.java b/source/java/org/alfresco/cmis/dictionary/CMISStrictDictionaryService.java index fb5356bdda..e218d40b70 100644 --- a/source/java/org/alfresco/cmis/dictionary/CMISStrictDictionaryService.java +++ b/source/java/org/alfresco/cmis/dictionary/CMISStrictDictionaryService.java @@ -26,6 +26,8 @@ package org.alfresco.cmis.dictionary; import java.util.Collection; +import org.alfresco.cmis.CMISScope; +import org.alfresco.cmis.CMISTypeId; import org.alfresco.service.cmr.dictionary.AssociationDefinition; import org.alfresco.service.cmr.dictionary.ClassDefinition; import org.alfresco.service.namespace.QName; diff --git a/source/java/org/alfresco/cmis/property/AbstractPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/AbstractPropertyAccessor.java similarity index 87% rename from source/java/org/alfresco/cmis/property/AbstractPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/AbstractPropertyAccessor.java index 2de07f5ee6..b237f39c3c 100644 --- a/source/java/org/alfresco/cmis/property/AbstractPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/AbstractPropertyAccessor.java @@ -22,8 +22,10 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; +import org.alfresco.cmis.CMISPropertyAccessor; +import org.alfresco.cmis.CMISPropertyLuceneBuilder; import org.alfresco.service.ServiceRegistry; import org.alfresco.service.namespace.QName; @@ -33,7 +35,7 @@ import org.alfresco.service.namespace.QName; * @author andyh * */ -public abstract class AbstractPropertyAccessor implements PropertyAccessor, PropertyLuceneBuilder +public abstract class AbstractPropertyAccessor implements CMISPropertyAccessor, CMISPropertyLuceneBuilder { private ServiceRegistry serviceRegistry; private String propertyName; diff --git a/source/java/org/alfresco/cmis/dictionary/BaseCMISTest.java b/source/java/org/alfresco/cmis/mapping/BaseCMISTest.java similarity index 93% rename from source/java/org/alfresco/cmis/dictionary/BaseCMISTest.java rename to source/java/org/alfresco/cmis/mapping/BaseCMISTest.java index 3ca2b44ecb..3eaba682c9 100644 --- a/source/java/org/alfresco/cmis/dictionary/BaseCMISTest.java +++ b/source/java/org/alfresco/cmis/mapping/BaseCMISTest.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.dictionary; +package org.alfresco.cmis.mapping; import java.util.Date; @@ -31,9 +31,9 @@ import javax.transaction.UserTransaction; import junit.framework.TestCase; -import org.alfresco.cmis.CMISService; -import org.alfresco.cmis.mapping.CMISMapping; -import org.alfresco.cmis.search.CMISQueryService; +import org.alfresco.cmis.CMISDictionaryService; +import org.alfresco.cmis.CMISQueryService; +import org.alfresco.cmis.CMISServices; import org.alfresco.repo.security.authentication.AuthenticationComponent; import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.alfresco.repo.security.authentication.MutableAuthenticationDao; @@ -64,7 +64,7 @@ public abstract class BaseCMISTest extends TestCase protected CMISMapping cmisMapping; - protected CMISService cmisService; + protected CMISServices cmisService; protected CMISDictionaryService cmisDictionaryService; @@ -103,7 +103,7 @@ public abstract class BaseCMISTest extends TestCase cmisDictionaryService = (CMISDictionaryService) ctx.getBean("CMISDictionaryService"); cmisMapping = (CMISMapping) ctx.getBean("CMISMapping"); cmisQueryService = (CMISQueryService) ctx.getBean("CMISQueryService"); - cmisService = (CMISService) ctx.getBean("CMISService"); + cmisService = (CMISServices) ctx.getBean("CMISService"); dictionaryService = (DictionaryService) ctx.getBean("dictionaryService"); nodeService = (NodeService) ctx.getBean("nodeService"); fileFolderService = (FileFolderService) ctx.getBean("fileFolderService"); diff --git a/source/java/org/alfresco/cmis/mapping/CMISMapping.java b/source/java/org/alfresco/cmis/mapping/CMISMapping.java index ab8533cfd6..412c175427 100644 --- a/source/java/org/alfresco/cmis/mapping/CMISMapping.java +++ b/source/java/org/alfresco/cmis/mapping/CMISMapping.java @@ -30,28 +30,10 @@ import java.util.Map; import org.alfresco.cmis.CMISContentStreamAllowedEnum; import org.alfresco.cmis.CMISDataTypeEnum; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; -import org.alfresco.cmis.dictionary.CMISPropertyId; -import org.alfresco.cmis.dictionary.CMISScope; -import org.alfresco.cmis.dictionary.CMISTypeId; -import org.alfresco.cmis.property.AbstractPropertyAccessor; -import org.alfresco.cmis.property.CheckinCommentPropertyAccessor; -import org.alfresco.cmis.property.ContentStreamLengthPropertyAccessor; -import org.alfresco.cmis.property.ContentStreamMimetypePropertyAccessor; -import org.alfresco.cmis.property.ContentStreamUriPropertyAccessor; -import org.alfresco.cmis.property.DirectPropertyAccessor; -import org.alfresco.cmis.property.FixedValuePropertyAccessor; -import org.alfresco.cmis.property.IsImmutablePropertyAccessor; -import org.alfresco.cmis.property.IsLatestMajorVersionPropertyAccessor; -import org.alfresco.cmis.property.IsLatestVersionPropertyAccessor; -import org.alfresco.cmis.property.IsMajorVersionPropertyAccessor; -import org.alfresco.cmis.property.IsVersionSeriesCheckedOutPropertyAccessor; -import org.alfresco.cmis.property.ObjectIdPropertyAccessor; -import org.alfresco.cmis.property.ObjectTypeIdPropertyAccessor; -import org.alfresco.cmis.property.ParentPropertyAccessor; -import org.alfresco.cmis.property.VersionSeriesCheckedOutByPropertyAccessor; -import org.alfresco.cmis.property.VersionSeriesCheckedOutIdPropertyAccessor; -import org.alfresco.cmis.property.VersionSeriesIdPropertyAccessor; +import org.alfresco.cmis.CMISDictionaryModel; +import org.alfresco.cmis.CMISPropertyId; +import org.alfresco.cmis.CMISScope; +import org.alfresco.cmis.CMISTypeId; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.model.ContentModel; import org.alfresco.service.ServiceRegistry; diff --git a/source/java/org/alfresco/cmis/property/CMISPropertyServiceTest.java b/source/java/org/alfresco/cmis/mapping/CMISPropertyServiceTest.java similarity index 98% rename from source/java/org/alfresco/cmis/property/CMISPropertyServiceTest.java rename to source/java/org/alfresco/cmis/mapping/CMISPropertyServiceTest.java index 0e7291e9b5..5689b68790 100644 --- a/source/java/org/alfresco/cmis/property/CMISPropertyServiceTest.java +++ b/source/java/org/alfresco/cmis/mapping/CMISPropertyServiceTest.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.HashMap; @@ -30,8 +30,7 @@ import java.util.Locale; import java.util.Map; import org.alfresco.cmis.CMISContentStreamAllowedEnum; -import org.alfresco.cmis.dictionary.BaseCMISTest; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; +import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.model.ContentModel; import org.alfresco.repo.version.VersionModel; diff --git a/source/java/org/alfresco/cmis/CMISService.java b/source/java/org/alfresco/cmis/mapping/CMISServicesImpl.java similarity index 91% rename from source/java/org/alfresco/cmis/CMISService.java rename to source/java/org/alfresco/cmis/mapping/CMISServicesImpl.java index d13867ba08..c74a045846 100644 --- a/source/java/org/alfresco/cmis/CMISService.java +++ b/source/java/org/alfresco/cmis/mapping/CMISServicesImpl.java @@ -22,17 +22,19 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.alfresco.cmis.dictionary.CMISDictionaryService; -import org.alfresco.cmis.dictionary.CMISPropertyDefinition; -import org.alfresco.cmis.dictionary.CMISPropertyId; -import org.alfresco.cmis.dictionary.CMISTypeDefinition; +import org.alfresco.cmis.CMISDictionaryService; +import org.alfresco.cmis.CMISPropertyDefinition; +import org.alfresco.cmis.CMISPropertyId; +import org.alfresco.cmis.CMISServices; +import org.alfresco.cmis.CMISTypeDefinition; +import org.alfresco.cmis.CMISTypesFilterEnum; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.model.ContentModel; import org.alfresco.repo.model.Repository; @@ -63,11 +65,11 @@ import org.springframework.context.ApplicationListener; /** - * CMIS Service + * CMIS Services Implementation * * @author davidc */ -public class CMISService implements ApplicationContextAware, ApplicationListener, TenantDeployer +public class CMISServicesImpl implements CMISServices, ApplicationContextAware, ApplicationListener, TenantDeployer { /** Query Parameters */ private static final QName PARAM_PARENT = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "parent"); @@ -269,30 +271,27 @@ public class CMISService implements ApplicationContextAware, ApplicationListener defaultRootNodeRefs.remove(tenantAdminService.getCurrentUserDomain()); } - /** - * Gets the supported CMIS Version - * - * @return version of CMIS specification supported + /* + * (non-Javadoc) + * @see org.alfresco.cmis.CMISServices#getCMISVersion() */ public String getCMISVersion() { return cmisVersion; } - - /** - * Gets the default root node path - * - * @return root node path + + /* + * (non-Javadoc) + * @see org.alfresco.cmis.CMISServices#getDefaultRootPath() */ public String getDefaultRootPath() { return defaultRootPath; } - /** - * Gets the default root node ref - * - * @return root node ref + /* + * (non-Javadoc) + * @see org.alfresco.cmis.CMISServices#getDefaultRootNodeRef() */ public NodeRef getDefaultRootNodeRef() { @@ -323,22 +322,18 @@ public class CMISService implements ApplicationContextAware, ApplicationListener return defaultNodeRef; } - /** - * Gets the default store ref - * - * @return store ref + /* + * (non-Javadoc) + * @see org.alfresco.cmis.CMISServices#getDefaultRootStoreRef() */ public StoreRef getDefaultRootStoreRef() { return getDefaultRootNodeRef().getStoreRef(); } - - /** - * Query for node children - * - * @param parent node to query children for - * @param typesFilter types filter - * @return children of node + + /* + * (non-Javadoc) + * @see org.alfresco.cmis.CMISServices#getChildren(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.cmis.CMISTypesFilterEnum) */ public NodeRef[] getChildren(NodeRef parent, CMISTypesFilterEnum typesFilter) { @@ -365,13 +360,9 @@ public class CMISService implements ApplicationContextAware, ApplicationListener return new NodeRef[0]; } - /** - * Query for checked out items - * - * @param username for user - * @param folder (optional) within folder - * @param includeDescendants true => include descendants of folder, false => only children of folder - * @return checked out items + /* + * (non-Javadoc) + * @see org.alfresco.cmis.CMISServices#getCheckedOut(java.lang.String, org.alfresco.service.cmr.repository.NodeRef, boolean) */ public NodeRef[] getCheckedOut(String username, NodeRef folder, boolean includeDescendants) { @@ -459,13 +450,10 @@ public class CMISService implements ApplicationContextAware, ApplicationListener if (resultSet != null) resultSet.close(); } } - - /** - * Get a single property - * - * @param nodeRef - * @param propertyName - * @return value + + /* + * (non-Javadoc) + * @see org.alfresco.cmis.CMISServices#getProperty(org.alfresco.service.cmr.repository.NodeRef, java.lang.String) */ public Serializable getProperty(NodeRef nodeRef, String propertyName) { @@ -483,11 +471,9 @@ public class CMISService implements ApplicationContextAware, ApplicationListener return propDef.getPropertyAccessor().getValue(nodeRef); } - /** - * Get all properties - * - * @param nodeRef - * @return + /* + * (non-Javadoc) + * @see org.alfresco.cmis.CMISServices#getProperties(org.alfresco.service.cmr.repository.NodeRef) */ public Map getProperties(NodeRef nodeRef) { @@ -505,13 +491,10 @@ public class CMISService implements ApplicationContextAware, ApplicationListener } return values; } - - /** - * Set a single property - * - * @param nodeRef - * @param propertyName - * @param value + + /* + * (non-Javadoc) + * @see org.alfresco.cmis.CMISServices#setProperty(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.io.Serializable) */ public void setProperty(NodeRef nodeRef, String propertyName, Serializable value) { diff --git a/source/java/org/alfresco/cmis/property/CheckinCommentPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/CheckinCommentPropertyAccessor.java similarity index 95% rename from source/java/org/alfresco/cmis/property/CheckinCommentPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/CheckinCommentPropertyAccessor.java index 6a448eb402..ef77c6c8c4 100644 --- a/source/java/org/alfresco/cmis/property/CheckinCommentPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/CheckinCommentPropertyAccessor.java @@ -22,12 +22,12 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; +import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; import org.alfresco.service.ServiceRegistry; diff --git a/source/java/org/alfresco/cmis/property/ContentStreamLengthPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/ContentStreamLengthPropertyAccessor.java similarity index 96% rename from source/java/org/alfresco/cmis/property/ContentStreamLengthPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/ContentStreamLengthPropertyAccessor.java index e86d7e746a..f56a60fc0d 100644 --- a/source/java/org/alfresco/cmis/property/ContentStreamLengthPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/ContentStreamLengthPropertyAccessor.java @@ -22,12 +22,12 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; +import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.model.ContentModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; diff --git a/source/java/org/alfresco/cmis/property/ContentStreamMimetypePropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/ContentStreamMimetypePropertyAccessor.java similarity index 96% rename from source/java/org/alfresco/cmis/property/ContentStreamMimetypePropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/ContentStreamMimetypePropertyAccessor.java index 866f8ea002..ea230f832a 100644 --- a/source/java/org/alfresco/cmis/property/ContentStreamMimetypePropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/ContentStreamMimetypePropertyAccessor.java @@ -22,12 +22,12 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; +import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.model.ContentModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; diff --git a/source/java/org/alfresco/cmis/property/ContentStreamUriPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/ContentStreamUriPropertyAccessor.java similarity index 98% rename from source/java/org/alfresco/cmis/property/ContentStreamUriPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/ContentStreamUriPropertyAccessor.java index 7176f3301e..48f1e7a6db 100644 --- a/source/java/org/alfresco/cmis/property/ContentStreamUriPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/ContentStreamUriPropertyAccessor.java @@ -22,12 +22,12 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; +import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.model.ContentModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; diff --git a/source/java/org/alfresco/cmis/property/DirectPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/DirectPropertyAccessor.java similarity index 97% rename from source/java/org/alfresco/cmis/property/DirectPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/DirectPropertyAccessor.java index 23d6b0e0ee..57ea912a2d 100644 --- a/source/java/org/alfresco/cmis/property/DirectPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/DirectPropertyAccessor.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; diff --git a/source/java/org/alfresco/cmis/property/FixedValuePropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/FixedValuePropertyAccessor.java similarity index 96% rename from source/java/org/alfresco/cmis/property/FixedValuePropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/FixedValuePropertyAccessor.java index 779fc68e88..41a1526506 100644 --- a/source/java/org/alfresco/cmis/property/FixedValuePropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/FixedValuePropertyAccessor.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; diff --git a/source/java/org/alfresco/cmis/property/IsImmutablePropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/IsImmutablePropertyAccessor.java similarity index 96% rename from source/java/org/alfresco/cmis/property/IsImmutablePropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/IsImmutablePropertyAccessor.java index 1b909e38b4..3ff4ea7b0f 100644 --- a/source/java/org/alfresco/cmis/property/IsImmutablePropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/IsImmutablePropertyAccessor.java @@ -22,12 +22,12 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; +import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.model.ContentModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; diff --git a/source/java/org/alfresco/cmis/property/IsLatestMajorVersionPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/IsLatestMajorVersionPropertyAccessor.java similarity index 96% rename from source/java/org/alfresco/cmis/property/IsLatestMajorVersionPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/IsLatestMajorVersionPropertyAccessor.java index c3fbbc0ecc..f78f443b3d 100644 --- a/source/java/org/alfresco/cmis/property/IsLatestMajorVersionPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/IsLatestMajorVersionPropertyAccessor.java @@ -22,12 +22,12 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; +import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.model.ContentModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; diff --git a/source/java/org/alfresco/cmis/property/IsLatestVersionPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/IsLatestVersionPropertyAccessor.java similarity index 96% rename from source/java/org/alfresco/cmis/property/IsLatestVersionPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/IsLatestVersionPropertyAccessor.java index 024b8c72b5..eb7eabd59f 100644 --- a/source/java/org/alfresco/cmis/property/IsLatestVersionPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/IsLatestVersionPropertyAccessor.java @@ -22,12 +22,12 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; +import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.model.ContentModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; diff --git a/source/java/org/alfresco/cmis/property/IsMajorVersionPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/IsMajorVersionPropertyAccessor.java similarity index 96% rename from source/java/org/alfresco/cmis/property/IsMajorVersionPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/IsMajorVersionPropertyAccessor.java index 41e552f265..9d53e6e032 100644 --- a/source/java/org/alfresco/cmis/property/IsMajorVersionPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/IsMajorVersionPropertyAccessor.java @@ -22,12 +22,12 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; +import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.model.ContentModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; diff --git a/source/java/org/alfresco/cmis/property/IsVersionSeriesCheckedOutPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/IsVersionSeriesCheckedOutPropertyAccessor.java similarity index 96% rename from source/java/org/alfresco/cmis/property/IsVersionSeriesCheckedOutPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/IsVersionSeriesCheckedOutPropertyAccessor.java index a548e5bcb9..2bb0dc0358 100644 --- a/source/java/org/alfresco/cmis/property/IsVersionSeriesCheckedOutPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/IsVersionSeriesCheckedOutPropertyAccessor.java @@ -22,12 +22,12 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; +import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.model.ContentModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; diff --git a/source/java/org/alfresco/cmis/property/ObjectIdPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/ObjectIdPropertyAccessor.java similarity index 96% rename from source/java/org/alfresco/cmis/property/ObjectIdPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/ObjectIdPropertyAccessor.java index b87e6a806a..4b5c40a151 100644 --- a/source/java/org/alfresco/cmis/property/ObjectIdPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/ObjectIdPropertyAccessor.java @@ -22,13 +22,13 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; -import org.alfresco.cmis.search.CMISQueryException; +import org.alfresco.cmis.CMISDictionaryModel; +import org.alfresco.cmis.CMISQueryException; import org.alfresco.model.ContentModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; diff --git a/source/java/org/alfresco/cmis/property/ObjectTypeIdPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/ObjectTypeIdPropertyAccessor.java similarity index 95% rename from source/java/org/alfresco/cmis/property/ObjectTypeIdPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/ObjectTypeIdPropertyAccessor.java index d626361f7c..a5f4ecfd1b 100644 --- a/source/java/org/alfresco/cmis/property/ObjectTypeIdPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/ObjectTypeIdPropertyAccessor.java @@ -22,15 +22,15 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; -import org.alfresco.cmis.dictionary.CMISTypeDefinition; -import org.alfresco.cmis.search.CMISQueryException; +import org.alfresco.cmis.CMISDictionaryModel; +import org.alfresco.cmis.CMISQueryException; +import org.alfresco.cmis.CMISTypeDefinition; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; import org.alfresco.service.ServiceRegistry; diff --git a/source/java/org/alfresco/cmis/property/ParentPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/ParentPropertyAccessor.java similarity index 96% rename from source/java/org/alfresco/cmis/property/ParentPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/ParentPropertyAccessor.java index 3a6c027549..d3cce5b11a 100644 --- a/source/java/org/alfresco/cmis/property/ParentPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/ParentPropertyAccessor.java @@ -22,12 +22,12 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; +import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; import org.alfresco.service.ServiceRegistry; diff --git a/source/java/org/alfresco/cmis/property/VersionSeriesCheckedOutByPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/VersionSeriesCheckedOutByPropertyAccessor.java similarity index 96% rename from source/java/org/alfresco/cmis/property/VersionSeriesCheckedOutByPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/VersionSeriesCheckedOutByPropertyAccessor.java index 73d05cb800..d9131e8a3f 100644 --- a/source/java/org/alfresco/cmis/property/VersionSeriesCheckedOutByPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/VersionSeriesCheckedOutByPropertyAccessor.java @@ -22,12 +22,12 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; +import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.model.ContentModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; diff --git a/source/java/org/alfresco/cmis/property/VersionSeriesCheckedOutIdPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/VersionSeriesCheckedOutIdPropertyAccessor.java similarity index 96% rename from source/java/org/alfresco/cmis/property/VersionSeriesCheckedOutIdPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/VersionSeriesCheckedOutIdPropertyAccessor.java index d0dc80c8ef..1080497c67 100644 --- a/source/java/org/alfresco/cmis/property/VersionSeriesCheckedOutIdPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/VersionSeriesCheckedOutIdPropertyAccessor.java @@ -22,12 +22,12 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; +import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.model.ContentModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; diff --git a/source/java/org/alfresco/cmis/property/VersionSeriesIdPropertyAccessor.java b/source/java/org/alfresco/cmis/mapping/VersionSeriesIdPropertyAccessor.java similarity index 96% rename from source/java/org/alfresco/cmis/property/VersionSeriesIdPropertyAccessor.java rename to source/java/org/alfresco/cmis/mapping/VersionSeriesIdPropertyAccessor.java index 4e1558ccb4..05f846ee0b 100644 --- a/source/java/org/alfresco/cmis/property/VersionSeriesIdPropertyAccessor.java +++ b/source/java/org/alfresco/cmis/mapping/VersionSeriesIdPropertyAccessor.java @@ -22,12 +22,12 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.property; +package org.alfresco.cmis.mapping; import java.io.Serializable; import java.util.Collection; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; +import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.model.ContentModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.PredicateMode; diff --git a/source/java/org/alfresco/cmis/search/impl/CMISQueryParser.java b/source/java/org/alfresco/cmis/search/CMISQueryParser.java similarity index 97% rename from source/java/org/alfresco/cmis/search/impl/CMISQueryParser.java rename to source/java/org/alfresco/cmis/search/CMISQueryParser.java index 859793f5f0..fe9298ef17 100644 --- a/source/java/org/alfresco/cmis/search/impl/CMISQueryParser.java +++ b/source/java/org/alfresco/cmis/search/CMISQueryParser.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.search.impl; +package org.alfresco.cmis.search; import java.util.ArrayList; import java.util.Collection; @@ -33,15 +33,15 @@ import java.util.Map; import java.util.StringTokenizer; import org.alfresco.cmis.CMISCardinalityEnum; +import org.alfresco.cmis.CMISDictionaryService; import org.alfresco.cmis.CMISJoinEnum; -import org.alfresco.cmis.dictionary.CMISDictionaryService; -import org.alfresco.cmis.dictionary.CMISPropertyDefinition; -import org.alfresco.cmis.dictionary.CMISPropertyId; -import org.alfresco.cmis.dictionary.CMISScope; -import org.alfresco.cmis.dictionary.CMISTypeDefinition; -import org.alfresco.cmis.search.CMISQueryException; -import org.alfresco.cmis.search.CMISQueryOptions; -import org.alfresco.cmis.search.CMISQueryOptions.CMISQueryMode; +import org.alfresco.cmis.CMISPropertyDefinition; +import org.alfresco.cmis.CMISPropertyId; +import org.alfresco.cmis.CMISQueryException; +import org.alfresco.cmis.CMISQueryOptions; +import org.alfresco.cmis.CMISScope; +import org.alfresco.cmis.CMISTypeDefinition; +import org.alfresco.cmis.CMISQueryOptions.CMISQueryMode; import org.alfresco.repo.search.impl.parsers.CMISLexer; import org.alfresco.repo.search.impl.parsers.CMISParser; import org.alfresco.repo.search.impl.parsers.FTSLexer; diff --git a/source/java/org/alfresco/cmis/search/impl/CMISQueryServiceImpl.java b/source/java/org/alfresco/cmis/search/CMISQueryServiceImpl.java similarity index 89% rename from source/java/org/alfresco/cmis/search/impl/CMISQueryServiceImpl.java rename to source/java/org/alfresco/cmis/search/CMISQueryServiceImpl.java index e6f02f26b5..dfb17a45e4 100644 --- a/source/java/org/alfresco/cmis/search/impl/CMISQueryServiceImpl.java +++ b/source/java/org/alfresco/cmis/search/CMISQueryServiceImpl.java @@ -22,22 +22,20 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.cmis.search.impl; +package org.alfresco.cmis.search; import java.util.HashMap; import java.util.Map; import java.util.Set; +import org.alfresco.cmis.CMISDictionaryService; import org.alfresco.cmis.CMISFullTextSearchEnum; import org.alfresco.cmis.CMISJoinEnum; import org.alfresco.cmis.CMISQueryEnum; -import org.alfresco.cmis.CMISService; -import org.alfresco.cmis.dictionary.CMISDictionaryService; -import org.alfresco.cmis.search.CMISQueryOptions; -import org.alfresco.cmis.search.CMISQueryService; -import org.alfresco.cmis.search.CMISResultSet; -import org.alfresco.cmis.search.CMISResultSetImpl; -import org.alfresco.cmis.search.CmisFunctionEvaluationContext; +import org.alfresco.cmis.CMISQueryOptions; +import org.alfresco.cmis.CMISQueryService; +import org.alfresco.cmis.CMISResultSet; +import org.alfresco.cmis.CMISServices; import org.alfresco.repo.search.impl.querymodel.Query; import org.alfresco.repo.search.impl.querymodel.QueryEngine; import org.alfresco.repo.search.impl.querymodel.QueryEngineResults; @@ -49,7 +47,7 @@ import org.alfresco.service.cmr.search.ResultSet; */ public class CMISQueryServiceImpl implements CMISQueryService { - private CMISService cmisService; + private CMISServices cmisService; private CMISDictionaryService cmisDictionaryService; @@ -61,7 +59,7 @@ public class CMISQueryServiceImpl implements CMISQueryService * @param service * the service to set */ - public void setCMISService(CMISService cmisService) + public void setCMISService(CMISServices cmisService) { this.cmisService = cmisService; } diff --git a/source/java/org/alfresco/cmis/search/CMISResultSetColumnImpl.java b/source/java/org/alfresco/cmis/search/CMISResultSetColumnImpl.java index 6583f86791..034547530e 100644 --- a/source/java/org/alfresco/cmis/search/CMISResultSetColumnImpl.java +++ b/source/java/org/alfresco/cmis/search/CMISResultSetColumnImpl.java @@ -25,7 +25,8 @@ package org.alfresco.cmis.search; import org.alfresco.cmis.CMISDataTypeEnum; -import org.alfresco.cmis.dictionary.CMISPropertyDefinition; +import org.alfresco.cmis.CMISPropertyDefinition; +import org.alfresco.cmis.CMISResultSetColumn; /** * @author andyh diff --git a/source/java/org/alfresco/cmis/search/CMISResultSetImpl.java b/source/java/org/alfresco/cmis/search/CMISResultSetImpl.java index 4ad4e90dd6..c71f65c0a1 100644 --- a/source/java/org/alfresco/cmis/search/CMISResultSetImpl.java +++ b/source/java/org/alfresco/cmis/search/CMISResultSetImpl.java @@ -31,7 +31,11 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import org.alfresco.cmis.dictionary.CMISDictionaryService; +import org.alfresco.cmis.CMISDictionaryService; +import org.alfresco.cmis.CMISQueryOptions; +import org.alfresco.cmis.CMISResultSet; +import org.alfresco.cmis.CMISResultSetMetaData; +import org.alfresco.cmis.CMISResultSetRow; import org.alfresco.repo.search.impl.querymodel.Query; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeService; diff --git a/source/java/org/alfresco/cmis/search/CMISResultSetMetaDataImpl.java b/source/java/org/alfresco/cmis/search/CMISResultSetMetaDataImpl.java index 0eb02f7327..2e34066b8e 100644 --- a/source/java/org/alfresco/cmis/search/CMISResultSetMetaDataImpl.java +++ b/source/java/org/alfresco/cmis/search/CMISResultSetMetaDataImpl.java @@ -28,9 +28,13 @@ import java.util.LinkedHashMap; import java.util.Map; import org.alfresco.cmis.CMISDataTypeEnum; -import org.alfresco.cmis.dictionary.CMISDictionaryService; -import org.alfresco.cmis.dictionary.CMISPropertyDefinition; -import org.alfresco.cmis.dictionary.CMISTypeDefinition; +import org.alfresco.cmis.CMISDictionaryService; +import org.alfresco.cmis.CMISPropertyDefinition; +import org.alfresco.cmis.CMISQueryOptions; +import org.alfresco.cmis.CMISResultSetColumn; +import org.alfresco.cmis.CMISResultSetMetaData; +import org.alfresco.cmis.CMISResultSetSelector; +import org.alfresco.cmis.CMISTypeDefinition; import org.alfresco.repo.search.impl.querymodel.Column; import org.alfresco.repo.search.impl.querymodel.PropertyArgument; import org.alfresco.repo.search.impl.querymodel.Query; diff --git a/source/java/org/alfresco/cmis/search/CMISResultSetRowImpl.java b/source/java/org/alfresco/cmis/search/CMISResultSetRowImpl.java index 160d6b6271..5f5db46eff 100644 --- a/source/java/org/alfresco/cmis/search/CMISResultSetRowImpl.java +++ b/source/java/org/alfresco/cmis/search/CMISResultSetRowImpl.java @@ -28,7 +28,9 @@ import java.io.Serializable; import java.util.LinkedHashMap; import java.util.Map; -import org.alfresco.cmis.dictionary.CMISDictionaryService; +import org.alfresco.cmis.CMISDictionaryService; +import org.alfresco.cmis.CMISResultSet; +import org.alfresco.cmis.CMISResultSetRow; import org.alfresco.repo.search.impl.querymodel.Column; import org.alfresco.repo.search.impl.querymodel.Query; import org.alfresco.service.cmr.repository.NodeRef; diff --git a/source/java/org/alfresco/cmis/search/CMISResultSetRowIteratorImpl.java b/source/java/org/alfresco/cmis/search/CMISResultSetRowIteratorImpl.java index bc04be3e33..49734339c4 100644 --- a/source/java/org/alfresco/cmis/search/CMISResultSetRowIteratorImpl.java +++ b/source/java/org/alfresco/cmis/search/CMISResultSetRowIteratorImpl.java @@ -26,6 +26,9 @@ package org.alfresco.cmis.search; import java.util.ListIterator; +import org.alfresco.cmis.CMISResultSet; +import org.alfresco.cmis.CMISResultSetRow; + /** * @author andyh */ diff --git a/source/java/org/alfresco/cmis/search/CMISResultSetSelectorImpl.java b/source/java/org/alfresco/cmis/search/CMISResultSetSelectorImpl.java index f030117ce2..191077fbb7 100644 --- a/source/java/org/alfresco/cmis/search/CMISResultSetSelectorImpl.java +++ b/source/java/org/alfresco/cmis/search/CMISResultSetSelectorImpl.java @@ -24,7 +24,8 @@ */ package org.alfresco.cmis.search; -import org.alfresco.cmis.dictionary.CMISTypeDefinition; +import org.alfresco.cmis.CMISResultSetSelector; +import org.alfresco.cmis.CMISTypeDefinition; /** * @author andyh diff --git a/source/java/org/alfresco/cmis/search/CmisFunctionEvaluationContext.java b/source/java/org/alfresco/cmis/search/CmisFunctionEvaluationContext.java index 87c25101bf..5afe0d5af1 100644 --- a/source/java/org/alfresco/cmis/search/CmisFunctionEvaluationContext.java +++ b/source/java/org/alfresco/cmis/search/CmisFunctionEvaluationContext.java @@ -28,8 +28,8 @@ import java.io.Serializable; import java.util.Collection; import java.util.Map; -import org.alfresco.cmis.dictionary.CMISDictionaryService; -import org.alfresco.cmis.dictionary.CMISPropertyDefinition; +import org.alfresco.cmis.CMISDictionaryService; +import org.alfresco.cmis.CMISPropertyDefinition; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext; import org.alfresco.repo.search.impl.querymodel.PredicateMode; diff --git a/source/java/org/alfresco/cmis/search/QueryTest.java b/source/java/org/alfresco/cmis/search/QueryTest.java index 45c2e6e452..e37e0beba3 100644 --- a/source/java/org/alfresco/cmis/search/QueryTest.java +++ b/source/java/org/alfresco/cmis/search/QueryTest.java @@ -34,10 +34,15 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import org.alfresco.cmis.dictionary.BaseCMISTest; -import org.alfresco.cmis.dictionary.CMISDictionaryModel; -import org.alfresco.cmis.dictionary.CMISTypeDefinition; -import org.alfresco.cmis.search.CMISQueryOptions.CMISQueryMode; +import org.alfresco.cmis.CMISDictionaryModel; +import org.alfresco.cmis.CMISQueryException; +import org.alfresco.cmis.CMISQueryOptions; +import org.alfresco.cmis.CMISResultSet; +import org.alfresco.cmis.CMISResultSetMetaData; +import org.alfresco.cmis.CMISResultSetRow; +import org.alfresco.cmis.CMISTypeDefinition; +import org.alfresco.cmis.CMISQueryOptions.CMISQueryMode; +import org.alfresco.cmis.mapping.BaseCMISTest; import org.alfresco.model.ContentModel; import org.alfresco.repo.search.impl.parsers.CMISLexer; import org.alfresco.repo.search.impl.parsers.CMISParser; diff --git a/source/java/org/alfresco/repo/service/ServiceDescriptorRegistry.java b/source/java/org/alfresco/repo/service/ServiceDescriptorRegistry.java index 9f6a54465d..60802a815f 100644 --- a/source/java/org/alfresco/repo/service/ServiceDescriptorRegistry.java +++ b/source/java/org/alfresco/repo/service/ServiceDescriptorRegistry.java @@ -26,9 +26,9 @@ package org.alfresco.repo.service; import java.util.Collection; -import org.alfresco.cmis.CMISService; -import org.alfresco.cmis.dictionary.CMISDictionaryService; -import org.alfresco.cmis.search.CMISQueryService; +import org.alfresco.cmis.CMISDictionaryService; +import org.alfresco.cmis.CMISQueryService; +import org.alfresco.cmis.CMISServices; import org.alfresco.mbeans.VirtServerRegistry; import org.alfresco.repo.forms.FormService; import org.alfresco.repo.transaction.RetryingTransactionHelper; @@ -513,9 +513,9 @@ public class ServiceDescriptorRegistry * (non-Javadoc) * @see org.alfresco.service.ServiceRegistry#getCMISService() */ - public CMISService getCMISService() + public CMISServices getCMISService() { - return (CMISService)getService(CMIS_SERVICE); + return (CMISServices)getService(CMIS_SERVICE); } /* diff --git a/source/java/org/alfresco/service/ServiceRegistry.java b/source/java/org/alfresco/service/ServiceRegistry.java index 671c8e4a6c..57b3e8db51 100644 --- a/source/java/org/alfresco/service/ServiceRegistry.java +++ b/source/java/org/alfresco/service/ServiceRegistry.java @@ -26,9 +26,9 @@ package org.alfresco.service; import java.util.Collection; -import org.alfresco.cmis.CMISService; -import org.alfresco.cmis.dictionary.CMISDictionaryService; -import org.alfresco.cmis.search.CMISQueryService; +import org.alfresco.cmis.CMISDictionaryService; +import org.alfresco.cmis.CMISQueryService; +import org.alfresco.cmis.CMISServices; import org.alfresco.mbeans.VirtServerRegistry; import org.alfresco.repo.forms.FormService; import org.alfresco.repo.transaction.RetryingTransactionHelper; @@ -478,7 +478,7 @@ public interface ServiceRegistry * @return the CMIS service */ @NotAuditable - CMISService getCMISService(); + CMISServices getCMISService(); /** * Get the CMIS Dictionary service (or null if one is not provided)