Package com.day.cq.replication
Interface OutboxManager
-
public interface OutboxManager
Represents an outbox manager.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description boolean
checkPermission(Session session)
Deprecated.since 5.12.4; usegetDefaultOutbox(javax.jcr.Session)
} instead.void
fetch(Session session, java.util.Calendar time, java.io.OutputStream out)
Deprecated.since 5.12.4; usegetDefaultOutbox(javax.jcr.Session)
.Outbox.fetch(java.util.Calendar, java.io.OutputStream)
instead.Outbox
getDefaultOutbox(Session session)
Returns the default, anonymous outbox.Outbox
getOutbox(Session session, java.lang.String name, boolean autoCreate)
Returns the outbox with the given name.void
put(ReplicationAction action)
Deprecated.since 5.12.4; usegetDefaultOutbox(javax.jcr.Session)
.Outbox.put(ReplicationAction)
instead.void
put(ReplicationAction action, java.io.InputStream in)
Deprecated.since 5.12.4; usegetDefaultOutbox(javax.jcr.Session)
.Outbox.put(ReplicationAction, java.io.InputStream)
instead.void
put(java.io.InputStream in)
Deprecated.since 5.5 useput(ReplicationAction, java.io.InputStream)
instead.
-
-
-
Method Detail
-
getOutbox
@Nullable Outbox getOutbox(Session session, java.lang.String name, boolean autoCreate) throws ReplicationException, AccessDeniedException
Returns the outbox with the given name. If no such outbox existsnull
is returned, unlessautoCreate
is set totrue
. Note that the given session needs to be able to read and write nodes on an existing outbox, or needs to be able to create nodes below the default outboxes path "/var/replication/outboxes".- Parameters:
session
- the session to access the outboxname
- name of the outbox.autoCreate
- iftrue
the outbox will be created if it does not exist- Returns:
- the outbox or
null
- Throws:
ReplicationException
- if an error occurs.AccessDeniedException
- if the given session is not allowed to get or create the outbox.
-
getDefaultOutbox
@Nonnull Outbox getDefaultOutbox(Session session) throws ReplicationException
Returns the default, anonymous outbox.- Parameters:
session
- the session to access the default outbox- Returns:
- the default outbox.
- Throws:
ReplicationException
- if an error occurs.
-
put
@Deprecated void put(ReplicationAction action, java.io.InputStream in) throws ReplicationException
Deprecated.since 5.12.4; usegetDefaultOutbox(javax.jcr.Session)
.Outbox.put(ReplicationAction, java.io.InputStream)
instead.Put item in the outbox.- Parameters:
action
- replication action, must not beReplicationActionType.ACTIVATE
in
- item data- Throws:
ReplicationException
- if an error occurs
-
put
@Deprecated void put(ReplicationAction action) throws ReplicationException
Deprecated.since 5.12.4; usegetDefaultOutbox(javax.jcr.Session)
.Outbox.put(ReplicationAction)
instead.Put an empty item in the outbox with a replication action other thanReplicationActionType.ACTIVATE
.- Parameters:
action
- replication action, must not beReplicationActionType.ACTIVATE
- Throws:
ReplicationException
- if an error occurs
-
put
@Deprecated void put(java.io.InputStream in) throws ReplicationException
Deprecated.since 5.5 useput(ReplicationAction, java.io.InputStream)
instead.Put item in the outbox. The implicit replication action of this item isReplicationActionType.ACTIVATE
- Parameters:
in
- item data- Throws:
ReplicationException
- if an error occurs
-
fetch
@Deprecated void fetch(Session session, java.util.Calendar time, java.io.OutputStream out) throws ReplicationException
Deprecated.since 5.12.4; usegetDefaultOutbox(javax.jcr.Session)
.Outbox.fetch(java.util.Calendar, java.io.OutputStream)
instead.Fetch items from the outbox, having a last modified time greater than the given optional time, automatically removing items that are older.- Parameters:
session
- session to usetime
- if notnull
, all items older than this date are automatically purged from the outbox before returning the outbox's contentout
- output stream where to store a virtual durbo package namedoutbox
with the items in the outbox as children- Throws:
ReplicationException
- if an error occurs
-
checkPermission
@Deprecated boolean checkPermission(Session session)
Deprecated.since 5.12.4; usegetDefaultOutbox(javax.jcr.Session)
} instead.To check that session's user has permissions to fetch items from outbox. Returns true if session's user has permissions to fetch items from outbox else returns false.- Parameters:
session
- session to use- Returns:
- true if session's user has permissions to fetch items from outbox else false.
-
-