public final class CommandLineViewer extends java.lang.Object implements BackupViewer
BackupViewer
interface.
Delivers information to the user via command line.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
mBackupName |
private int[] |
mDataMaxLengths |
private java.text.DateFormat |
mDateFormatter |
private int |
mRowHeight |
private int[] |
mTableRatios |
private int |
mWidth |
Constructor and Description |
---|
CommandLineViewer() |
Modifier and Type | Method and Description |
---|---|
private int |
computeRowHeight() |
java.lang.String |
getBackupName() |
private void |
printDashedLine(int width) |
void |
printHeader()
This method just prints the header for the output information table.
|
private java.lang.String[] |
retrieveFormattedRows(java.lang.String[] data) |
void |
setBackupName(java.lang.String name) |
void |
showBackupInfo(java.lang.String name,
java.lang.String original,
java.lang.String backup,
boolean shallow,
java.util.Date date)
This mathod takes information about a backup from a
BackupManager instance. |
private java.lang.String mBackupName
private int mWidth
private int[] mTableRatios
private int[] mDataMaxLengths
private int mRowHeight
private java.text.DateFormat mDateFormatter
public void printHeader()
public void showBackupInfo(java.lang.String name, java.lang.String original, java.lang.String backup, boolean shallow, java.util.Date date)
BackupManager
instance.
The information is then listed in the form of a table.showBackupInfo
in interface BackupViewer
name
- backup nameshallow
- whether the backup was scheduled as shallowdate
- date of last synchronizationoriginal
- original directorybackup
- backup directorypublic java.lang.String getBackupName()
getBackupName
in interface BackupViewer
public void setBackupName(java.lang.String name)
setBackupName
in interface BackupViewer
private void printDashedLine(int width)
private int computeRowHeight()
private java.lang.String[] retrieveFormattedRows(java.lang.String[] data)