|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.liquidsite.app.admin.AdminUtils
A class containing general utility methods for the administration application.
| Constructor Summary | |
AdminUtils()
|
|
| Method Summary | |
static java.lang.String |
formatDate(User user,
java.util.Date date)
Formats a date to a printable string. |
static java.lang.String |
formatFileSize(long size)
Formats a file size to a printable string. |
static Application |
getApplication()
Returns the application currently used |
static java.io.File |
getBackupDir()
Returns the backup directory for the system. |
static java.lang.String |
getCategory(java.lang.Object obj)
Returns an object category name. |
static ContentManager |
getContentManager()
Returns the content manager for administration. |
static java.text.SimpleDateFormat |
getDateFormat(User user)
Returns a date format for the specified user. |
static PersistentObject |
getReference(Request request)
Returns the domain or content referenced by a request. |
static java.lang.String |
getScriptDate(User user,
java.util.Date date)
Returns the JavaScript representation of a date. |
static java.lang.String |
getScriptString(java.lang.String str)
Returns the JavaScript representation of a string. |
static java.io.File |
getStatisticsDir(Domain domain)
Returns the statistics directory for a domain. |
static java.lang.String |
getXmlString(java.lang.String str)
Returns the XML representation of a string. |
static boolean |
isOnline(java.lang.Object obj)
Checks is a specified object is online. |
static java.util.Date |
parseDate(User user,
java.lang.String str)
Parses a date string into a date. |
static void |
sendTemplate(Request request,
java.lang.String templateName)
Processes a request to a template file. |
static void |
setReference(Request request,
PersistentObject obj)
Sets the domain or content reference attributes in a request. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AdminUtils()
| Method Detail |
public static Application getApplication()
public static ContentManager getContentManager()
throws ContentException
ContentException - if no content manager existspublic static java.io.File getBackupDir()
public static java.io.File getStatisticsDir(Domain domain)
domain - the domain object
public static java.text.SimpleDateFormat getDateFormat(User user)
user - the user to create a date format for
public static java.lang.String formatDate(User user,
java.util.Date date)
user - the current userdate - the date to format
public static java.util.Date parseDate(User user,
java.lang.String str)
throws java.text.ParseException
user - the current userstr - the string containing the date
java.text.ParseException - if the string didn't contain a valid
datepublic static java.lang.String formatFileSize(long size)
size - the file size to format
public static java.lang.String getScriptDate(User user,
java.util.Date date)
user - the userdate - the date to present, or null
public static java.lang.String getScriptString(java.lang.String str)
str - the string to present, or null
public static java.lang.String getXmlString(java.lang.String str)
str - the string to transform
public static java.lang.String getCategory(java.lang.Object obj)
obj - the domain or content object
public static boolean isOnline(java.lang.Object obj)
throws ContentException
obj - the domain or content object
ContentException - if the database couldn't be accessed
properly
public static PersistentObject getReference(Request request)
throws ContentException,
ContentSecurityException
request - the request
ContentException - if the database couldn't be accessed
properly
ContentSecurityException - if the user didn't have the
required permissions
public static void setReference(Request request,
PersistentObject obj)
request - the requestobj - the domain or content object
public static void sendTemplate(Request request,
java.lang.String templateName)
request - the request objecttemplateName - the template file name
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||