Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum
Interface ArchiveManager

All Known Implementing Classes:
ArchiveManagerProxy, DbArchiveManager

public interface ArchiveManager

Manages the archive feature of Jive Forums. Archiving provides an automated method of dealing with old content. Three different archiving modes are available, and are set on a per-forum basis:

Individual threads can be prevented from being archived by setting their extended property "jive.archivingDisabled" to "true".

See Also:
ForumFactory.getArchiveManager()

Field Summary
static int DELETE_THREADS
          An archive mode that specifies that threads should be deleted.
static int MARK_THREADS
          An archive mode that specifies that threads are marked as archived and left in their original forum.
static int MOVE_THREADS
          An archive mode that specifies that threads should be moved to another forum.
 
Method Summary
 int getArchiveDays(Forum forum)
          Returns the number of days that threads in forum must be inactive before being archived.
 Forum getArchiveForum(Forum forum)
          Returns the "archive forum" for the specified forum.
 int getArchiveMode(Forum forum)
          Returns the archive mode for the forum.
 int getAutoArchiveInterval()
          Returns the inverval between auto archive executions (in hours).
 java.util.Date getLastArchivedDate()
          Returns the date the archiving process was last run.
 boolean isArchivingEnabled(Forum forum)
          Returns true if archiving is enabled for the specified forum.
 boolean isAutoArchiveEnabled()
          Returns true if auto-archiving is enabled.
 boolean isBusy()
          Returns true if the archiving process is currently running.
 void runArchiver()
          Manually runs the archiving process.
 void setArchiveDays(Forum forum, int days)
          Sets the number of days that threads in forum must be inactive before being archived.
 void setArchiveForum(Forum forum, Forum archiveForum)
          Sets the "archive forum" for the specified forum.
 void setArchiveMode(Forum forum, int mode)
          Returns the archive mode for the forum.
 void setArchivingEnabled(Forum forum, boolean enabled)
          Enables or disables archiving for the specified forum.
 void setAutoArchiveEnabled(boolean enabled)
          Enables or disables auto-archiving.
 void setAutoArchiveInterval(int interval)
          Sets the inverval between auto archive executions (in hours).
 

Field Detail

MARK_THREADS

static final int MARK_THREADS
An archive mode that specifies that threads are marked as archived and left in their original forum. Normally, skins should note the fact that the threads are archived and disable new posts in those threads. Threads are marked as archived by setting their extended property "jive.archived" to "true".

See Also:
Constant Field Values

DELETE_THREADS

static final int DELETE_THREADS
An archive mode that specifies that threads should be deleted.

See Also:
Constant Field Values

MOVE_THREADS

static final int MOVE_THREADS
An archive mode that specifies that threads should be moved to another forum.

See Also:
Constant Field Values
Method Detail

isArchivingEnabled

boolean isArchivingEnabled(Forum forum)
Returns true if archiving is enabled for the specified forum. When archiving is enabled, inactive threads will be archived based on the archiving mode.

Parameters:
forum - the forum to check the status of.
Returns:
true if archiving is enabled for the specified forum.

setArchivingEnabled

void setArchivingEnabled(Forum forum,
                         boolean enabled)
                         throws UnauthorizedException
Enables or disables archiving for the specified forum. When archiving is enabled, inactive threads will be archived based on the archiving mode.

Parameters:
forum - the forum to set the status of.
enabled - true if archiving should be enabled for the forum.
Throws:
UnauthorizedException - if not an administrator of the forum.

getArchiveDays

int getArchiveDays(Forum forum)
Returns the number of days that threads in forum must be inactive before being archived. The default value is 180 days.

Parameters:
forum - the forum to check the value on.
Returns:
the number of days a thread must be inactive before being archived.

setArchiveDays

void setArchiveDays(Forum forum,
                    int days)
                    throws UnauthorizedException
Sets the number of days that threads in forum must be inactive before being archived. The default value is 180 days.

Parameters:
forum - the forum to set the value on.
days - the number of days a thread must be inactive before being archived.
Throws:
UnauthorizedException - if not an admin of the forum.

