|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CnMapPublishHandler
Interface for specific implementations that add additional functionality to publish into a ContentRepository. Implementations of this interface can be hooked into the publish process for specific ContentRepositories. The lifecycle is as follows:
init(Map)
Called once during the initialization process of the publish handler to take the instance into service#open()
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 service
Method Summary | |
---|---|
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(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). |
Method Detail |
---|
void init(Map parameters) throws CnMapPublishException
map
- of parameters given in the configuration
CnMapPublishException
- 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 process
CnMapPublishException
- 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 ContentRepository
CnMapPublishException
- 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 ContentRepository
CnMapPublishException
- 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()
.
void destroy()
init(Map)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |