public class EmbeddedFunctions extends Object
| Constructor and Description |
|---|
EmbeddedFunctions() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isAccessAllowed(Connection conn,
Serializable id,
Set<String> principals,
Set<String> permissions)
Checks if access to a document is allowed.
|
static boolean |
isAccessAllowed(Serializable id,
Set<String> principals,
Set<String> permissions)
Checks if access to a document is allowed.
|
static boolean |
isInTree(Connection conn,
Serializable id,
Serializable baseId)
Checks if an id is a (strict) descendant of a given base id.
|
static boolean |
isInTree(Serializable id,
Serializable baseId)
Checks if an id is a (strict) descendant of a given base id.
|
protected static boolean |
matchesFullText(String fulltext,
String query)
Checks if the passed query expression matches the fulltext.
|
protected static Set<String> |
parseFullText(String string) |
static String |
parseFullText(String string1,
String string2)
Extracts the words from a string for simple fulltext indexing.
|
static String |
parseWord(String string) |
static Set<String> |
split(String string) |
static Set<String> |
split(String string,
char sep) |
public EmbeddedFunctions()
public static boolean isInTree(Serializable id, Serializable baseId) throws SQLException
id - the id to check forbaseId - the base idSQLExceptionpublic static boolean isInTree(Connection conn, Serializable id, Serializable baseId) throws SQLException
conn - the connection to the databaseid - the id to check forbaseId - the base idSQLExceptionpublic static boolean isAccessAllowed(Serializable id, Set<String> principals, Set<String> permissions) throws SQLException
This implements in SQL the ACL-based security policy logic.
id - the id of the documentprincipals - the allowed identitiespermissions - the allowed permissionsSQLExceptionpublic static boolean isAccessAllowed(Connection conn, Serializable id, Set<String> principals, Set<String> permissions) throws SQLException
This implements in SQL the ACL-based security policy logic.
conn - the database connectionid - the id of the documentprincipals - the allowed identitiespermissions - the allowed permissionsSQLExceptionpublic static String parseFullText(String string1, String string2)
string1 - the first stringstring2 - the second stringprotected static Set<String> parseFullText(String string)
protected static boolean matchesFullText(String fulltext, String query)
fulltext - the fulltext, space-separated wordsquery - a list of space-separated wordstrue if all the words are in the fulltextCopyright © 2016 Nuxeo SA. All rights reserved.