getArchiveMode

int getArchiveMode(Forum forum)
Returns the archive mode for the forum. The archive mode dictates what is done with archived threads. Valid modes are ArchiveManager.MARK_THREADS, ArchiveManager.DELETE_THREADS, and ArchiveManager.MOVE_THREADS.

If the MOVE_THREADS mode is being used, an "archive forum" must be specified to move archived threads to.

Parameters:
forum - the forum to check the archive mode of.
Returns:
the archive mode of the specified forum.

setArchiveMode

void setArchiveMode(Forum forum,
                    int mode)
                    throws UnauthorizedException
Returns the archive mode for the forum. The archive mode dictates what is done with archived threads. Valid modes are ArchiveManager.MARK_THREADS, ArchiveManager.DELETE_THREADS, and ArchiveManager.MOVE_THREADS.

If the MOVE_THREADS mode is being used, an "archive forum" must be specified to move archived threads to.

Parameters:
forum - the forum to set the archive mode of.
mode - the archive mode.
Throws:
UnauthorizedException - if not an administrator of the forum.

getArchiveForum

Forum getArchiveForum(Forum forum)
                      throws UnauthorizedException
Returns the "archive forum" for the specified forum. An archive forum is necessary when the archiving mode is set to MOVE_THREADS -- ie, there must be a forum to move the threads to. If no archive forum is set, null will be returned.

Parameters:
forum - the forum to get the "archive forum" of.
Returns:
the "archive forum" of the specified forum or null if not defined.
Throws:
UnauthorizedException - if not an admin of forum or does not have read permission on the archive forum being returned.

setArchiveForum

void setArchiveForum(Forum forum,
                     Forum archiveForum)
                     throws UnauthorizedException
Sets the "archive forum" for the specified forum. An archive forum is necessary when the archiving mode is set to MOVE_THREADS -- ie, there must be a forum to move the threads to.

Parameters:
forum - the forum to set the "archive forum" of.
archiveForum - the "archive forum" for .
Throws:
UnauthorizedException - if not an admin of forum and archiveForum.

isAutoArchiveEnabled

boolean isAutoArchiveEnabled()
                             throws UnauthorizedException
Returns true if auto-archiving is enabled. When enabled, the archiving process will be run on a periodic basis.

Returns:
true if auto-archiving is enabled.
Throws:
UnauthorizedException - if not a system administrator.

setAutoArchiveEnabled

void setAutoArchiveEnabled(boolean enabled)
                           throws UnauthorizedException
Enables or disables auto-archiving. When enabled, the archiving process will be run on a periodic basis.

Parameters:
enabled - true if auto-archiving should be enabled.
Throws:
UnauthorizedException - if not a system administrator.

getAutoArchiveInterval

int getAutoArchiveInterval()
                           throws UnauthorizedException
Returns the inverval between auto archive executions (in hours).

Returns:
the interval betwen auto archive executions (in hours).
Throws:
UnauthorizedException - if not a system administrator.

setAutoArchiveInterval

void setAutoArchiveInterval(int interval)
                            throws UnauthorizedException
Sets the inverval between auto archive executions (in hours).

Parameters:
interval - the interval betwen auto archive executions (in hours).
Throws:
UnauthorizedException - if not a system administrator.

isBusy

boolean isBusy()
               throws UnauthorizedException
Returns true if the archiving process is currently running. The is useful for an administration GUI.

Returns:
true if the archiving process is currently running.
Throws:
UnauthorizedException - if not a system administrator.

getLastArchivedDate

java.util.Date getLastArchivedDate()
                                   throws UnauthorizedException
Returns the date the archiving process was last run. Returns null if the archiving process has never been run.

Returns:
the date the archiving process was last run.
Throws:
UnauthorizedException - if not a system administrator.

runArchiver

void runArchiver()
                 throws UnauthorizedException
Manually runs the archiving process.

Throws:
UnauthorizedException - if not a system administrator.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.