public static class OwFieldManagerControlNote.OwNoteDataModel extends Object
Class holding the new note data model.
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
Modifier and Type | Field and Description |
---|---|
static String |
NOTE_DELIMITER
delimiter for note
|
static String |
NOTE_DELIMITER_REGEXP
delimiter for note regexp
|
Constructor and Description |
---|
OwFieldManagerControlNote.OwNoteDataModel(Locale locale_p,
String noteContent_p)
Constructor - create a list of m_notes from note m_content, if it's possible.
|
OwFieldManagerControlNote.OwNoteDataModel(Locale locale_p,
String noteContent_p,
boolean showNewNotesAtTheEnd_p)
Constructor - create a list of m_notes from note m_content, if it's possible.
|
Modifier and Type | Method and Description |
---|---|
void |
appendNote(OwFieldManagerControlNote.OwNote note_p)
Append a note to this model
|
OwFieldManagerControlNote.OwNote |
getNote(int index_p)
Get the note specified by index, or null.
|
String |
getNoteRawContent()
Get the note m_content as was set.
|
List |
getNotes()
Get the list of m_notes
|
int |
getNumberOfNotes()
Get the number of m_notes.
|
List |
getShortenedNotes()
Get a list with shortened m_notes.
|
int |
getSize()
Get the size occupied by this note.
|
String |
getTrimmedText()
Get the m_content of this note model, as needed to be saved in m_content manager system.
|
boolean |
isLastNoteShortened()
Returns
true in case the last note was shortened. |
boolean |
isNullContent()
Check if this note model content is null;
|
void |
setMaxSize(int maxSize_p)
Set max size for this note.
|
void |
setShortenThreshold(int shortenThreshold_p)
Set the threshold: the note with size over this threshold will be shortened.
|
boolean |
shouldShortenNotes()
Check if the note need to be shortened.
|
String |
toString() |
public static final String NOTE_DELIMITER
public static final String NOTE_DELIMITER_REGEXP
public OwFieldManagerControlNote.OwNoteDataModel(Locale locale_p, String noteContent_p) throws OwFieldManagerControlNote.OwNoteException
locale_p
- - the current localenoteContent_p
- - m_content for the noteOwFieldManagerControlNote.OwNoteException
- - thrown when the note model cannot be created from the given stringpublic OwFieldManagerControlNote.OwNoteDataModel(Locale locale_p, String noteContent_p, boolean showNewNotesAtTheEnd_p) throws OwFieldManagerControlNote.OwNoteException
locale_p
- - the current localenoteContent_p
- - m_content for the noteshowNewNotesAtTheEnd_p
- - if true
the new notes are shown at the end of the field.OwFieldManagerControlNote.OwNoteException
- - thrown when the note model cannot be created from the given stringpublic String getNoteRawContent()
public boolean isNullContent()
true
if this model content is null
.public void appendNote(OwFieldManagerControlNote.OwNote note_p) throws OwFieldManagerControlNote.OwNoteException
note_p
- OwFieldManagerControlNote.OwNoteException
public int getSize()
public List getNotes()
public String getTrimmedText()
public int getNumberOfNotes()
public OwFieldManagerControlNote.OwNote getNote(int index_p)
index_p
- public boolean isLastNoteShortened()
true
in case the last note was shortened.true
in case the last note was shortened.public String toString()
toString
in class Object
Object.toString()
public void setMaxSize(int maxSize_p)
maxSize_p
- public void setShortenThreshold(int shortenThreshold_p)
shortenThreshold_p
- public boolean shouldShortenNotes()
true
if the note should be shortened.public List getShortenedNotes()
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.