Britt Park be6a222554 Extended the content model to include relevant avm specific types.
cm:avmcontent and cm:avmfolder are 'abstract'.  cm:avmplaincontent is derived
from cm:avmcontent and is just a plain file. cm:avmlayeredcontent is derived
from cm:avmcontent and is (surprise) a layered file and has a d:noderef mandatory
property, cm:avmfileindirection, that is the (possibly non-existent) file that
the layered file is transparent to.  cm:avmplainfolder is derived from 
cm:avmfolder and is just a plain directory.  cm:avmlayeredfolder is a layered
directory and has a property, cm:avmdirinderection, that is the (possibly
non-existent) directory that the layered directory is transparent to.
The ContentModel QName constants are.
TYPE_AVM_PLAIN_FOLDER
TYPE_AVM_LAYERED_FOLDER
TYPE_AVM_PLAIN_CONTENT
TYPE_AVM_LAYERED_CONTENT
PROP_AVM_DIR_INDIRECTION
PROP_AVM_FILE_INDIRECTION
One can now create all four flavors of avm nodes through 
AVMNodeService.createNode().  The advantage of using these over the
corresponding AVMService methods is that since (for now) AVMService, is
permission and indexing unaware.
Backed out cm:mounted aspect and dispatching code in DbNodeServiceImpl.  
(Dave and Derek, you may now relax) as we are implementing the UI with
AVM dedicated screens.
Finally, beginning interface for AVM node tree synchronization and comparison.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3764 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-09-12 03:16:10 +00:00

76 lines
3.0 KiB
Java

/*
* Copyright (C) 2006 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.service.cmr.avmsync;
import java.util.List;
/**
* This service handles comparisons and synchronizations between
* corresponding avm node trees.
* @author britt
*/
public interface AvmSyncService
{
/**
* Get a difference list between two corresponding node trees.
* @param srcVersion The version id for the source tree.
* @param srcPath The avm path to the source tree.
* @param dstVersion The version id for the destination tree.
* @param dstPath The avm path to the destination tree.
* @return A List of AVMDifference structs which can be used for
* the update operation.
*/
public List<AVMDifference> compare(int srcVersion, String srcPath,
int dstVersion, String dstPath);
/**
* Updates the destination nodes in the AVMDifferences
* with the source nodes. Normally any conflicts or cases in
* which the source of an AVMDifference is older than the destination
* will cause the transaction to roll back.
* @param diffList A List of AVMDifference structs.
* @param ignoreConflicts If this is true the update will skip those
* AVMDifferences which are in conflict or for which the source is older than
* the destination.
* @param overrideConflicts If this is true the update will override conflicting
* AVMDifferences and replace the destination with the conflicting source.
* @param overrideOlder If this is true the update will override AVMDifferences
* in which the source is older than the destination and overwrite the destination.
*/
public void update(List<AVMDifference> diffList, boolean ignoreConflicts,
boolean overrideConflicts, boolean overrideOlder);
/**
* Flattens a layer so that all all nodes under and including
* <code>layerPath</code> become translucent to any nodes in the
* corresponding location under and including <code>underlyingPath</code>
* that are the same version.
* @param layerPath The overlying layer path.
* @param underlyingPath The underlying path.
*/
public void flatten(String layerPath, String underlyingPath);
/**
* Takes a layer, deletes it and recreates it pointing at the same underlying
* node. Any changes in the layer are lost (except to history if the layer has been
* snapshotted.)
* @param layerPath
*/
public void resetLayer(String layerPath);
}