public abstract class ResourceVariantTree extends AbstractResourceVariantTree
AbstractResourceVariantTree using a
ResourceVariantByteStore.IResourceVariantTree,
AbstractResourceVariantTree,
ResourceVariantByteStore| Modifier | Constructor and Description |
|---|---|
protected |
ResourceVariantTree(ResourceVariantByteStore store)
Create a resource variant tree that uses the provided byte store to
cache the resource variant bytes.
|
| Modifier and Type | Method and Description |
|---|---|
protected IResource[] |
collectChanges(IResource local,
IResourceVariant remote,
int depth,
IProgressMonitor monitor)
Collect the changes in the remote tree to the specified depth.
|
void |
flushVariants(IResource resource,
int depth)
Flush any variants in the tree for the given resource to the depth
specified.
|
protected byte[] |
getBytes(IResource local,
IResourceVariant remote)
Get the bytes to be stored in the
ResourceVariantByteStore
from the given resource variant. |
protected ResourceVariantByteStore |
getByteStore()
Get the byte store that is used to cache the serialization bytes
for the resource variants of this tree.
|
boolean |
hasResourceVariant(IResource resource)
Return whether the local resource has a variant in this tree.
|
IResource[] |
members(IResource resource)
Returns the members of the local resource that have resource variants in this tree.
|
protected boolean |
setVariant(IResource local,
IResourceVariant remote)
Set the variant associated with the local resource to the newly fetched resource
variant.
|
collectedMembers, fetchMembers, fetchVariant, refresh, refreshclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetResourceVariant, rootsprotected ResourceVariantTree(ResourceVariantByteStore store)
store - the resource variant byte store used to cache resource variantspublic IResource[] members(IResource resource) throws TeamException
IResourceVariantTreegetResourceVariant(IResource).resource - the local resourceTeamExceptionpublic boolean hasResourceVariant(IResource resource) throws TeamException
IResourceVariantTreeresource - the local resourcetrue if the tree contains a variant for the resourceTeamExceptionpublic void flushVariants(IResource resource, int depth) throws TeamException
IResourceVariantTreeresource - the resourcedepth - the flush depth (one of IResource.DEPTH_ZERO,
IResource.DEPTH_ONE, or IResource.DEPTH_INFINITE)TeamExceptionprotected boolean setVariant(IResource local, IResourceVariant remote) throws TeamException
AbstractResourceVariantTreesetVariant in class AbstractResourceVariantTreelocal - the local resourceremote - the newly fetched resource varianttrue if the resource variant changedTeamExceptionprotected ResourceVariantByteStore getByteStore()
This method is not intended to be overridden by subclasses.
protected byte[] getBytes(IResource local, IResourceVariant remote) throws TeamException
ResourceVariantByteStore
from the given resource variant. By default, the IResourceVariant#asBytes()
method is used to get the bytes.local - the local resourceremote - the corresponding resource variant handleTeamExceptionprotected IResource[] collectChanges(IResource local, IResourceVariant remote, int depth, IProgressMonitor monitor) throws TeamException
AbstractResourceVariantTreecollectChanges in class AbstractResourceVariantTreelocal - the local resource being refreshedremote - the corresponding resource variantdepth - the depth of the refresh (one of IResource.DEPTH_ZERO,
IResource.DEPTH_ONE, or IResource.DEPTH_INFINITE)monitor - a progress monitorTeamExceptionGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.