Class EmbeddedFunctions
java.lang.Object
org.nuxeo.ecm.core.storage.sql.db.EmbeddedFunctions
- Direct Known Subclasses:
H2Functions
Functions used as stored procedures for H2.
- Author:
- Florent Guillaume
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static Boolean
getAccess
(PreparedStatement psAcl, Serializable id, Set<String> principals, Set<String> permissions, boolean replaceReadVersionPermission) protected static EmbeddedFunctions.RowInfo
getRowInfo
(PreparedStatement psHier, PreparedStatement psVer, Serializable id) static boolean
isAccessAllowed
(Serializable id, Set<String> principals, Set<String> permissions) Deprecated.since 11.3, unusedstatic boolean
isAccessAllowed
(Connection conn, Serializable id, Set<String> principals, Set<String> permissions) Deprecated.since 11.3, use other signaturestatic boolean
isAccessAllowed
(Connection conn, Serializable id, Set<String> principals, Set<String> permissions, boolean disableVersionACL, boolean disableReadVersionPermission) Checks if access to a document is allowed.static boolean
isInTree
(Serializable id, Serializable baseId) Checks if an id is a (strict) descendant of a given base id.static boolean
isInTree
(Connection conn, 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) Deprecated.unusedparseFullText
(String string) Deprecated.unusedstatic String
parseFullText
(String string1, String string2) Deprecated.unusedstatic final String
Deprecated.unused
-
Field Details
-
READ
- See Also:
-
READ_VERSION
- See Also:
-
-
Constructor Details
-
EmbeddedFunctions
public EmbeddedFunctions()
-
-
Method Details
-
isInTree
Checks if an id is a (strict) descendant of a given base id.- Parameters:
id
- the id to check forbaseId
- the base id- Throws:
SQLException
-
isInTree
public static boolean isInTree(Connection conn, Serializable id, Serializable baseId) throws SQLException Checks if an id is a (strict) descendant of a given base id.- Parameters:
conn
- the connection to the databaseid
- the id to check forbaseId
- the base id- Throws:
SQLException
-
isAccessAllowed
@Deprecated public static boolean isAccessAllowed(Serializable id, Set<String> principals, Set<String> permissions) throws SQLException Deprecated.since 11.3, unusedChecks if access to a document is allowed.This implements in SQL the ACL-based security policy logic.
- Parameters:
id
- the id of the documentprincipals
- the allowed identitiespermissions
- the allowed permissions- Throws:
SQLException
-
isAccessAllowed
@Deprecated public static boolean isAccessAllowed(Connection conn, Serializable id, Set<String> principals, Set<String> permissions) throws SQLException Deprecated.since 11.3, use other signature- Throws:
SQLException
-
isAccessAllowed
public static boolean isAccessAllowed(Connection conn, Serializable id, Set<String> principals, Set<String> permissions, boolean disableVersionACL, boolean disableReadVersionPermission) throws SQLException Checks if access to a document is allowed.This implements in SQL the ACL-based security policy logic.
- Parameters:
conn
- the database connectionid
- the id of the documentprincipals
- the allowed identitiespermissions
- the allowed permissionsdisableVersionACL
- whether ACLs on a version are disableddisableReadVersionPermission
- whether the ReadVersion permission is disabled- Throws:
SQLException
- Since:
- 11.3
-
getRowInfo
protected static EmbeddedFunctions.RowInfo getRowInfo(PreparedStatement psHier, PreparedStatement psVer, Serializable id) throws SQLException - Throws:
SQLException
-
getAccess
protected static Boolean getAccess(PreparedStatement psAcl, Serializable id, Set<String> principals, Set<String> permissions, boolean replaceReadVersionPermission) throws SQLException - Throws:
SQLException
-
parseFullText
Deprecated.unusedExtracts the words from a string for simple fulltext indexing.- Parameters:
string1
- the first stringstring2
- the second string- Returns:
- a string with extracted words
-
parseFullText
Deprecated.unused -
matchesFullText
Deprecated.unusedChecks if the passed query expression matches the fulltext.- Parameters:
fulltext
- the fulltext, space-separated wordsquery
- a list of space-separated words- Returns:
true
if all the words are in the fulltext
-
parseWord
Deprecated.unused -
split
-
split
-