org.eclipse.emf.emfstore.internal.client.configuration
Class Behavior

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.configuration.Behavior

public class Behavior
extends Object

Configuration options that influence the behavior of the client.

Author:
emueller, ovonwesen, mkoegel

Field Summary
static String AUTO_SAVE_EXTENSION_POINT_ATTRIBUTE_NAME
          Auto save option identifier.
static String CHANGEPACKAGE_FRAGMENT_SIZE
          Change package fragment size option identifier.
static String CUT_OFF_INCOMING_CROSS_REFS_EXTENSION_POINT_ATTRIBUTE_NAME
          'Cut off incoming references' option identifier.
static String DENY_ADD_CUT_ELEMENTS_TO_MODELELEMENTS_FEATURE_EXTENSION_POINT_ATTRIBUTE_NAME
          'Deny add cut elements to model elements feature' option identifier.
static String FORCE_COMMANDS_EXTENSION_POINT_ATTRIBUTE_NAME
          'Force commands' option identifier.
static long NO_CHECKSUM
          The checksum value that is used in case no checksum should be computed.
static String OPERATION_MODIFIER
          Operation modifier option identifier.
static String RERECORD_LOCAL_CHANGES_EXTENSION_POINT_ATTRIBUTE_NAME
          Re-record option identifier.
static String RESOURCE_OPTIONS_EXTENSION_POINT_NAME
          Base identifier for all change recording related options.
static String USE_IN_MEMORY_CHANGE_PACKAGE
          Use in-memory change packages option identifier.
 
Constructor Summary
Behavior()
           
 
Method Summary
 com.google.common.base.Optional<Integer> getChangePackageFragmentSize()
          Returns the change package fragments size.
 ESChecksumErrorHandler getChecksumErrorHandler()
          Returns the active ESChecksumErrorHandler.
 List<ServerInfo> getDefaultServerInfos()
          Get the default server info.
 ESOperationModifier getOperationModifier()
          Returns the operation modifier.
 boolean isAutoSaveEnabled()
          Whether auto-save is enabled.
 boolean isChecksumCheckActive()
          Whether the checksum check is active.
 Boolean isCutOffIncomingCrossReferencesActivated()
          Whether incoming cross references should be cut off.
 Boolean isDenyAddCutElementsToModelElementsFeatureActived()
          Whether cut elements are added automatically as regular model elements by default.
 Boolean isForceCommandsActived()
          Whether the usage of commands is enforced.
 Boolean isRerecordingActivated()
          Whether re-recording is enabled.
 void setAutoSave(boolean enabled)
          Whether to enable the automatic saving of the workspace.
 void setChangePackageFragmentSize(com.google.common.base.Optional<Integer> fragmentSize)
          Sets the fragment size to be used when splitting change packages.
 void setChecksumErrorHandler(ESChecksumErrorHandler errorHandler)
          Set the active ESChecksumErrorHandler.
 boolean useInMemoryChangePackage()
          Whether the in-memory change package should be used.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_CHECKSUM

public static final long NO_CHECKSUM
The checksum value that is used in case no checksum should be computed.

See Also:
Constant Field Values

RESOURCE_OPTIONS_EXTENSION_POINT_NAME

public static final String RESOURCE_OPTIONS_EXTENSION_POINT_NAME
Base identifier for all change recording related options.

See Also:
Constant Field Values

AUTO_SAVE_EXTENSION_POINT_ATTRIBUTE_NAME

public static final String AUTO_SAVE_EXTENSION_POINT_ATTRIBUTE_NAME
Auto save option identifier.

See Also:
Constant Field Values

RERECORD_LOCAL_CHANGES_EXTENSION_POINT_ATTRIBUTE_NAME

public static final String RERECORD_LOCAL_CHANGES_EXTENSION_POINT_ATTRIBUTE_NAME
Re-record option identifier.

See Also:
Constant Field Values

CUT_OFF_INCOMING_CROSS_REFS_EXTENSION_POINT_ATTRIBUTE_NAME

public static final String CUT_OFF_INCOMING_CROSS_REFS_EXTENSION_POINT_ATTRIBUTE_NAME
'Cut off incoming references' option identifier.

See Also:
Constant Field Values

