public final class RegistrySynchronizer extends Object
checkIn(org.wso2.carbon.registry.core.session.UserRegistry, java.lang.String, java.lang.String, boolean, boolean)
, checkOut(org.wso2.carbon.registry.core.session.UserRegistry, java.lang.String, java.lang.String)
and update(org.wso2.carbon.registry.core.session.UserRegistry, java.lang.String)
.Modifier and Type | Method and Description |
---|---|
static boolean |
checkIn(UserRegistry registry,
String filePath)
Method to check-in some filesystem based resources and collections (which are files and
directories), into a specified registry instance.
|
static boolean |
checkIn(UserRegistry registry,
String filePath,
boolean silentUpdate)
Method to check-in some filesystem based resources and collections (which are files and
directories), into a specified registry instance.
|
static boolean |
checkIn(UserRegistry registry,
String filePath,
String registryPath)
Method to check-in some filesystem based resources and collections (which are files and
directories), into a specified registry instance.
|
static boolean |
checkIn(UserRegistry registry,
String filePath,
String registryPath,
boolean silentUpdate)
Method to check-in some filesystem based resources and collections (which are files and
directories), into a specified registry instance.
|
static boolean |
checkIn(UserRegistry registry,
String filePath,
String registryPath,
boolean silentUpdate,
boolean forcedCheckIn)
Method to check-in some filesystem based resources and collections (which are files and
directories), into a specified registry instance.
|
static boolean |
checkOut(UserRegistry registry,
String filePath,
String resourcePath)
Method to check-out some resources and collections on a registry into a filesystem which will
create some files and directories in the process.
|
static boolean |
isCheckedOut(String directoryPath)
Method to determine whether a check-out has already been made at the given directory
location.
|
static boolean |
update(UserRegistry registry,
String filePath)
Method to update an already checked out resource or collection to the latest version found on
the specified registry instance.
|
static boolean |
update(UserRegistry registry,
String filePath,
boolean silentUpdate)
Method to update an already checked out resource or collection to the latest version found on
the specified registry instance.
|
public static boolean checkIn(UserRegistry registry, String filePath, String registryPath, boolean silentUpdate, boolean forcedCheckIn) throws SynchronizationException
registry
- the registry instance to be used.filePath
- the path on the filesystem containing the corresponding resources and
collections.registryPath
- the target path of the registry that check-in should be done.silentUpdate
- to ignore the conflicts and perform silent update.forcedCheckIn
- check-in the changes irrespective of whether the content has changed
or not.SynchronizationException
- if an error occurred while performing the operation.public static boolean checkIn(UserRegistry registry, String filePath, String registryPath, boolean silentUpdate) throws SynchronizationException
registry
- the registry instance to be used.filePath
- the path on the filesystem containing the corresponding resources and
collections.registryPath
- the target path of the registry that check-in should be done.silentUpdate
- to ignore the conflicts and perform silent update.SynchronizationException
- if an error occurred while performing the operation.public static boolean checkIn(UserRegistry registry, String filePath, String registryPath) throws SynchronizationException
registry
- the registry instance to be used.filePath
- the path on the filesystem containing the corresponding resources and
collections.registryPath
- the target path of the registry that check-in should be done.SynchronizationException
- if an error occurred while performing the operation.public static boolean checkIn(UserRegistry registry, String filePath) throws SynchronizationException
registry
- the registry instance to be used.filePath
- the path on the filesystem containing the corresponding resources and
collections.SynchronizationException
- if an error occurred while performing the operation.public static boolean checkIn(UserRegistry registry, String filePath, boolean silentUpdate) throws SynchronizationException
registry
- the registry instance to be used.filePath
- the path on the filesystem containing the corresponding resources and
collections.silentUpdate
- to ignore the conflicts and perform silent update.SynchronizationException
- if an error occurred while performing the operation.public static boolean checkOut(UserRegistry registry, String filePath, String resourcePath) throws SynchronizationException
registry
- the registry instance to be used.filePath
- the path on the filesystem to which the corresponding resources and
collections will be checked out.resourcePath
- the path on the registry instance where the resources and the collections
can be found.SynchronizationException
- if an error occurred while performing the operation.public static boolean update(UserRegistry registry, String filePath) throws SynchronizationException
registry
- the registry instance to be used.filePath
- the path on the filesystem containing the corresponding resources and
collections.SynchronizationException
- if an error occurred while performing the operation.public static boolean update(UserRegistry registry, String filePath, boolean silentUpdate) throws SynchronizationException
update(UserRegistry, String)
command, a .mine and a .server file will be created if a conflict occurred. However, in this
method, you could specify whether conflicts should simply be ignored.registry
- the registry instance to be used.filePath
- the path on the filesystem containing the corresponding resources and
collections.silentUpdate
- to ignore the conflicts and perform silent update.SynchronizationException
- if an error occurred while performing the operation.public static boolean isCheckedOut(String directoryPath)
directoryPath
- the path of the directory on the filesystemCopyright © 2015 WSO2 Inc. All Rights Reserved.