com.flexive.shared.interfaces
Interface PhraseEngine

All Known Subinterfaces:
PhraseEngineLocal

public interface PhraseEngine

Phrase engine

Since:
3.2.0
Author:
Markus Plesser (markus.plesser@ucs.at), UCS - unique computing solutions gmbh (http://www.ucs.at)

Method Summary
 void assignPhrase(long assignmentOwner, long nodeId, long nodeMandator, long phraseId, long phraseMandator, long pos, boolean checkPositioning)
          Assign a phrase to a node.
 void assignPhrase(long assignmentOwner, long nodeId, long nodeMandator, java.lang.String phraseKey, long phraseMandator, long pos, boolean checkPositioning)
          Assign a phrase to a node.
 void assignPhrases(long position, long assignmentOwner, long nodeId, long nodeMandator, FxPhrase[] phrases)
          Assign phrases at a given position to a node
 void clearPhrases(FxPhraseCategorySelection categories, long mandatorId)
          Remove all phrases that belong to the requested mandator
 void clearPhrases(long mandatorId)
          Remove all phrases that belong to the requested mandator
 void clearTree(FxPhraseCategorySelection categories, long mandatorId)
          Remove all tree nodes that belong to the requested mandator and match selected categories
 void clearTree(long mandatorId)
          Remove all tree nodes that belong to the requested mandator
 java.util.List<FxPhraseTreeNodePosition> getAssignedNodes(int category, java.lang.String phraseKey, long... mandator)
          Get all assignments for a phrase.
 java.util.List<FxPhraseTreeNodePosition> getAssignedNodes(long phraseId, long phraseMandator, long... mandator)
          Get all assignments for a phrase.
 java.util.List<FxPhraseTreeNodePosition> getAssignedNodes(java.lang.String phraseKey, long... mandator)
          Get all assignments for a phrase.
 FxPhrase loadPhrase(int category, java.lang.String phraseKey, long... mandators)
          Load first available FxPhrase instances of a phrase
 FxPhrase loadPhrase(java.lang.String phraseKey, long... mandators)
          Load first available FxPhrase instances of a phrase
 java.util.List<FxPhrase> loadPhrases(int category, java.lang.String phraseKeyPrefix, long... mandators)
          Load all FxPhrase instances of a phrase with the requested key prefix
 java.util.List<FxPhrase> loadPhrases(java.lang.String phraseKeyPrefix, long... mandators)
          Load all FxPhrase instances of a phrase with the requested key prefix
 java.util.List<FxPhraseTreeNode> loadPhraseTree(boolean mandator2top, long... mandators)
          Load all root nodes and child nodes for up to 2 mandators
 java.util.List<FxPhraseTreeNode> loadPhraseTree(int category, boolean mandator2top, long... mandators)
          Load all root nodes and child nodes for up to 2 mandators
 FxPhraseTreeNode loadPhraseTreeNode(int category, long nodeId, long mandatorId, boolean mandator2top, long... mandators)
          Load a tree nodes and its child nodes for up to 2 mandators
 FxPhraseTreeNode loadPhraseTreeNode(long nodeId, long mandatorId, boolean mandator2top, long... mandators)
          Load a tree nodes and its child nodes for up to 2 mandators
 java.lang.String loadPhraseValue(long language, java.lang.String phraseKey, long... mandators)
          Load a phrase value in the requested language
 FxString loadPhraseValue(java.lang.String phraseKey, long... mandators)
          Load all available translation of a phrase
 void moveTreeNode(int category, long nodeId, long mandatorId, int delta)
          Move a tree node delta positions (within its own mandator)
 void moveTreeNode(long nodeId, long mandatorId, int delta)
          Move a tree node delta positions (within its own mandator)
 void moveTreeNodeAssignment(int category, long assignmentOwner, long nodeId, long nodeMandatorId, long phraseId, long phraseMandator, int delta)
          "Move" the position of an assignment
 void moveTreeNodeAssignment(long assignmentOwner, long nodeId, long nodeMandatorId, long phraseId, long phraseMandator, int delta)
          "Move" the position of an assignment
 void removeAssignmentsFromNode(int category, long nodeId, long nodeMandator)
          Remove all phrase assignments from a node.
 void removeAssignmentsFromNode(long nodeId, long nodeMandator)
          Remove all phrase assignments from a node.
 int removeMandatorPhrases(FxPhraseCategorySelection categories, long mandator)
          Removes all phrases of the requested mandator and all its mappings (but not if used in tree nodes!)
 int removeMandatorPhrases(long mandator)
          Removes all phrases of the requested mandator and all its mappings (but not if used in tree nodes!)
 boolean removePhrase(int category, java.lang.String phraseKey, long mandator)
          Remove the phrase identified by its key and mandator and all its mappings
 boolean removePhrase(java.lang.String phraseKey, long mandator)
          Remove the phrase identified by its key and mandator and all its mappings
 boolean removePhraseAssignment(int category, long assignmentOwner, long nodeId, long nodeMandator, long phraseId, long phraseMandator)
          Remove an assign of a phrase from a node.
 boolean removePhraseAssignment(long assignmentOwner, long nodeId, long nodeMandator, long phraseId, long phraseMandator)
          Remove an assign of a phrase from a node.
 int removePhrases(int category, java.lang.String phraseKeyPrefix, long mandator)
          Remove all phrases with a key starting with phraseKeyPrefix and mandator
 int removePhrases(java.lang.String phraseKeyPrefix, long mandator)
          Remove all phrases with a key starting with phraseKeyPrefix and mandator
 void removeTreeNode(int category, long nodeId, long mandatorId)
          Remove a tree node, moving its children up one level and removing all assignments to this node
 void removeTreeNode(long nodeId, long mandatorId)
          Remove a tree node, moving its children up one level and removing all assignments to this node
 long savePhrase(int category, java.lang.String phraseKey, FxString value, FxPhraseSearchValueConverter converter, java.lang.Object tag, long mandator)
          Save or create a phrase
 long savePhrase(int category, java.lang.String phraseKey, FxString value, long mandator)
          Save or create a phrase (tag will be removed existing phrases!)
 long savePhrase(int category, java.lang.String phraseKey, FxString value, java.lang.Object tag, long mandator)
          Save or create a phrase
 long savePhrase(java.lang.String phraseKey, FxString value, FxPhraseSearchValueConverter converter, long mandator)
          Save or create a phrase (tag will be removed existing phrases!)
 long savePhrase(java.lang.String phraseKey, FxString value, FxPhraseSearchValueConverter converter, java.lang.Object tag, long mandator)
          Save or create a phrase
 long savePhrase(java.lang.String phraseKey, FxString value, long mandator)
          Save or create a phrase (tag will be removed existing phrases!)
 long savePhrase(java.lang.String phraseKey, FxString value, java.lang.Object tag, long mandator)
          Save or create a phrase
 FxPhraseTreeNode saveTreeNode(FxPhraseTreeNode node)
          Save or create a tree node.
 FxPhraseQueryResult search(FxPhraseQuery query)
          Execute the requested query, returning all results in one page
 FxPhraseQueryResult search(FxPhraseQuery query, int page, int pageSize)
          Execute the requested query with paging
 void setPhraseHidden(int category, java.lang.String phraseKey, long mandator, boolean hidden)
          Set a phrases hidden flag
 void setPhraseHidden(java.lang.String phraseKey, long mandator, boolean hidden)
          Set a phrases hidden flag
 void setPhraseTreeNodeParent(long nodeId, long nodeMandator, long parentId, long parentMandator)
          Set the parent of a phrase tree node.
 void syncDivisionResources(long targetMandator, FxPhraseSearchValueConverter converter)
          Clear all phrases for the targetMandator and copy the division resources as phrases (using the targetMandator as owner)
 void syncPhraseNodeSequencer(int category, long mandatorId)
          Synchronize the phrase node sequencer to match the current max id + 1
 void syncPhraseNodeSequencer(long mandatorId)
          Synchronize the phrase node sequencer to match the current max id + 1
 void syncPhraseSequencer(long mandatorId)
          Synchronize the phrase sequencer to match the current max id + 1
 

Method Detail

savePhrase

long savePhrase(java.lang.String phraseKey,
                FxString value,
                long mandator)
                throws FxNoAccessException
Save or create a phrase (tag will be removed existing phrases!)

Parameters:
phraseKey - phrase key
value - phrase value
mandator - phrase mandator
Returns:
phrase id (for the mandator)
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator

savePhrase

long savePhrase(int category,
                java.lang.String phraseKey,
                FxString value,
                long mandator)
                throws FxNoAccessException
Save or create a phrase (tag will be removed existing phrases!)

Parameters:
category - phrase category
phraseKey - phrase key
value - phrase value
mandator - phrase mandator
Returns:
phrase id (for the mandator)
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator

savePhrase

long savePhrase(java.lang.String phraseKey,
                FxString value,
                FxPhraseSearchValueConverter converter,
                long mandator)
                throws FxNoAccessException
Save or create a phrase (tag will be removed existing phrases!)

Parameters:
phraseKey - phrase key
value - phrase value
converter - converter for value used for search operations
mandator - phrase mandator
Returns:
phrase id (for the mandator)
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator

savePhrase

long savePhrase(java.lang.String phraseKey,
                FxString value,
                java.lang.Object tag,
                long mandator)
                throws FxNoAccessException
Save or create a phrase

Parameters:
phraseKey - phrase key
value - phrase value
tag - String if single language or FxString if multilanguage
mandator - phrase mandator
Returns:
phrase id (for the mandator)
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator

savePhrase

long savePhrase(int category,
                java.lang.String phraseKey,
                FxString value,
                java.lang.Object tag,
                long mandator)
                throws FxNoAccessException
Save or create a phrase

Parameters:
category - phrase category
phraseKey - phrase key
value - phrase value
tag - String if single language or FxString if multilanguage
mandator - phrase mandator
Returns:
phrase id (for the mandator)
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator

savePhrase

long savePhrase(java.lang.String phraseKey,
                FxString value,
                FxPhraseSearchValueConverter converter,
                java.lang.Object tag,
                long mandator)
                throws FxNoAccessException
Save or create a phrase

Parameters:
phraseKey - phrase key
value - phrase value
converter - converter for value used for search operations
tag - String if single language or FxString if multilanguage
mandator - phrase mandator
Returns:
phrase id (for the mandator)
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator

savePhrase

long savePhrase(int category,
                java.lang.String phraseKey,
                FxString value,
                FxPhraseSearchValueConverter converter,
                java.lang.Object tag,
                long mandator)
                throws FxNoAccessException
Save or create a phrase

Parameters:
category - phrase category
phraseKey - phrase key
value - phrase value
converter - converter for value used for search operations
tag - String if single language or FxString if multilanguage
mandator - phrase mandator
Returns:
phrase id (for the mandator)
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator

setPhraseHidden

void setPhraseHidden(java.lang.String phraseKey,
                     long mandator,
                     boolean hidden)
                     throws FxNoAccessException
Set a phrases hidden flag

Parameters:
phraseKey - phrase key
mandator - phrase mandator
hidden - hidden flag
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator

setPhraseHidden

void setPhraseHidden(int category,
                     java.lang.String phraseKey,
                     long mandator,
                     boolean hidden)
                     throws FxNoAccessException
Set a phrases hidden flag

Parameters:
category - phrase category
phraseKey - phrase key
mandator - phrase mandator
hidden - hidden flag
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator

removePhrase

boolean removePhrase(java.lang.String phraseKey,
                     long mandator)
                     throws FxNoAccessException,
                            FxEntryInUseException
Remove the phrase identified by its key and mandator and all its mappings

Parameters:
phraseKey - phrase key
mandator - phrase mandator
Returns:
if the phrase to be removed was found and successfully removed
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator
FxEntryInUseException - if the phrase is in use by the tree

removePhrase

boolean removePhrase(int category,
                     java.lang.String phraseKey,
                     long mandator)
                     throws FxNoAccessException,
                            FxEntryInUseException
Remove the phrase identified by its key and mandator and all its mappings

Parameters:
category - phrase category
phraseKey - phrase key
mandator - phrase mandator
Returns:
if the phrase to be removed was found and successfully removed
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator
FxEntryInUseException - if the phrase is in use by the tree

removePhrases

int removePhrases(java.lang.String phraseKeyPrefix,
                  long mandator)
                  throws FxNoAccessException,
                         FxEntryInUseException
Remove all phrases with a key starting with phraseKeyPrefix and mandator

Parameters:
phraseKeyPrefix - phrase key prefix
mandator - phrase mandator
Returns:
count of removed phrases
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator
FxEntryInUseException - if the phrase is in use by the tree

removePhrases

int removePhrases(int category,
                  java.lang.String phraseKeyPrefix,
                  long mandator)
                  throws FxNoAccessException,
                         FxEntryInUseException
Remove all phrases with a key starting with phraseKeyPrefix and mandator

Parameters:
category - phrase category
phraseKeyPrefix - phrase key prefix
mandator - phrase mandator
Returns:
count of removed phrases
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator
FxEntryInUseException - if the phrase is in use by the tree

removeMandatorPhrases

int removeMandatorPhrases(long mandator)
                          throws FxNoAccessException,
                                 FxEntryInUseException
Removes all phrases of the requested mandator and all its mappings (but not if used in tree nodes!)

Parameters:
mandator - requested mandator
Returns:
count of removed phrases
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator
FxEntryInUseException - if phrases are in use by the tree

removeMandatorPhrases

int removeMandatorPhrases(FxPhraseCategorySelection categories,
                          long mandator)
                          throws FxNoAccessException,
                                 FxEntryInUseException
Removes all phrases of the requested mandator and all its mappings (but not if used in tree nodes!)

Parameters:
categories - phrase categories
mandator - requested mandator
Returns:
count of removed phrases
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator
FxEntryInUseException - if phrases are in use by the tree

loadPhraseValue

java.lang.String loadPhraseValue(long language,
                                 java.lang.String phraseKey,
                                 long... mandators)
                                 throws FxNotFoundException
Load a phrase value in the requested language

Parameters:
language - language of the value
phraseKey - phrase key
mandators - list of mandators to try loading the key from (in the requested order)
Returns:
value
Throws:
FxNotFoundException - if no value for the requested language was found or the phrase key does not exist

loadPhraseValue

FxString loadPhraseValue(java.lang.String phraseKey,
                         long... mandators)
                         throws FxNotFoundException
Load all available translation of a phrase

Parameters:
phraseKey - phrase key
mandators - list of mandators to try loading the key from (in the requested order)
Returns:
multilingual value
Throws:
FxNotFoundException - if the phrase key does not exist

loadPhrase

FxPhrase loadPhrase(java.lang.String phraseKey,
                    long... mandators)
                    throws FxNotFoundException
Load first available FxPhrase instances of a phrase

Parameters:
phraseKey - phrase key
mandators - list of mandators to try loading the key from (in the requested order)
Returns:
FxPhrase
Throws:
FxNotFoundException - if the phrase key does not exist

loadPhrase

FxPhrase loadPhrase(int category,
                    java.lang.String phraseKey,
                    long... mandators)
                    throws FxNotFoundException
Load first available FxPhrase instances of a phrase

Parameters:
category - phrase category
phraseKey - phrase key
mandators - list of mandators to try loading the key from (in the requested order)
Returns:
FxPhrase
Throws:
FxNotFoundException - if the phrase key does not exist

loadPhrases

java.util.List<FxPhrase> loadPhrases(java.lang.String phraseKeyPrefix,
                                     long... mandators)
Load all FxPhrase instances of a phrase with the requested key prefix

Parameters:
phraseKeyPrefix - phrase key prefix
mandators - list of mandators to try loading the key from (in the requested order)
Returns:
found FxPhrases ordered by phraseKey

loadPhrases

java.util.List<FxPhrase> loadPhrases(int category,
                                     java.lang.String phraseKeyPrefix,
                                     long... mandators)
Load all FxPhrase instances of a phrase with the requested key prefix

Parameters:
category - phrase category
phraseKeyPrefix - phrase key prefix
mandators - list of mandators to try loading the key from (in the requested order)
Returns:
found FxPhrases ordered by phraseKey

clearPhrases

void clearPhrases(long mandatorId)
                  throws FxNoAccessException,
                         FxEntryInUseException
Remove all phrases that belong to the requested mandator

Parameters:
mandatorId - requested mandator
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator
FxEntryInUseException - if phrases are in use by the phrase tree

clearPhrases

void clearPhrases(FxPhraseCategorySelection categories,
                  long mandatorId)
                  throws FxNoAccessException,
                         FxEntryInUseException
Remove all phrases that belong to the requested mandator

Parameters:
categories - categories to remove
mandatorId - requested mandator
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator
FxEntryInUseException - if phrases are in use by the phrase tree

syncPhraseSequencer

void syncPhraseSequencer(long mandatorId)
Synchronize the phrase sequencer to match the current max id + 1

Parameters:
mandatorId - mandator

saveTreeNode

FxPhraseTreeNode saveTreeNode(FxPhraseTreeNode node)
                              throws FxNoAccessException,
                                     FxNotFoundException
Save or create a tree node. Children are not updated using this method!

Parameters:
node - the node the create or update
Returns:
node
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator
FxNotFoundException - if either the parent node or the phrase dont exist

setPhraseTreeNodeParent

void setPhraseTreeNodeParent(long nodeId,
                             long nodeMandator,
                             long parentId,
                             long parentMandator)
                             throws FxNoAccessException,
                                    FxNotFoundException
Set the parent of a phrase tree node. Parent node category must match the nodes!

Parameters:
nodeId - node id
nodeMandator - node mandator
parentId - parent node id
parentMandator - parent node mandator
Throws:
FxNoAccessException - if the node mandator is not the calling users mandator
FxNotFoundException - if either of the nodes are not found

syncPhraseNodeSequencer

void syncPhraseNodeSequencer(long mandatorId)
Synchronize the phrase node sequencer to match the current max id + 1

Parameters:
mandatorId - mandator

syncPhraseNodeSequencer

void syncPhraseNodeSequencer(int category,
                             long mandatorId)
Synchronize the phrase node sequencer to match the current max id + 1

Parameters:
category - phrase category
mandatorId - mandator

loadPhraseTree

java.util.List<FxPhraseTreeNode> loadPhraseTree(boolean mandator2top,
                                                long... mandators)
Load all root nodes and child nodes for up to 2 mandators

Parameters:
mandator2top - insert nodes of mandator 2 at the top or bottom?
mandators - mandators
Returns:
phrase tree

loadPhraseTree

java.util.List<FxPhraseTreeNode> loadPhraseTree(int category,
                                                boolean mandator2top,
                                                long... mandators)
Load all root nodes and child nodes for up to 2 mandators

Parameters:
category - phrase category
mandator2top - insert nodes of mandator 2 at the top or bottom?
mandators - mandators
Returns:
phrase tree

loadPhraseTreeNode

FxPhraseTreeNode loadPhraseTreeNode(long nodeId,
                                    long mandatorId,
                                    boolean mandator2top,
                                    long... mandators)
                                    throws FxNotFoundException
Load a tree nodes and its child nodes for up to 2 mandators

Parameters:
nodeId - node id
mandatorId - mandator id
mandator2top - insert nodes of mandator 2 at the top or bottom?
mandators - mandators
Returns:
phrase node and its children
Throws:
FxNotFoundException - if no node with the requested id/mandator exists

loadPhraseTreeNode

FxPhraseTreeNode loadPhraseTreeNode(int category,
                                    long nodeId,
                                    long mandatorId,
                                    boolean mandator2top,
                                    long... mandators)
                                    throws FxNotFoundException
Load a tree nodes and its child nodes for up to 2 mandators

Parameters:
category - phrase category
nodeId - node id
mandatorId - mandator id
mandator2top - insert nodes of mandator 2 at the top or bottom?
mandators - mandators
Returns:
phrase node and its children
Throws:
FxNotFoundException - if no node with the requested id/mandator exists

moveTreeNode

void moveTreeNode(long nodeId,
                  long mandatorId,
                  int delta)
                  throws FxNoAccessException,
                         FxNotFoundException
Move a tree node delta positions (within its own mandator)

Parameters:
nodeId - node id
mandatorId - mandator id of the node
delta - delat to move
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator
FxNotFoundException - if no node with the requested id/mandator exists

moveTreeNode

void moveTreeNode(int category,
                  long nodeId,
                  long mandatorId,
                  int delta)
                  throws FxNoAccessException,
                         FxNotFoundException
Move a tree node delta positions (within its own mandator)

Parameters:
category - phrase category
nodeId - node id
mandatorId - mandator id of the node
delta - delat to move
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator
FxNotFoundException - if no node with the requested id/mandator exists

removeTreeNode

void removeTreeNode(long nodeId,
                    long mandatorId)
                    throws FxNoAccessException,
                           FxNotFoundException
Remove a tree node, moving its children up one level and removing all assignments to this node

Parameters:
nodeId - node id
mandatorId - mandator of the node
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator
FxNotFoundException - if no node with the requested id/mandator exists

removeTreeNode

void removeTreeNode(int category,
                    long nodeId,
                    long mandatorId)
                    throws FxNoAccessException,
                           FxNotFoundException
Remove a tree node, moving its children up one level and removing all assignments to this node

Parameters:
category - phrase category
nodeId - node id
mandatorId - mandator of the node
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator
FxNotFoundException - if no node with the requested id/mandator exists

clearTree

void clearTree(long mandatorId)
               throws FxNoAccessException
Remove all tree nodes that belong to the requested mandator

Parameters:
mandatorId - requested mandator
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator

clearTree

void clearTree(FxPhraseCategorySelection categories,
               long mandatorId)
               throws FxNoAccessException
Remove all tree nodes that belong to the requested mandator and match selected categories

Parameters:
categories - categories to remove
mandatorId - requested mandator
Throws:
FxNoAccessException - if the requested mandator is not the callers mandator

assignPhrase

void assignPhrase(long assignmentOwner,
                  long nodeId,
                  long nodeMandator,
                  long phraseId,
                  long phraseMandator,
                  long pos,
                  boolean checkPositioning)
                  throws FxNotFoundException,
                         FxNoAccessException
Assign a phrase to a node. If the assignment already exists, the position is updated if needed

Parameters:
assignmentOwner - mandator which is the "owner" of this assignment
nodeId - node id
nodeMandator - node mandator
phraseId - phrase id
phraseMandator - phrase mandator
pos - position
checkPositioning - insert at the given position moving other nodes or just write the position without any moving around
Throws:
FxNoAccessException - if the requested assignmentOwner is not the callers mandator
FxNotFoundException - if either the node or phrase were not found

assignPhrase

void assignPhrase(long assignmentOwner,
                  long nodeId,
                  long nodeMandator,
                  java.lang.String phraseKey,
                  long phraseMandator,
                  long pos,
                  boolean checkPositioning)
                  throws FxNotFoundException,
                         FxNoAccessException
Assign a phrase to a node. If the assignment already exists, the position is updated if needed

Parameters:
assignmentOwner - mandator which is the "owner" of this assignment
nodeId - node id
nodeMandator - node mandator
phraseKey - phrase key
phraseMandator - phrase mandator
pos - position
checkPositioning - insert at the given position moving other nodes or just write the position without any moving around
Throws:
FxNoAccessException - if the requested assignmentOwner is not the callers mandator
FxNotFoundException - if either the node or phrase were not found

assignPhrases

void assignPhrases(long position,
                   long assignmentOwner,
                   long nodeId,
                   long nodeMandator,
                   FxPhrase[] phrases)
                   throws FxApplicationException
Assign phrases at a given position to a node

Parameters:
position - requested position
assignmentOwner - mandator which is the "owner" of this assignment
nodeId - node id
nodeMandator - node mandator
phrases - phrases to assign
Throws:
FxApplicationException - on errors

moveTreeNodeAssignment

void moveTreeNodeAssignment(long assignmentOwner,
                            long nodeId,
                            long nodeMandatorId,
                            long phraseId,
                            long phraseMandator,
                            int delta)
                            throws FxNotFoundException,
                                   FxNoAccessException
"Move" the position of an assignment

Parameters:
assignmentOwner - mandator which is the "owner" of this assignment
nodeId - node id
nodeMandatorId - node mandator
phraseId - phrase id
phraseMandator - phrase mandator
delta - delta to move
Throws:
FxNoAccessException - if the requested assignmentOwner is not the callers mandator
FxNotFoundException - if either the node or phrase were not found

moveTreeNodeAssignment

void moveTreeNodeAssignment(int category,
                            long assignmentOwner,
                            long nodeId,
                            long nodeMandatorId,
                            long phraseId,
                            long phraseMandator,
                            int delta)
                            throws FxNotFoundException,
                                   FxNoAccessException
"Move" the position of an assignment

Parameters:
category - phrase category
assignmentOwner - mandator which is the "owner" of this assignment
nodeId - node id
nodeMandatorId - node mandator
phraseId - phrase id
phraseMandator - phrase mandator
delta - delta to move
Throws:
FxNoAccessException - if the requested assignmentOwner is not the callers mandator
FxNotFoundException - if either the node or phrase were not found

removePhraseAssignment

boolean removePhraseAssignment(long assignmentOwner,
                               long nodeId,
                               long nodeMandator,
                               long phraseId,
                               long phraseMandator)
                               throws FxNotFoundException,
                                      FxNoAccessException
Remove an assign of a phrase from a node.

Parameters:
assignmentOwner - mandator which is the "owner" of this assignment
nodeId - node id
nodeMandator - node mandator
phraseId - phrase id
phraseMandator - phrase mandator
Returns:
if an assignment was found that could be removed
Throws:
FxNoAccessException - if the requested assignmentOwner is not the callers mandator
FxNotFoundException - if either the node or phrase were not found

removePhraseAssignment

boolean removePhraseAssignment(int category,
                               long assignmentOwner,
                               long nodeId,
                               long nodeMandator,
                               long phraseId,
                               long phraseMandator)
                               throws FxNotFoundException,
                                      FxNoAccessException
Remove an assign of a phrase from a node.

Parameters:
category - phrase category
assignmentOwner - mandator which is the "owner" of this assignment
nodeId - node id
nodeMandator - node mandator
phraseId - phrase id
phraseMandator - phrase mandator
Returns:
if an assignment was found that could be removed
Throws:
FxNoAccessException - if the requested assignmentOwner is not the callers mandator
FxNotFoundException - if either the node or phrase were not found

removeAssignmentsFromNode

void removeAssignmentsFromNode(long nodeId,
                               long nodeMandator)
Remove all phrase assignments from a node. If the calling user is the owner of the node, all assignments will be removed, if not only the phrases assigned by the calling users mandator

Parameters:
nodeId - node id
nodeMandator - node mandator id

removeAssignmentsFromNode

void removeAssignmentsFromNode(int category,
                               long nodeId,
                               long nodeMandator)
Remove all phrase assignments from a node. If the calling user is the owner of the node, all assignments will be removed, if not only the phrases assigned by the calling users mandator

Parameters:
category - phrase category
nodeId - node id
nodeMandator - node mandator id

getAssignedNodes

java.util.List<FxPhraseTreeNodePosition> getAssignedNodes(java.lang.String phraseKey,
                                                          long... mandator)
Get all assignments for a phrase. Returned FxPhraseTreeNode's will not be populated with children!

Parameters:
phraseKey - phrase key
mandator - assignment owner mandators
Returns:
assigned node (without children!) and the position of the phrase

getAssignedNodes

java.util.List<FxPhraseTreeNodePosition> getAssignedNodes(int category,
                                                          java.lang.String phraseKey,
                                                          long... mandator)
Get all assignments for a phrase. Returned FxPhraseTreeNode's will not be populated with children!

Parameters:
category - phrase category
phraseKey - phrase key
mandator - assignment owner mandators
Returns:
assigned node (without children!) and the position of the phrase

getAssignedNodes

java.util.List<FxPhraseTreeNodePosition> getAssignedNodes(long phraseId,
                                                          long phraseMandator,
                                                          long... mandator)
Get all assignments for a phrase. Returned FxPhraseTreeNode's will not be populated with children!

Parameters:
phraseId - phrase Id
phraseMandator - phrase mandator id
mandator - assignment owner mandators
Returns:
assigned node (without children!) and the position of the phrase

search

FxPhraseQueryResult search(FxPhraseQuery query)
Execute the requested query, returning all results in one page

Parameters:
query - query
Returns:
FxPhraseQueryResult

search

FxPhraseQueryResult search(FxPhraseQuery query,
                           int page,
                           int pageSize)
Execute the requested query with paging

Parameters:
query - query
page - the page to return
pageSize - number of entries per page
Returns:
FxPhraseQueryResult

syncDivisionResources

void syncDivisionResources(long targetMandator,
                           FxPhraseSearchValueConverter converter)
                           throws FxApplicationException
Clear all phrases for the targetMandator and copy the division resources as phrases (using the targetMandator as owner)

Parameters:
targetMandator - mandator to use for the phrases
converter - converter for search values
Throws:
FxApplicationException - on errors
FxNoAccessException - if not run as global supervisor or member of the mandator