Package com.day.cq.replication
Interface AgentConfig
public interface AgentConfig
The configuration of a replication agent.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of the access token provider.static final StringDeprecated.Use ACCESS_TOKEN_PROVIDER_NAMEstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDeprecated.- this is not used anymore.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringUse to enable SSL client authentication.static final StringUse default settings.static final StringUse to accept self-certified SSL certificates.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if a replication with this agent should also replicate aliases, vanity URLs.booleanChecks whether the agent allows the use of expired certificates or not.voidChecks if the configuration is valid and throws an exception if not.Returns the id for the agent of this configuration.The id of the user that is used to build the replication content.String[]The list of alternative destination URI.longIf batch mode is enabled for this agent, this method returns a positive byte size.longIf batch mode is enabled for this agent, this method returns a positive number in seconds.Returns the group of this configurationReturns the path to the configuration node.getId()Returns the id of this configuration.The current log level - DEBUG, INFO, or ERROR.intDeprecated.This is handled by the queue configurationgetName()The descriptive name of this replication agent.Returns All agent properties as value map.longThe retry delay in milliseconds.The name of the serialization type.Returns SSL config mode.The target user password for delivering the content.The destination URI.The target user name for delivering the content.booleanReturns if the replication by this agent is performed in batch mode.booleanChecks if this agent is enabled This is a convenience method and returns the propertyAGENT_ENABLED.booleanChecks if this agent is in maintenance mode This is a convenience method and returns the propertyAGENT_MAINTENANCE.booleanChecks whether the agent is using the OAuth 2.0 Authorization Grants mechanism or not.booleanChecks if this agent is used for specific applications.booleanChecks if this agent is used when a property "cq:distribute" has been modified.booleanChecks if this agent is used for "replicate on modification".booleanChecks if this agent is used for "replicate if on-/offtime reached".booleanDetermines if a replication with this agent should be triggered once the replication request is received.booleanDetermines if a replication with this agent should suppress update of the replication status.booleanDetermines if a replication with this agent should suppress implicit versioning.booleanChecks if this agent is used for reverse replication.
-
Field Details
-
AGENT_NAME
- See Also:
-
AGENT_DESCRIPTION
- See Also:
-
AGENT_ENABLED
- See Also:
-
AGENT_LOG_LEVEL
- See Also:
-
AGENT_USER_ID
- See Also:
-
TRIGGER_SPECIFIC
- See Also:
-
TRIGGER_MODIFIED
- See Also:
-
TRIGGER_ONOFFTIME
- See Also:
-
TRIGGER_DISTRIBUTE
- See Also:
-
REVERSE_REPLICATION
- See Also:
-
TRIGGER_RECEIVE
- See Also:
-
QUEUE_RETRY_DELAY
- See Also:
-
QUEUE_BATCH_MODE
- See Also:
-
QUEUE_BATCH_WAIT_TIME
- See Also:
-
QUEUE_BATCH_MAX_SIZE
- See Also:
-
QUEUE_MAX_RETRIES
Deprecated.- this is not used anymore.- See Also:
-
SERIALIZATION_TYPE
- See Also:
-
TRANSPORT_URI
- See Also:
-
TRANSPORT_USER
- See Also:
-
TRANSPORT_PASSWORD
- See Also:
-
TRANSPORT_NTLM_DOMAIN
- See Also:
-
TRANSPORT_NTLM_HOST
- See Also:
-
PROTOCOL_VERSION
- See Also:
-
PROTOCOL_CONNECT_TIMEOUT
- See Also:
-
PROTOCOL_INTERFACE
- See Also:
-
PROTOCOL_SOCKET_TIMEOUT
- See Also:
-
PROXY_HOST
- See Also:
-
PROXY_PORT
- See Also:
-
PROXY_USER
- See Also:
-
PROXY_PASS
- See Also:
-
PROXY_NTLM_DOMAIN
- See Also:
-
PROXY_NTLM_HOST
- See Also:
-
PROTOCOL_HTTP_HEADERS
- See Also:
-
PROTOCOL_HTTP_METHOD
- See Also:
-
PROTOCOL_HTTP_CONNECTION_CLOSE
- See Also:
-
PROTOCOL_HTTPS_RELAXED
- See Also:
-
PROTOCOL_HTTPS_EXPIRED
- See Also:
-
ENABLE_OAUTH
- See Also:
-
ACCESS_TOKEN_PROVIDER_PID
Deprecated.Use ACCESS_TOKEN_PROVIDER_NAMEAccess token provider pid- See Also:
-
ACCESS_TOKEN_PROVIDER_NAME
Name of the access token provider. The access token provider must be registered with the service registration property "name" with the same value.- Since:
- 6.4.0
- See Also:
-
SSL_CONFIG
- See Also:
-
SSL_CONFIG_DEFAULT
Use default settings.- See Also:
-
SSL_CONFIG_RELAXED
Use to accept self-certified SSL certificates.- See Also:
-
SSL_CONFIG_CLIENT_AUTH
Use to enable SSL client authentication.- See Also:
-
CQ_DISTRIBUTE
- See Also:
-
AGENT_NO_VERSIONS
- See Also:
-
AGENT_NO_STATUS_UPDATE
- See Also:
-
AGENT_MAINTENANCE
- See Also:
-
AGENT_ALIAS_UPDATE
- See Also:
-
-
Method Details
-
checkValid
void checkValid()Checks if the configuration is valid and throws an exception if not. The message of the exception can be used as hint why the config is not valid.- Throws:
IllegalArgumentException- if not valid.
-
getId
String getId()Returns the id of this configuration.- Returns:
- the id
-
getAgentId
String getAgentId()Returns the id for the agent of this configuration. note that there can be several configurations with the same agent id but in different groups (i.e. run modes).- Returns:
- the agent id
-
getConfigPath
String getConfigPath()Returns the path to the configuration node. If the configuration is not stored in the repository,nullis returned.- Returns:
- the path to the config or
null
-
getName
String getName()The descriptive name of this replication agent. This is a convenience method and returns the propertyAGENT_NAME- Returns:
- agent name
-
getConfigGroup
AgentConfigGroup getConfigGroup()Returns the group of this configuration- Returns:
- the config group
-
getTransportURI
String getTransportURI()The destination URI. This uri is one of those defined in the propertyTRANSPORT_URI.- Returns:
- the destination URI.
-
getAllTransportURIs
String[] getAllTransportURIs()The list of alternative destination URI. This is a convenience method and returns the uris defined in the propertyTRANSPORT_URIas a comma separated list.- Returns:
- the destination URI.
-
getTransportUser
String getTransportUser()The target user name for delivering the content. This is a convenience method and returns the propertyTRANSPORT_USER.- Returns:
- transport user name
-
getTransportPassword
String getTransportPassword()The target user password for delivering the content. This is a convenience method and returns the propertyTRANSPORT_PASSWORD.- Returns:
- plain text transport password
-
getSerializationType
String getSerializationType()The name of the serialization type. A correspondingContentBuilderwith this name must be registered. This is a convenience method and returns the propertySERIALIZATION_TYPE.- Returns:
- name of the content builder
-
getAgentUserId
String getAgentUserId()The id of the user that is used to build the replication content. This is a convenience method and returns the propertyAGENT_USER_ID.- Returns:
- the userid or
null
-
getRetryDelay
long getRetryDelay()The retry delay in milliseconds. This is a convenience method and returns the propertyQUEUE_RETRY_DELAY.- Returns:
- retry delay.
-
isEnabled
boolean isEnabled()Checks if this agent is enabled This is a convenience method and returns the propertyAGENT_ENABLED.- Returns:
trueif this agent is enabled
-
getLogLevel
String getLogLevel()The current log level - DEBUG, INFO, or ERROR. This is a convenience method and returns the propertyAGENT_LOG_LEVEL.- Returns:
- log lever
-
getMaxRetries
Deprecated.This is handled by the queue configurationThe number of retries before the replication is cancelled. This is a convenience method and returns the propertyQUEUE_MAX_RETRIES.- Returns:
- The number of retries or -1 for endless retries.
-
isBatchMode
boolean isBatchMode()Returns if the replication by this agent is performed in batch mode.- Returns:
- If the replication is performed in batch mode.
- Since:
- 5.12.0
-
getBatchWaitTime
long getBatchWaitTime()If batch mode is enabled for this agent, this method returns a positive number in seconds. This time specifies the maximum wait time for a batch to be sent.- Returns:
- The batch wait time in seconds.
- Since:
- 5.12.0
-
getBatchMaxSize
long getBatchMaxSize()If batch mode is enabled for this agent, this method returns a positive byte size. With the first replication exceeding this size, the batch is sent.- Returns:
- The maximum batch size in bytes.
- Since:
- 5.12.0
-
isSpecific
boolean isSpecific()Checks if this agent is used for specific applications. Specific agents are used by the application for special application specific replications and are not used during a general replication. This is a convenience method and returns the propertyTRIGGER_SPECIFIC.- Returns:
trueif agent is specific
-
isTriggeredOnModification
boolean isTriggeredOnModification()Checks if this agent is used for "replicate on modification". If this flag istrueeach modification to the content will trigger a replication action on this agent. This is a convenience method and returns the propertyTRIGGER_MODIFIED.- Returns:
trueif this agent auto replicates on modification.
-
isTriggeredOnOffTime
boolean isTriggeredOnOffTime()Checks if this agent is used for "replicate if on-/offtime reached". If this flag istrueany content that reached an on-/offtime boundary will trigger a replication action on this agent. This is a convenience method and returns the propertyTRIGGER_ONOFFTIME.- Returns:
trueif this agent auto replicates when on-/offtime reached
-
isTriggeredOnDistribute
boolean isTriggeredOnDistribute()Checks if this agent is used when a property "cq:distribute" has been modified. This is a convenience method and returns the propertyTRIGGER_DISTRIBUTE.- Returns:
trueif this agent replicates on this property change
-
usedForReverseReplication
boolean usedForReverseReplication()Checks if this agent is used for reverse replication. This is a convenience method and returns the propertyREVERSE_REPLICATION.- Returns:
trueif this agent is used for reverse replication.
-
noVersions
boolean noVersions()Determines if a replication with this agent should suppress implicit versioning. If all participating agents of a replication specify this flag, the respective flags are set in the replication options passed to the preprocessors.
This is a convenience method and returns the property
AGENT_NO_VERSIONS.- Returns:
trueif a replication with this agent should not trigger implicit versioning.- Since:
- 5.4
-
noStatusUpdate
boolean noStatusUpdate()Determines if a replication with this agent should suppress update of the replication status. If all participating agents of a replication specify this flag, the replication status is not updated after a replication.
This is a convenience method and returns the property
AGENT_NO_STATUS_UPDATE.- Returns:
trueif a replication with this agent should not update the replication status.- Since:
- 5.4
-
getProperties
ValueMap getProperties()Returns All agent properties as value map.- Returns:
- agent properties
-
isTriggeredOnReceive
boolean isTriggeredOnReceive()Determines if a replication with this agent should be triggered once the replication request is received. This is used particularly for chain replication- Returns:
trueif the agent should be triggered once replication is received- Since:
- 5.5.19
-
isInMaintenanceMode
boolean isInMaintenanceMode()Checks if this agent is in maintenance mode This is a convenience method and returns the propertyAGENT_MAINTENANCE.- Returns:
trueif this agent is in maintenance mode
-
aliasUpdate
boolean aliasUpdate()Determines if a replication with this agent should also replicate aliases, vanity URLs.- Returns:
trueif agent should handle replication for aliases, vanity URLs
-
getSSLConfig
String getSSLConfig()Returns SSL config mode. Values are default, relaxed or clientauth.- Returns:
- SSL settings
- See Also:
-
allowsExpiredCertificates
boolean allowsExpiredCertificates()Checks whether the agent allows the use of expired certificates or not.- Returns:
trueif the agent accepts expired certificates,falseotherwise
-
isOAuthEnabled
boolean isOAuthEnabled()Checks whether the agent is using the OAuth 2.0 Authorization Grants mechanism or not. This is a convenience method and returns the propertyENABLE_OAUTH- Returns:
trueif the authorization grants mechanism is enabled
-