com.businessobjects.rebean.wi
Interface TrackData


public interface TrackData

TrackData interface is a base for track data changes feature. It provides you with basic document information for Track Data Changes feature.

Example:Activating Track data changes on the document

 if (repEng.getCanTrackData()) {
     //obtain trackdata interface
     TrackData data = wiDoc.getTrackData();
     // enable trackdata
     data.setTrackDataMode(ReferenceUpdateMode.USER_DEFINED);
     data.setCurrentAsReference();
     data.showChanges(true);
     //gets style options
     TrackDataOptions options = data.getTrackDataOptions();
     TrackDataOption option = options.getInsertedOption();
     option.getDecoration().getAttributes().setBackground(Color.WHITE);
     option.getDecoration().getAttributes().setForeground(Color.GREEN);
     //change the font style
     Font font = option.getDecoration().getFont();
     font.setStyle(StyleType.ITALIC);
     font.setName("Courier New");
     // sends all options updates to the server
     data.update();
 
     wiDoc.refresh();
 
     Reports reps = wiDoc.getReports();
     Report rep = reps.getItem(0);
     TrackDataInfo info = rep.getTrackDataInfo();
     info.showChanges(true);
 }
 

Since:
12.0

Method Summary
 java.lang.String getFormattedReferenceDate()
          Gets the reference date used for comparison, formatted with the correct locale.
 java.util.Date getReferenceDate()
          Gets the date of the reference used for comparison.
 ReferenceUpdateMode getTrackDataMode()
          Gets the history update mode.
 TrackDataOptions getTrackDataOptions()
          Gets the TrackDataOptions interface.
 boolean isActive()
          Checks if Track Data Changes is active on this document or not.
 void setCurrentAsReference()
          Sets the current document state as the comparison reference for the Track Data Changes feature.
 void setTrackDataMode(ReferenceUpdateMode mode)
          Switches to track data mode and activates the same if it's not already activated.
 void showChanges(boolean enable)
          Shows or hides tracked changes on all reports.
 void update()
          Allows to update the TrackDataOptions by calling the server.
 

Method Detail

setCurrentAsReference

void setCurrentAsReference()
Sets the current document state as the comparison reference for the Track Data Changes feature. Subsequently when track data changes feature is activated, the current set document reference will be used for comparison.


isActive

boolean isActive()
Checks if Track Data Changes is active on this document or not.

Returns:
true if Track Data Changes is active. if Track Data Changes is not active, it returns false .
See Also:
PropertiesType.IS_TRACK_DATA_ACTIVATED

setTrackDataMode

void setTrackDataMode(ReferenceUpdateMode mode)
Switches to track data mode and activates the same if it's not already activated. If mode == ReferenceUpdateMode.DISABLED, track data changes feature is disabled.

See Also:
PropertiesType.IS_TRACK_DATA_ACTIVATED, PropertiesType.IS_TRACK_DATA_MODE_AUTO_USED

getTrackDataMode

ReferenceUpdateMode getTrackDataMode()
Gets the history update mode.

Returns:
gets the ReferenceUpdateMode object.
See Also:
PropertiesType.IS_TRACK_DATA_MODE_AUTO_USED

getReferenceDate

java.util.Date getReferenceDate()
Gets the date of the reference used for comparison.

Returns:
the reference date

getFormattedReferenceDate

java.lang.String getFormattedReferenceDate()
Gets the reference date used for comparison, formatted with the correct locale.

Returns:
the formatted reference date

getTrackDataOptions

TrackDataOptions getTrackDataOptions()
Gets the TrackDataOptions interface.

Returns:
the TrackDataOptions interface

update

void update()
Allows to update the TrackDataOptions by calling the server.


showChanges

void showChanges(boolean enable)
Shows or hides tracked changes on all reports. If TrackData is not active on this document, this method call is ignored.

Parameters:
enable - if true , it shows the changes on all reports, otherwise if false , call is ignored.