public interface CnMapPublishHandler
init(Map)
Called once during the initialization process of the publish handler to take the instance into serviceopen(long)
Called once for every publish handler when a transaction is started to write into the content repositorycreateObject(Resolvable)
, updateObject(Resolvable)
, deleteObject(Resolvable)
Repeatedly called for every created, updated, deleted object during the publish process or instant publishingcommit()
OR rollback()
Called once for every publish handler at the end of every transaction (commit on success, rollback on failure)close()
Called once for every publish handler at the end of every transactiondestroy()
Called once during shutdown to take the publish handler out of serviceModifier and Type | Field and Description |
---|---|
static java.lang.String |
DS_ID
Constant for the key of the parameter passed to the
init(Map)
method holding the datasource ID Implementations can use this datasource
ID to get a datasource instance via
PortalConnectorFactory.createDatasource(String) or
PortalConnectorFactory.createDatasource(Class, String) . |
Modifier and Type | Method and Description |
---|---|
void |
close()
This method is called once at the end of any publish process.
|
void |
commit()
This method is called at the end of a successful publish process
|
void |
createObject(com.gentics.api.lib.resolving.Resolvable object)
This method is called for every object, which is created in the
ContentRepository (was created/published since the last publish process
into the respective ContentRepository).
|
void |
deleteObject(com.gentics.api.lib.resolving.Resolvable object)
This method is called for every object, which is removed from the ContentRepository (was deleted or taken offline since the last publish run).
|
void |
destroy()
This method is called at the end of the lifetime of this handler
instance.
|
void |
init(java.util.Map parameters)
This method is called once for every configured instance to take the
handler into service.
|
void |
open(long timestamp)
This method is called once for every configured instance for each publish
run.
|
void |
rollback()
This method is called at the end of a failed publish process
|
void |
updateObject(com.gentics.api.lib.resolving.Resolvable object)
This method is called for every object, which needs to be updated in the
ContentRepository (was changed since the last publish process).
|
static final java.lang.String DS_ID
init(Map)
method holding the datasource ID Implementations can use this datasource
ID to get a datasource instance via
PortalConnectorFactory.createDatasource(String)
or
PortalConnectorFactory.createDatasource(Class, String)
.void init(java.util.Map parameters) throws CnMapPublishException
parameters
- of parameters given in the configurationCnMapPublishException
- when the initialization of the handler
failed with an unrecoverable errorvoid open(long timestamp) throws CnMapPublishException
createObject(Resolvable)
,
updateObject(Resolvable)
and deleteObject(Resolvable)
will only be called after calling this method and until one of the
methods commit()
or rollback()
is called to mark the
(successful or not successful) end of the publish process.timestamp
- timestamp of the publish processCnMapPublishException
- when an unrecoverable error occurredvoid createObject(com.gentics.api.lib.resolving.Resolvable object) throws CnMapPublishException
object
- resolvable object containing all data that are written into
the ContentRepositoryCnMapPublishException
- when an unrecoverable error occurredvoid updateObject(com.gentics.api.lib.resolving.Resolvable object) throws CnMapPublishException
object
- resolvable object containing all data that are written into
the ContentRepositoryCnMapPublishException
- when an unrecoverable error occurredvoid deleteObject(com.gentics.api.lib.resolving.Resolvable object) throws CnMapPublishException
object
- resolvable object containing what? TODO does it contain all data from the ContentRepository or only the contentid?CnMapPublishException
- when an unrecoverable error occurredvoid commit()
void rollback()
void close()
open(long)
.void destroy()
init(Map)
.Copyright © 2024 Gentics Software GmbH. All rights reserved.