Class DocbookListSortOperation
java.lang.Object
ro.sync.ecss.extensions.commons.sort.SortOperation
ro.sync.ecss.extensions.commons.sort.DocbookListSortOperation
- All Implemented Interfaces:
AuthorOperation,Extension
Class for Docbook 'Sort list' operation.
-
Field Summary
Fields inherited from class ro.sync.ecss.extensions.commons.sort.SortOperation
authorAccess, COLUMNFields 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 TypeMethodDescriptionvoidcanBeSorted(AuthorElement parent, int[] selectedNonIgnoredChildrenInterval) Check if the parent element selected children can be sorted.protected StringGet 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.booleanisIgnored(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
-
DocbookListSortOperation
public DocbookListSortOperation()Constructor.
-
-
Method Details
-
getSortParent
public AuthorElement getSortParent(int offset, AuthorAccess authorAccess) throws AuthorOperationException Description copied from class:SortOperationObtain the parent node of all the nodes which will be sorted.- Specified by:
getSortParentin 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:SortOperationChecks if a given node is ignored when sorting.- Specified by:
isIgnoredin classSortOperation- Parameters:
node- The node to be checked.- Returns:
trueif the given node is ignored when sorting.- See Also:
-
canBeSorted
public void canBeSorted(AuthorElement parent, int[] selectedNonIgnoredChildrenInterval) throws AuthorOperationException Description copied from class:SortOperationCheck 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:
canBeSortedin 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:SortOperationObtain the values of the keys that can be used for sorting.- Specified by:
getSortKeysValuesin 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:SortOperationObtain the sort criterion.- Specified by:
getSortCriteriain classSortOperation- Parameters:
parent- The parent node of the nodes which will be sorted.- Returns:
- A
SortCriteriaInformationcontaining theCriterionInformationobjects. - Throws:
AuthorOperationException- See Also:
-
getHelpPageID
Description copied from class:SortOperationGet the ID of the help page which will be called by the end user.- Overrides:
getHelpPageIDin classSortOperation- Returns:
- the ID of the help page which will be called by the end user or
null. - See Also:
-