Class XHTMLListSortOperation
java.lang.Object
ro.sync.ecss.extensions.commons.sort.SortOperation
ro.sync.ecss.extensions.commons.sort.XHTMLListSortOperation
- All Implemented Interfaces:
AuthorOperation
,Extension
'Sort list' operation for XHTML.
-
Field Summary
Fields inherited from class ro.sync.ecss.extensions.commons.sort.SortOperation
authorAccess, COLUMN
Fields inherited from interface ro.sync.ecss.extensions.api.AuthorOperation
NAMESPACE_ARGUMENT, NAMESPACE_ARGUMENT_DESCRIPTOR, SCHEMA_AWARE_ARGUMENT, SCHEMA_AWARE_ARGUMENT_DESCRIPTOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
canBeSorted
(AuthorElement parent, int[] selectedNonIgnoredChildrenInterval) Check if the parent element selected children can be sorted.protected String
Get the ID of the help page which will be called by the end user.getSortCriteria
(AuthorElement parent) Obtain the sort criterion.String[]
getSortKeysValues
(AuthorNode node, SortCriteriaInformation sortInfo) Obtain the values of the keys that can be used for sorting.getSortParent
(int offset, AuthorAccess authorAccess) Obtain the parent node of all the nodes which will be sorted.boolean
isIgnored
(AuthorNode node) Checks if a given node is ignored when sorting.Methods inherited from class ro.sync.ecss.extensions.commons.sort.SortOperation
doOperation, forceSortAll, getArguments, getDescription, getNonIgnoredChildren, getSelectedNonIgnoredChildrenInterval, getTextContentToSort
-
Constructor Details
-
XHTMLListSortOperation
public XHTMLListSortOperation()Constructor.
-
-
Method Details
-
getSortParent
public AuthorElement getSortParent(int offset, AuthorAccess authorAccess) throws AuthorOperationException Description copied from class:SortOperation
Obtain the parent node of all the nodes which will be sorted.- Specified by:
getSortParent
in classSortOperation
- Parameters:
offset
- The offset where the operation was invoked.authorAccess
- TheAuthorAccess
.- Returns:
- The parent node of the nodes which will be sorted.
- Throws:
AuthorOperationException
- When the offset is negative or greater than the content length.- See Also:
-
isIgnored
Description copied from class:SortOperation
Checks if a given node is ignored when sorting.- Specified by:
isIgnored
in classSortOperation
- Parameters:
node
- The node to be checked.- Returns:
true
if the given node is ignored when sorting.- See Also:
-
canBeSorted
public void canBeSorted(AuthorElement parent, int[] selectedNonIgnoredChildrenInterval) throws AuthorOperationException Description copied from class:SortOperation
Check if the parent element selected children can be sorted. For example a table row containing a cell with rowspan cannot be sorted and stops the operation.- Specified by:
canBeSorted
in classSortOperation
- Parameters:
parent
- The parent of the elements which will be sorted.selectedNonIgnoredChildrenInterval
- The interval of selected children indices.- Throws:
AuthorOperationException
- When the given node is not sortable. For example a table row containing a cell with multiple rowspan stops the operation.- See Also:
-
getSortKeysValues
public String[] getSortKeysValues(AuthorNode node, SortCriteriaInformation sortInfo) throws AuthorOperationException Description copied from class:SortOperation
Obtain the values of the keys that can be used for sorting.- Specified by:
getSortKeysValues
in classSortOperation
- Parameters:
node
- The element which will be sorted.sortInfo
- The sort information corresponding to the user choice.- Returns:
- an array containing the values of the keys which can be used for sorting.
- Throws:
AuthorOperationException
- If the text content cannot be obtained.- See Also:
-
getSortCriteria
public List<CriterionInformation> getSortCriteria(AuthorElement parent) throws AuthorOperationException Description copied from class:SortOperation
Obtain the sort criterion.- Specified by:
getSortCriteria
in classSortOperation
- Parameters:
parent
- The parent node of the nodes which will be sorted.- Returns:
- A
SortCriteriaInformation
containing theCriterionInformation
objects. - Throws:
AuthorOperationException
- See Also:
-
getHelpPageID
Description copied from class:SortOperation
Get the ID of the help page which will be called by the end user.- Overrides:
getHelpPageID
in classSortOperation
- Returns:
- the ID of the help page which will be called by the end user or
null
. - See Also:
-