com.hlcl.rql.hip.as
Class ChangeLogPage

java.lang.Object
  extended by com.hlcl.rql.util.as.ProjectPage
      extended by com.hlcl.rql.hip.as.ChangeLogPage

public class ChangeLogPage
extends ProjectPage

Author:
lejafr This class represents a page in the HIP project containing a change log for HIP subscription; in fact every physical page.

Constructor Summary
ChangeLogPage(Page page)
          Construct a change log page wrapping the given general page.
 
Method Summary
 ChangeLogEntry addEntry(User user, java.lang.String comment)
          Adds a new change log entry for given user and comment with current date and time.
 java.util.List<ChangeLogEntry> getChanges()
          Returns the list of changes sorted by date descending.
 int getCommentMaxLength()
          Returns the maximal length of the comment field.
 ChangeLogEntry getLatestChange()
          Returns the latest entry of the list of changes
 ChangeLogEntry getNewEntry(User user)
          Returns the new entry initialized with user and timestamp, but empty comment.
 java.util.Date getNewEntryTimestamp()
          Returns the timestamp at which time the new entry was requested.
 int getNumberOfChanges()
          Returns the number of changes of page.
 boolean isCommentValid(java.lang.String comment)
          Returns true only, if the given comment text is valid.
 boolean isSubscribeable()
          Liefert true, falls diese seite abonniert werden darf.
 void saveNewEntry(java.lang.String comment)
          Speichert den Kommtar comment im neuen Entry und speichert alle changes wieder in der seite.
 void setIsSubscribeable(boolean isSubscribeable)
          Ändert die Seiteneigenschaft isSubscribeable auf den gegebenen Wert.
 
Methods inherited from class com.hlcl.rql.util.as.ProjectPage
assignAuthorizationPackage, contains, createAndConnectPageAtContainer, enterText, getCreatedByUserName, getCreatedOn, getInfoText, getInfoText, getLastChangedByUserEmailAddress, getLastChangedByUserName, getLastChangedOnAsddMMyyyyHmma, getLockedByUserEmailAddress, getLockedByUserName, getLockedSinceAsddMMyyyyHmma, getOptionListValue, getPage, getPageHeadline, getPageHeadlineAndId, getPageId, getPageInfoText, getProject, getStandardFieldDateElement, getStandardFieldDateValue, getStandardFieldNumericElement, getStandardFieldNumericValue, getStandardFieldTextElement, getStandardFieldTextValue, getStateInfo, getTemplateByGuid, getTextElement, getTextValue, isChangeable, isInStateSavedAsDraft, isLocked, isTextEmpty, setElementValues, setFilename, setHeadline, setOptionListValue, setStandardFieldDateValue, setStandardFieldNumericValue, setStandardFieldTextValue, setTextValue, submitToWorkflow
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeLogPage

public ChangeLogPage(Page page)
Construct a change log page wrapping the given general page.

Method Detail

isSubscribeable

public boolean isSubscribeable()
                        throws RQLException
Liefert true, falls diese seite abonniert werden darf. Falls nicht, darf kein change comment erfasst werden.

Throws:
RQLException

setIsSubscribeable

public void setIsSubscribeable(boolean isSubscribeable)
                        throws RQLException
Ändert die Seiteneigenschaft isSubscribeable auf den gegebenen Wert.

Throws:
RQLException

addEntry

public ChangeLogEntry addEntry(User user,
                               java.lang.String comment)
                        throws RQLException
Adds a new change log entry for given user and comment with current date and time.

Throws:
RQLException

getNewEntry

public ChangeLogEntry getNewEntry(User user)
                           throws RQLException
Returns the new entry initialized with user and timestamp, but empty comment.

Throws:
RQLException

getCommentMaxLength

public int getCommentMaxLength()
                        throws RQLException
Returns the maximal length of the comment field.

Throws:
RQLException

getNewEntryTimestamp

public java.util.Date getNewEntryTimestamp()
                                    throws RQLException
Returns the timestamp at which time the new entry was requested.

Throws:
RQLException

saveNewEntry

public void saveNewEntry(java.lang.String comment)
                  throws RQLException
Speichert den Kommtar comment im neuen Entry und speichert alle changes wieder in der seite.

Throws:
RQLException

isCommentValid

public boolean isCommentValid(java.lang.String comment)
                       throws RQLException
Returns true only, if the given comment text is valid. Currently only the length is checked.

Throws:
RQLException

getNumberOfChanges

public int getNumberOfChanges()
                       throws RQLException
Returns the number of changes of page. Treat the created entry not as change.

Throws:
RQLException

getLatestChange

public ChangeLogEntry getLatestChange()
                               throws RQLException
Returns the latest entry of the list of changes

Returns:
Throws:
RQLException

getChanges

public java.util.List<ChangeLogEntry> getChanges()
                                          throws RQLException
Returns the list of changes sorted by date descending. Saved in xml in this order.

Throws:
RQLException