FORCE_COMMANDS_EXTENSION_POINT_ATTRIBUTE_NAME

public static final String FORCE_COMMANDS_EXTENSION_POINT_ATTRIBUTE_NAME
'Force commands' option identifier.

See Also:
Constant Field Values

DENY_ADD_CUT_ELEMENTS_TO_MODELELEMENTS_FEATURE_EXTENSION_POINT_ATTRIBUTE_NAME

public static final String DENY_ADD_CUT_ELEMENTS_TO_MODELELEMENTS_FEATURE_EXTENSION_POINT_ATTRIBUTE_NAME
'Deny add cut elements to model elements feature' option identifier.

See Also:
Constant Field Values

USE_IN_MEMORY_CHANGE_PACKAGE

public static final String USE_IN_MEMORY_CHANGE_PACKAGE
Use in-memory change packages option identifier.

See Also:
Constant Field Values

CHANGEPACKAGE_FRAGMENT_SIZE

public static final String CHANGEPACKAGE_FRAGMENT_SIZE
Change package fragment size option identifier.

See Also:
Constant Field Values

OPERATION_MODIFIER

public static final String OPERATION_MODIFIER
Operation modifier option identifier.

See Also:
Constant Field Values
Constructor Detail

Behavior

public Behavior()
Method Detail

setAutoSave

public void setAutoSave(boolean enabled)
Whether to enable the automatic saving of the workspace. If disabled, performance improves vastly, but clients have to perform the saving of the workspace manually.

Parameters:
enabled - whether to enable auto save

isAutoSaveEnabled

public boolean isAutoSaveEnabled()
Whether auto-save is enabled.

Returns:
true, if auto-save is enabled, false otherwise

isRerecordingActivated

public Boolean isRerecordingActivated()
Whether re-recording is enabled.

Returns:
true, if re-recording is enabled, false otherwise

isCutOffIncomingCrossReferencesActivated

public Boolean isCutOffIncomingCrossReferencesActivated()
Whether incoming cross references should be cut off.

Returns:
Boolean.TRUE, if incoming cross references are cut off, Boolean.FALSE otherwise

isForceCommandsActived

public Boolean isForceCommandsActived()
Whether the usage of commands is enforced. Default is Boolean.FALSE.

Returns:
Boolean.TRUE, if usage of commands is enforced, Boolean.FALSE otherwise

isDenyAddCutElementsToModelElementsFeatureActived

public Boolean isDenyAddCutElementsToModelElementsFeatureActived()
Whether cut elements are added automatically as regular model elements by default.

Returns:
Boolean.TRUE, if cut elements are added automatically as regular elements, Boolean.FALSE otherwise

isChecksumCheckActive

public boolean isChecksumCheckActive()
Whether the checksum check is active. If true, and checksum comparison fails, an ESChecksumErrorHandler will be active.

Returns:
true, if the checksum comparison is activated, false otherwise

getChecksumErrorHandler

public ESChecksumErrorHandler getChecksumErrorHandler()
Returns the active ESChecksumErrorHandler. The default is ChecksumErrorHandler.AUTOCORRECT.

Returns:
the active checksum error handler

setChecksumErrorHandler

public void setChecksumErrorHandler(ESChecksumErrorHandler errorHandler)
Set the active ESChecksumErrorHandler.

Parameters:
errorHandler - the error handler to be set

useInMemoryChangePackage

public boolean useInMemoryChangePackage()
Whether the in-memory change package should be used.

Returns:
true, if the in-memory change package should be used, false otherwise

getChangePackageFragmentSize

public com.google.common.base.Optional<Integer> getChangePackageFragmentSize()
Returns the change package fragments size.

Returns:
the fragment size in operations, or absent, if none configured

getOperationModifier

public ESOperationModifier getOperationModifier()
Returns the operation modifier.

Returns:
the operation modifier in use

setChangePackageFragmentSize

public void setChangePackageFragmentSize(com.google.common.base.Optional<Integer> fragmentSize)
Sets the fragment size to be used when splitting change packages.

Parameters:
fragmentSize - the fragment size (operation count)

getDefaultServerInfos

public List<ServerInfo> getDefaultServerInfos()
Get the default server info.

Returns:
server info


Copyright © 2016. All Rights Reserved.