Package com.day.cq.replication
Interface AgentConfig
-
public interface AgentConfig
The configuration of a replication agent.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ACCESS_TOKEN_PROVIDER_NAME
Name of the access token provider.static java.lang.String
ACCESS_TOKEN_PROVIDER_PID
Deprecated.Use ACCESS_TOKEN_PROVIDER_NAMEstatic java.lang.String
AGENT_ALIAS_UPDATE
static java.lang.String
AGENT_DESCRIPTION
static java.lang.String
AGENT_ENABLED
static java.lang.String
AGENT_LOG_LEVEL
static java.lang.String
AGENT_MAINTENANCE
static java.lang.String
AGENT_NAME
static java.lang.String
AGENT_NO_STATUS_UPDATE
static java.lang.String
AGENT_NO_VERSIONS
static java.lang.String
AGENT_USER_ID
static java.lang.String
CQ_DISTRIBUTE
static java.lang.String
ENABLE_OAUTH
static java.lang.String
PROTOCOL_CONNECT_TIMEOUT
static java.lang.String
PROTOCOL_HTTP_CONNECTION_CLOSE
static java.lang.String
PROTOCOL_HTTP_HEADERS
static java.lang.String
PROTOCOL_HTTP_METHOD
static java.lang.String
PROTOCOL_HTTPS_EXPIRED
static java.lang.String
PROTOCOL_HTTPS_RELAXED
static java.lang.String
PROTOCOL_INTERFACE
static java.lang.String
PROTOCOL_SOCKET_TIMEOUT
static java.lang.String
PROTOCOL_VERSION
static java.lang.String
PROXY_HOST
static java.lang.String
PROXY_NTLM_DOMAIN
static java.lang.String
PROXY_NTLM_HOST
static java.lang.String
PROXY_PASS
static java.lang.String
PROXY_PORT
static java.lang.String
PROXY_USER
static java.lang.String
QUEUE_BATCH_MAX_SIZE
static java.lang.String
QUEUE_BATCH_MODE
static java.lang.String
QUEUE_BATCH_WAIT_TIME
static java.lang.String
QUEUE_MAX_RETRIES
Deprecated.- this is not used anymore.static java.lang.String
QUEUE_RETRY_DELAY
static java.lang.String
REVERSE_REPLICATION
static java.lang.String
SERIALIZATION_TYPE
static java.lang.String
SSL_CONFIG
static java.lang.String
SSL_CONFIG_CLIENT_AUTH
Use to enable SSL client authentication.static java.lang.String
SSL_CONFIG_DEFAULT
Use default settings.static java.lang.String
SSL_CONFIG_RELAXED
Use to accept self-certified SSL certificates.static java.lang.String
TRANSPORT_NTLM_DOMAIN
static java.lang.String
TRANSPORT_NTLM_HOST
static java.lang.String
TRANSPORT_PASSWORD
static java.lang.String
TRANSPORT_URI
static java.lang.String
TRANSPORT_USER
static java.lang.String
TRIGGER_DISTRIBUTE
static java.lang.String
TRIGGER_MODIFIED
static java.lang.String
TRIGGER_ONOFFTIME
static java.lang.String
TRIGGER_RECEIVE
static java.lang.String
TRIGGER_SPECIFIC
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description boolean
aliasUpdate()
Determines if a replication with this agent should also replicate aliases, vanity URLs.boolean
allowsExpiredCertificates()
Checks whether the agent allows the use of expired certificates or not.void
checkValid()
Checks if the configuration is valid and throws an exception if not.java.lang.String
getAgentId()
Returns the id for the agent of this configuration.java.lang.String
getAgentUserId()
The id of the user that is used to build the replication content.java.lang.String[]
getAllTransportURIs()
The list of alternative destination URI.long
getBatchMaxSize()
If batch mode is enabled for this agent, this method returns a positive byte size.long
getBatchWaitTime()
If batch mode is enabled for this agent, this method returns a positive number in seconds.AgentConfigGroup
getConfigGroup()
Returns the group of this configurationjava.lang.String
getConfigPath()
Returns the path to the configuration node.java.lang.String
getId()
Returns the id of this configuration.java.lang.String
getLogLevel()
The current log level - DEBUG, INFO, or ERROR.int
getMaxRetries()
Deprecated.This is handled by the queue configurationjava.lang.String
getName()
The descriptive name of this replication agent.ValueMap
getProperties()
Returns All agent properties as value map.long
getRetryDelay()
The retry delay in milliseconds.java.lang.String
getSerializationType()
The name of the serialization type.java.lang.String
getSSLConfig()
Returns SSL config mode.java.lang.String
getTransportPassword()
The target user password for delivering the content.java.lang.String
getTransportURI()
The destination URI.java.lang.String
getTransportUser()
The target user name for delivering the content.boolean
isBatchMode()
Returns if the replication by this agent is performed in batch mode.boolean
isEnabled()
Checks if this agent is enabled This is a convenience method and returns the propertyAGENT_ENABLED
.boolean
isInMaintenanceMode()
Checks if this agent is in maintenance mode This is a convenience method and returns the propertyAGENT_MAINTENANCE
.boolean
isOAuthEnabled()
Checks whether the agent is using the OAuth 2.0 Authorization Grants mechanism or not.boolean
isSpecific()
Checks if this agent is used for specific applications.boolean
isTriggeredOnDistribute()
Checks if this agent is used when a property "cq:distribute" has been modified.boolean
isTriggeredOnModification()
Checks if this agent is used for "replicate on modification".boolean
isTriggeredOnOffTime()
Checks if this agent is used for "replicate if on-/offtime reached".boolean
isTriggeredOnReceive()
Determines if a replication with this agent should be triggered once the replication request is received.boolean
noStatusUpdate()
Determines if a replication with this agent should suppress update of the replication status.boolean
noVersions()
Determines if a replication with this agent should suppress implicit versioning.boolean
usedForReverseReplication()
Checks if this agent is used for reverse replication.
-
-
-
Field Detail
-
AGENT_NAME
static final java.lang.String AGENT_NAME
- See Also:
- Constant Field Values
-
AGENT_DESCRIPTION
static final java.lang.String AGENT_DESCRIPTION
- See Also:
- Constant Field Values
-
AGENT_ENABLED
static final java.lang.String AGENT_ENABLED
- See Also:
- Constant Field Values
-
AGENT_LOG_LEVEL
static final java.lang.String AGENT_LOG_LEVEL
- See Also:
- Constant Field Values
-
AGENT_USER_ID
static final java.lang.String AGENT_USER_ID
- See Also:
- Constant Field Values
-
TRIGGER_SPECIFIC
static final java.lang.String TRIGGER_SPECIFIC
- See Also:
- Constant Field Values
-
TRIGGER_MODIFIED
static final java.lang.String TRIGGER_MODIFIED
- See Also:
- Constant Field Values
-
TRIGGER_ONOFFTIME
static final java.lang.String TRIGGER_ONOFFTIME
- See Also:
- Constant Field Values
-
TRIGGER_DISTRIBUTE
static final java.lang.String TRIGGER_DISTRIBUTE
- See Also:
- Constant Field Values
-
REVERSE_REPLICATION
static final java.lang.String REVERSE_REPLICATION
- See Also:
- Constant Field Values
-
TRIGGER_RECEIVE
static final java.lang.String TRIGGER_RECEIVE
- See Also:
- Constant Field Values
-
QUEUE_RETRY_DELAY
static final java.lang.String QUEUE_RETRY_DELAY
- See Also:
- Constant Field Values
-
QUEUE_BATCH_MODE
static final java.lang.String QUEUE_BATCH_MODE
- See Also:
- Constant Field Values
-
QUEUE_BATCH_WAIT_TIME
static final java.lang.String QUEUE_BATCH_WAIT_TIME
- See Also:
- Constant Field Values
-
QUEUE_BATCH_MAX_SIZE
static final java.lang.String QUEUE_BATCH_MAX_SIZE
- See Also:
- Constant Field Values
-
QUEUE_MAX_RETRIES
@Deprecated static final java.lang.String QUEUE_MAX_RETRIES
Deprecated.- this is not used anymore.- See Also:
- Constant Field Values
-
SERIALIZATION_TYPE
static final java.lang.String SERIALIZATION_TYPE
- See Also:
- Constant Field Values
-
TRANSPORT_URI
static final java.lang.String TRANSPORT_URI
- See Also:
- Constant Field Values
-
TRANSPORT_USER
static final java.lang.String TRANSPORT_USER
- See Also:
- Constant Field Values
-
TRANSPORT_PASSWORD
static final java.lang.String TRANSPORT_PASSWORD
- See Also:
- Constant Field Values
-
TRANSPORT_NTLM_DOMAIN
static final java.lang.String TRANSPORT_NTLM_DOMAIN
- See Also:
- Constant Field Values
-
TRANSPORT_NTLM_HOST
static final java.lang.String TRANSPORT_NTLM_HOST
- See Also:
- Constant Field Values
-
PROTOCOL_VERSION
static final java.lang.String PROTOCOL_VERSION
- See Also:
- Constant Field Values
-
PROTOCOL_CONNECT_TIMEOUT
static final java.lang.String PROTOCOL_CONNECT_TIMEOUT
- See Also:
- Constant Field Values
-
PROTOCOL_INTERFACE
static final java.lang.String PROTOCOL_INTERFACE
- See Also:
- Constant Field Values
-
PROTOCOL_SOCKET_TIMEOUT
static final java.lang.String PROTOCOL_SOCKET_TIMEOUT
- See Also:
- Constant Field Values
-
PROXY_HOST
static final java.lang.String PROXY_HOST
- See Also:
- Constant Field Values
-
PROXY_PORT
static final java.lang.String PROXY_PORT
- See Also:
- Constant Field Values
-
PROXY_USER
static final java.lang.String PROXY_USER
- See Also:
- Constant Field Values
-
PROXY_PASS
static final java.lang.String PROXY_PASS
- See Also:
- Constant Field Values
-
PROXY_NTLM_DOMAIN
static final java.lang.String PROXY_NTLM_DOMAIN
- See Also:
- Constant Field Values
-
PROXY_NTLM_HOST
static final java.lang.String PROXY_NTLM_HOST
- See Also:
- Constant Field Values
-
PROTOCOL_HTTP_HEADERS
static final java.lang.String PROTOCOL_HTTP_HEADERS
- See Also:
- Constant Field Values
-
PROTOCOL_HTTP_METHOD
static final java.lang.String PROTOCOL_HTTP_METHOD
- See Also:
- Constant Field Values
-
PROTOCOL_HTTP_CONNECTION_CLOSE
static final java.lang.String PROTOCOL_HTTP_CONNECTION_CLOSE
- See Also:
- Constant Field Values
-
PROTOCOL_HTTPS_RELAXED
static final java.lang.String PROTOCOL_HTTPS_RELAXED
- See Also:
- Constant Field Values
-
PROTOCOL_HTTPS_EXPIRED
static final java.lang.String PROTOCOL_HTTPS_EXPIRED
- See Also:
- Constant Field Values
-
ENABLE_OAUTH
static final java.lang.String ENABLE_OAUTH
- See Also:
- Constant Field Values
-
ACCESS_TOKEN_PROVIDER_PID
@Deprecated static final java.lang.String ACCESS_TOKEN_PROVIDER_PID
Deprecated.Use ACCESS_TOKEN_PROVIDER_NAMEAccess token provider pid- See Also:
- Constant Field Values
-
ACCESS_TOKEN_PROVIDER_NAME
static final java.lang.String 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:
- Constant Field Values
-
SSL_CONFIG
static final java.lang.String SSL_CONFIG
- See Also:
- Constant Field Values
-
SSL_CONFIG_DEFAULT
static final java.lang.String SSL_CONFIG_DEFAULT
Use default settings.- See Also:
- Constant Field Values
-
SSL_CONFIG_RELAXED
static final java.lang.String SSL_CONFIG_RELAXED
Use to accept self-certified SSL certificates.- See Also:
- Constant Field Values
-
SSL_CONFIG_CLIENT_AUTH
static final java.lang.String SSL_CONFIG_CLIENT_AUTH
Use to enable SSL client authentication.- See Also:
- Constant Field Values
-
CQ_DISTRIBUTE
static final java.lang.String CQ_DISTRIBUTE
- See Also:
- Constant Field Values
-
AGENT_NO_VERSIONS
static final java.lang.String AGENT_NO_VERSIONS
- See Also:
- Constant Field Values
-
AGENT_NO_STATUS_UPDATE
static final java.lang.String AGENT_NO_STATUS_UPDATE
- See Also:
- Constant Field Values
-
AGENT_MAINTENANCE
static final java.lang.String AGENT_MAINTENANCE
- See Also:
- Constant Field Values
-
AGENT_ALIAS_UPDATE
static final java.lang.String AGENT_ALIAS_UPDATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
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:
java.lang.IllegalArgumentException
- if not valid.
-
getId
java.lang.String getId()
Returns the id of this configuration.- Returns:
- the id
-
getAgentId
java.lang.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
java.lang.String getConfigPath()
Returns the path to the configuration node. If the configuration is not stored in the repository,null
is returned.- Returns:
- the path to the config or
null
-
getName
java.lang.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
java.lang.String getTransportURI()
The destination URI. This uri is one of those defined in the propertyTRANSPORT_URI
.- Returns:
- the destination URI.
-
getAllTransportURIs
java.lang.String[] getAllTransportURIs()
The list of alternative destination URI. This is a convenience method and returns the uris defined in the propertyTRANSPORT_URI
as a comma separated list.- Returns:
- the destination URI.
-
getTransportUser
java.lang.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
java.lang.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
java.lang.String getSerializationType()
The name of the serialization type. A correspondingContentBuilder
with this name must be registered. This is a convenience method and returns the propertySERIALIZATION_TYPE
.- Returns:
- name of the content builder
-
getAgentUserId
java.lang.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:
true
if this agent is enabled
-
getLogLevel
java.lang.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 int 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:
true
if agent is specific
-
isTriggeredOnModification
boolean isTriggeredOnModification()
Checks if this agent is used for "replicate on modification". If this flag istrue
each modification to the content will trigger a replication action on this agent. This is a convenience method and returns the propertyTRIGGER_MODIFIED
.- Returns:
true
if this agent auto replicates on modification.
-
isTriggeredOnOffTime
boolean isTriggeredOnOffTime()
Checks if this agent is used for "replicate if on-/offtime reached". If this flag istrue
any 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:
true
if 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:
true
if 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:
true
if 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:
true
if 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:
true
if 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:
true
if 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:
true
if this agent is in maintenance mode
-
aliasUpdate
boolean aliasUpdate()
Determines if a replication with this agent should also replicate aliases, vanity URLs.- Returns:
true
if agent should handle replication for aliases, vanity URLs
-
getSSLConfig
java.lang.String getSSLConfig()
Returns SSL config mode. Values are default, relaxed or clientauth.- Returns:
- SSL settings
- See Also:
SSL_CONFIG
-
allowsExpiredCertificates
boolean allowsExpiredCertificates()
Checks whether the agent allows the use of expired certificates or not.- Returns:
true
if the agent accepts expired certificates,false
otherwise
-
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:
true
if the authorization grants mechanism is enabled
-
-