|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.util.AbstractPollableRunnable
com.jivesoftware.forum.database.DbDataExport
public class DbDataExport
Main data export class for Jive Forums data. This class implements PollableRunnable
which means it also implements Runnable
so this class should be instantiated, configured
(by setting properties) and executed in the TaskEngine
.
This class was designed to be very flexible in which data is exported. The result of running this will be an XML document which validates against the Jive Forums DTD and which contains the data you ask for. For example, it's possible to export only user data or only forum data, or everything.
Export options:
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_ENCODING
Default encoding used for the XML file. |
static java.text.SimpleDateFormat |
DEFAULT_FILE_DATE_FORMAT
Default format of the output file name. |
Constructor Summary | |
---|---|
DbDataExport(ForumFactory factory)
Creates a new export task. |
Method Summary | |
---|---|
void |
doRun()
Writes out XML data from the Jive Forums system. |
java.lang.String |
getEncoding()
Returns the encoding used for writing the XML file. |
java.util.Collection |
getErrors()
Returns an unmodifiable collection of errors (if any) that occured during data export. |
java.util.Collection |
getExportedCategories()
Returns the collection of categories being exported. |
java.util.Collection |
getExportedForums()
Returns the collection of forums being exported. |
java.lang.String |
getFilename()
Returns the name of the file to export data to. |
java.io.OutputStream |
getOutputStream()
Returns the output stream where data is written to. |
int |
getTaskMaximum()
Returns the maximum value of task progress (default is 100). |
int |
getTaskValue()
Returns the current value of the task's progress. |
boolean |
isExportAnnouncementsEnabled()
Indicates whether or not announcements will be exported. |
boolean |
isExportAttachmentsEnabled()
Resturns whether or not attachments should be exported |
boolean |
isExportForumsEnabled()
Indicates if forums will be exported. |
boolean |
isExportGroupsEnabled()
Indicates if groups will be exported. |
boolean |
isExportIDsEnabled()
Indicates if IDs will be exported. |
boolean |
isExportJivePropertiesEnabled()
Returns whether or not jive properties are being exported |
boolean |
isExportPermsEnabled()
Indicates if all permissions (that includes global and per-forum permissions) will be exported. |
boolean |
isExportPollsEnabled()
Indicates whether or not polls will be exported. |
boolean |
isExportPrivateMessagesEnabled()
Returns whether private messages are being exported |
boolean |
isExportUsersEnabled()
Indicates if users will be exported. |
static void |
main(java.lang.String[] args)
|
void |
setEncoding(java.lang.String encoding)
Sets the encoding used for writing the XML file. |
void |
setExportAnnouncementsEnabled(boolean exportAnnouncementsEnabled)
Sets whether or not announcements will be exported. |
void |
setExportAttachmentsEnabled(boolean exportAttachmentsEnabled)
Sets whether or not attachments should be exported |
void |
setExportForumsEnabled(boolean exportForums)
Sets whether or not forums will be exported. |
void |
setExportGroupsEnabled(boolean exportGroups)
Sets whether or not groups will be exported. |
void |
setExportIDsEnabled(boolean exportIDs)
Sets if IDs should be exported with each object. |
void |
setExportJivePropertiesEnabled(boolean exportJivePropertiesEnabled)
Sets whether or not jive properties should be exported (default is true) |
void |
setExportPermsEnabled(boolean exportPerms)
Sets whether or not permissions will be exported. |
void |
setExportPollsEnabled(boolean exportPollsEnabled)
Sets whether or not polls will be exported. |
void |
setExportPrivateMessagesEnabled(boolean exportPrivateMessagesEnabled)
Sets where or not private messages should be exported. |
void |
setExportUsersEnabled(boolean exportUsers)
Sets whether or not users should be exported. |
void |
setFilename(java.lang.String filename)
Sets the filename used to export forum data to. |
void |
setOutputStream(java.io.OutputStream outputStream)
Sets the output stream to use for exported data. |
Methods inherited from class com.jivesoftware.util.AbstractPollableRunnable |
---|
cancel, getEndDate, getPercentComplete, getStartDate, getTaskMinimum, isFinished, isIndeterminate, isRunning, run |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.text.SimpleDateFormat DEFAULT_FILE_DATE_FORMAT
public static final java.lang.String DEFAULT_ENCODING
Constructor Detail |
---|
public DbDataExport(ForumFactory factory) throws UnauthorizedException
UnauthorizedException
Method Detail |
---|
public boolean isExportIDsEnabled()
public void setExportIDsEnabled(boolean exportIDs)
By default, IDs will not be exported.
exportIDs
- true to indicate that IDs should be exported with each Jive object,
false to not export IDs.public boolean isExportUsersEnabled()
public void setExportUsersEnabled(boolean exportUsers)
exportUsers
- true to indicate that user objects should be exported, false to not export.public boolean isExportGroupsEnabled()
public void setExportGroupsEnabled(boolean exportGroups)
exportGroups
- true to indicate that groups should be exported, false to not export.public boolean isExportForumsEnabled()
public void setExportForumsEnabled(boolean exportForums)
exportForums
- true to indicate that forums should be exported, false to not export.public boolean isExportPermsEnabled()
public void setExportPermsEnabled(boolean exportPerms)
exportPerms
- true to indicate that all permissions should be exported, false to not
export.public boolean isExportPollsEnabled()
public void setExportPollsEnabled(boolean exportPollsEnabled)
exportPollsEnabled
- true to indicate that all polls should be exported, false
otherwise.public boolean isExportAnnouncementsEnabled()
public void setExportAnnouncementsEnabled(boolean exportAnnouncementsEnabled)
exportAnnouncementsEnabled
- true to indicate that all announcements should be exported,
false otherwise.public boolean isExportPrivateMessagesEnabled()
public void setExportPrivateMessagesEnabled(boolean exportPrivateMessagesEnabled)
exportPrivateMessagesEnabled
- true if private messages are being exportedpublic java.util.Collection getExportedForums()
public java.util.Collection getExportedCategories()
public void setExportJivePropertiesEnabled(boolean exportJivePropertiesEnabled)
exportJivePropertiesEnabled
- true if jive properties should be exported,
false otherwisepublic boolean isExportJivePropertiesEnabled()
public boolean isExportAttachmentsEnabled()
public void setExportAttachmentsEnabled(boolean exportAttachmentsEnabled)
exportAttachmentsEnabled
- true if attachments should be exported,
false otherwisepublic java.io.OutputStream getOutputStream()
public void setOutputStream(java.io.OutputStream outputStream)
outputStream
- the output stream to use for exported data.public java.lang.String getEncoding()
public void setEncoding(java.lang.String encoding) throws java.io.UnsupportedEncodingException
encoding
- the encoding used for writing the XML file
java.io.UnsupportedEncodingException
public void setFilename(java.lang.String filename) throws java.lang.IllegalArgumentException
filename
- the name of the file to export data to.
java.lang.IllegalArgumentException
public java.lang.String getFilename()
public int getTaskMaximum()
PollableRunnable
indeterminate
mode then this will return -1.
getTaskMaximum
in interface PollableRunnable
getTaskMaximum
in class AbstractPollableRunnable
public int getTaskValue()
PollableRunnable
indeterminate
mode then this will return -1.
getTaskValue
in interface PollableRunnable
getTaskValue
in class AbstractPollableRunnable
public java.util.Collection getErrors()
public void doRun()
doRun
in class AbstractPollableRunnable
public static void main(java.lang.String[] args)
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |