com.wewebu.ow.server.fieldctrlimpl
Class OwFieldManagerControlNote.OwNote

java.lang.Object
  extended by com.wewebu.ow.server.fieldctrlimpl.OwFieldManagerControlNote.OwNote
Enclosing class:
OwFieldManagerControlNote

public static class OwFieldManagerControlNote.OwNote
extends Object

Convenient class for holding a note.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Constructor Summary
OwFieldManagerControlNote.OwNote(Locale locale_p, String user_p, String timestamp_p, String content_p)
          Constructor
 
Method Summary
 void appendContent(String content_p)
          Append m_content to this note.
static OwFieldManagerControlNote.OwNote buildNote(Locale locale_p, String rawNoteText_p)
          Build a note object from a String object.
static OwFieldManagerControlNote.OwNote buildNoteFromOldContent(Locale locale_p, String rawNoteText_p)
          Build a note object from a String object (old style m_notes).
 boolean equals(Object o_p)
           
 String[] getContentLines()
          Get the note m_content as lines.
 String getFormatedNote()
          Get note m_content.
 String getHeader()
          Get the note header
 int getSize()
          Get the size of this note.
 int hashCode()
           
 void setShortenThreshold(int threshold_p)
          Set the threshold for shortening note.
 void setShouldShortenNote(boolean shouldShortNote_p)
          Set the shouldShortNote flag.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OwFieldManagerControlNote.OwNote

public OwFieldManagerControlNote.OwNote(Locale locale_p,
                                        String user_p,
                                        String timestamp_p,
                                        String content_p)
Constructor

Parameters:
locale_p - - the locale parameter.
user_p - - m_user
timestamp_p - - time stamp
content_p - - note m_content.
Method Detail

equals

public boolean equals(Object o_p)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

getFormatedNote

public String getFormatedNote()
Get note m_content.

Returns:
note m_content.

getHeader

public String getHeader()
Get the note header

Returns:
- the note header

getSize

public int getSize()
Get the size of this note.


appendContent

public void appendContent(String content_p)
Append m_content to this note.

Parameters:
content_p - - the m_content to be added.

getContentLines

public String[] getContentLines()
Get the note m_content as lines. If necessary, truncate the lines to a given threshold.

Returns:
the lines.

buildNote

public static OwFieldManagerControlNote.OwNote buildNote(Locale locale_p,
                                                         String rawNoteText_p)
                                                  throws OwFieldManagerControlNote.OwNoteException
Build a note object from a String object.

Parameters:
locale_p - the current locale.
rawNoteText_p - - the m_content.
Returns:
the created note.
Throws:
OwFieldManagerControlNote.OwNoteException - - when a note cannot be created from the given text.

buildNoteFromOldContent

public static OwFieldManagerControlNote.OwNote buildNoteFromOldContent(Locale locale_p,
                                                                       String rawNoteText_p)
                                                                throws OwFieldManagerControlNote.OwNoteException
Build a note object from a String object (old style m_notes).

Parameters:
locale_p - - the current locale
rawNoteText_p - - the m_content.
Returns:
the created note.
Throws:
OwFieldManagerControlNote.OwNoteException - - thrown when the note cannot be created.

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

setShouldShortenNote

public void setShouldShortenNote(boolean shouldShortNote_p)
Set the shouldShortNote flag.

Parameters:
shouldShortNote_p - - the flag.

setShortenThreshold

public void setShortenThreshold(int threshold_p)
Set the threshold for shortening note.

Parameters:
threshold_p - - the value of threshold.


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.