Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.proxy
Class ArchiveManagerProxy

java.lang.Object
  extended by com.jivesoftware.forum.proxy.ArchiveManagerProxy
All Implemented Interfaces:
ArchiveManager

public class ArchiveManagerProxy
extends java.lang.Object
implements ArchiveManager

Protection proxy for the ArchiveManager class.


Field Summary
 
Fields inherited from interface com.jivesoftware.forum.ArchiveManager
DELETE_THREADS, MARK_THREADS, MOVE_THREADS
 
Constructor Summary
ArchiveManagerProxy(ArchiveManager archiveManager, AuthToken authToken, Permissions permissions)
           
 
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).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArchiveManagerProxy

public ArchiveManagerProxy(ArchiveManager archiveManager,
                           AuthToken authToken,
                           Permissions permissions)
Method Detail

isArchivingEnabled

public boolean isArchivingEnabled(Forum forum)
Description copied from interface: ArchiveManager
Returns true if archiving is enabled for the specified forum. When archiving is enabled, inactive threads will be archived based on the archiving mode.

Specified by:
isArchivingEnabled in interface ArchiveManager
Parameters:
forum - the forum to check the status of.
Returns:
true if archiving is enabled for the specified forum.

setArchivingEnabled

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

Specified by:
setArchivingEnabled in interface ArchiveManager
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

public int getArchiveDays(Forum forum)
Description copied from interface: ArchiveManager
Returns the number of days that threads in forum must be inactive before being archived. The default value is 180 days.

Specified by:
getArchiveDays in interface ArchiveManager
Parameters:
forum - the forum to check the value on.
Returns:
the number of days a thread must be inactive before being archived.

setArchiveDays

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

Specified by:
setArchiveDays in interface ArchiveManager
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

public int getArchiveMode(Forum forum)
Description copied from interface: ArchiveManager
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.

Specified by:
getArchiveMode in interface ArchiveManager
Parameters:
forum - the forum to check the archive mode of.
Returns:
the archive mode of the specified forum.

setArchiveMode

public void setArchiveMode(Forum forum,
                           int mode)
                    throws UnauthorizedException
Description copied from interface: ArchiveManager
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.

Specified by:
setArchiveMode in interface ArchiveManager
Parameters:
forum - the forum to set the archive mode of.
mode - the archive mode.
Throws:
UnauthorizedException - if not an administrator of the forum.

getArchiveForum

public Forum getArchiveForum(Forum forum)
                      throws UnauthorizedException
Description copied from interface: ArchiveManager
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.

Specified by:
getArchiveForum in interface ArchiveManager
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

public void setArchiveForum(Forum forum,
                            Forum archiveForum)
                     throws UnauthorizedException
Description copied from interface: ArchiveManager
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.

Specified by:
setArchiveForum in interface ArchiveManager
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

public boolean isAutoArchiveEnabled()
                             throws UnauthorizedException
Description copied from interface: ArchiveManager
Returns true if auto-archiving is enabled. When enabled, the archiving process will be run on a periodic basis.

Specified by:
isAutoArchiveEnabled in interface ArchiveManager
Returns:
true if auto-archiving is enabled.
Throws:
UnauthorizedException - if not a system administrator.

setAutoArchiveEnabled

public void setAutoArchiveEnabled(boolean enabled)
                           throws UnauthorizedException
Description copied from interface: ArchiveManager
Enables or disables auto-archiving. When enabled, the archiving process will be run on a periodic basis.

Specified by:
setAutoArchiveEnabled in interface ArchiveManager
Parameters:
enabled - true if auto-archiving should be enabled.
Throws:
UnauthorizedException - if not a system administrator.

getAutoArchiveInterval

public int getAutoArchiveInterval()
                           throws UnauthorizedException
Description copied from interface: ArchiveManager
Returns the inverval between auto archive executions (in hours).

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

setAutoArchiveInterval

public void setAutoArchiveInterval(int interval)
                            throws UnauthorizedException
Description copied from interface: ArchiveManager
Sets the inverval between auto archive executions (in hours).

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

isBusy

public boolean isBusy()
               throws UnauthorizedException
Description copied from interface: ArchiveManager
Returns true if the archiving process is currently running. The is useful for an administration GUI.

Specified by:
isBusy in interface ArchiveManager
Returns:
true if the archiving process is currently running.
Throws:
UnauthorizedException - if not a system administrator.

getLastArchivedDate

public java.util.Date getLastArchivedDate()
                                   throws UnauthorizedException
Description copied from interface: ArchiveManager
Returns the date the archiving process was last run. Returns null if the archiving process has never been run.

Specified by:
getLastArchivedDate in interface ArchiveManager
Returns:
the date the archiving process was last run.
Throws:
UnauthorizedException - if not a system administrator.

runArchiver

public void runArchiver()
                 throws UnauthorizedException
Description copied from interface: ArchiveManager
Manually runs the archiving process.

Specified by:
runArchiver in interface ArchiveManager
Throws:
UnauthorizedException - if not a system administrator.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.