repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/misc/MatchResult.java | MatchResult.getRemainder | public QPath getRemainder()
{
if (matchPos + matchLength >= pathLength)
{
return null;
}
else
{
try
{
throw new RepositoryException("Not implemented");
//return path.subPath(matchPos + matchLength, pathLength);
}
catch... | java | public QPath getRemainder()
{
if (matchPos + matchLength >= pathLength)
{
return null;
}
else
{
try
{
throw new RepositoryException("Not implemented");
//return path.subPath(matchPos + matchLength, pathLength);
}
catch... | [
"public",
"QPath",
"getRemainder",
"(",
")",
"{",
"if",
"(",
"matchPos",
"+",
"matchLength",
">=",
"pathLength",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"try",
"{",
"throw",
"new",
"RepositoryException",
"(",
"\"Not implemented\"",
")",
";",
"//... | Returns the remaining path after the matching part.
@return The remaining path after the matching part such that the path constructed from
{@link #getMatch()} followed by {@link #getRemainder()} is the original path or
<code>null</code> if {@link #isFullMatch()} is <code>true</code>. | [
"Returns",
"the",
"remaining",
"path",
"after",
"the",
"matching",
"part",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/misc/MatchResult.java#L54-L72 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MatchAllScorer.java | MatchAllScorer.calculateDocFilter | private void calculateDocFilter() throws IOException
{
PerQueryCache cache = PerQueryCache.getInstance();
@SuppressWarnings("unchecked")
Map<String, BitSet> readerCache =
(Map<String, BitSet>)cache.get(MatchAllScorer.class, reader);
if (readerCache == null)
{
re... | java | private void calculateDocFilter() throws IOException
{
PerQueryCache cache = PerQueryCache.getInstance();
@SuppressWarnings("unchecked")
Map<String, BitSet> readerCache =
(Map<String, BitSet>)cache.get(MatchAllScorer.class, reader);
if (readerCache == null)
{
re... | [
"private",
"void",
"calculateDocFilter",
"(",
")",
"throws",
"IOException",
"{",
"PerQueryCache",
"cache",
"=",
"PerQueryCache",
".",
"getInstance",
"(",
")",
";",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Map",
"<",
"String",
",",
"BitSet",
">",
"r... | Calculates a BitSet filter that includes all the nodes
that have content in properties according to the field name
passed in the constructor of this MatchAllScorer.
@throws IOException if an error occurs while reading from
the search index. | [
"Calculates",
"a",
"BitSet",
"filter",
"that",
"includes",
"all",
"the",
"nodes",
"that",
"have",
"content",
"in",
"properties",
"according",
"to",
"the",
"field",
"name",
"passed",
"in",
"the",
"constructor",
"of",
"this",
"MatchAllScorer",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MatchAllScorer.java#L148-L201 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/synonym/SynonymMap.java | SynonymMap.getSynonyms | public String[] getSynonyms(String word) {
String[] synonyms = table.get(word);
if (synonyms == null) return EMPTY;
String[] copy = new String[synonyms.length]; // copy for guaranteed immutability
System.arraycopy(synonyms, 0, copy, 0, synonyms.length);
return copy;
} | java | public String[] getSynonyms(String word) {
String[] synonyms = table.get(word);
if (synonyms == null) return EMPTY;
String[] copy = new String[synonyms.length]; // copy for guaranteed immutability
System.arraycopy(synonyms, 0, copy, 0, synonyms.length);
return copy;
} | [
"public",
"String",
"[",
"]",
"getSynonyms",
"(",
"String",
"word",
")",
"{",
"String",
"[",
"]",
"synonyms",
"=",
"table",
".",
"get",
"(",
"word",
")",
";",
"if",
"(",
"synonyms",
"==",
"null",
")",
"return",
"EMPTY",
";",
"String",
"[",
"]",
"co... | Returns the synonym set for the given word, sorted ascending.
@param word
the word to lookup (must be in lowercase).
@return the synonyms; a set of zero or more words, sorted ascending, each
word containing lowercase characters that satisfy
<code>Character.isLetter()</code>. | [
"Returns",
"the",
"synonym",
"set",
"for",
"the",
"given",
"word",
"sorted",
"ascending",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/synonym/SynonymMap.java#L119-L125 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropertyWriteUtil.java | PropertyWriteUtil.writePropStats | public static void writePropStats(XMLStreamWriter xmlStreamWriter,
Map<String, Set<HierarchicalProperty>> propStatuses) throws XMLStreamException
{
for (Map.Entry<String, Set<HierarchicalProperty>> stat : propStatuses.entrySet())
{
xmlStreamWriter.writeStartElement("DAV:", "propstat")... | java | public static void writePropStats(XMLStreamWriter xmlStreamWriter,
Map<String, Set<HierarchicalProperty>> propStatuses) throws XMLStreamException
{
for (Map.Entry<String, Set<HierarchicalProperty>> stat : propStatuses.entrySet())
{
xmlStreamWriter.writeStartElement("DAV:", "propstat")... | [
"public",
"static",
"void",
"writePropStats",
"(",
"XMLStreamWriter",
"xmlStreamWriter",
",",
"Map",
"<",
"String",
",",
"Set",
"<",
"HierarchicalProperty",
">",
">",
"propStatuses",
")",
"throws",
"XMLStreamException",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",... | Writes the statuses of properties into XML.
@param xmlStreamWriter XML writer
@param propStatuses properties statuses
@throws XMLStreamException {@link XMLStreamException} | [
"Writes",
"the",
"statuses",
"of",
"properties",
"into",
"XML",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropertyWriteUtil.java#L49-L70 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropertyWriteUtil.java | PropertyWriteUtil.writeProperty | public static void writeProperty(XMLStreamWriter xmlStreamWriter, HierarchicalProperty prop)
throws XMLStreamException
{
String uri = prop.getName().getNamespaceURI();
String prefix = xmlStreamWriter.getNamespaceContext().getPrefix(uri);
if (prefix == null)
{
prefix ... | java | public static void writeProperty(XMLStreamWriter xmlStreamWriter, HierarchicalProperty prop)
throws XMLStreamException
{
String uri = prop.getName().getNamespaceURI();
String prefix = xmlStreamWriter.getNamespaceContext().getPrefix(uri);
if (prefix == null)
{
prefix ... | [
"public",
"static",
"void",
"writeProperty",
"(",
"XMLStreamWriter",
"xmlStreamWriter",
",",
"HierarchicalProperty",
"prop",
")",
"throws",
"XMLStreamException",
"{",
"String",
"uri",
"=",
"prop",
".",
"getName",
"(",
")",
".",
"getNamespaceURI",
"(",
")",
";",
... | Writes the statuses of property into XML.
@param xmlStreamWriter XML writer
@param prop property
@throws XMLStreamException {@link XMLStreamException} | [
"Writes",
"the",
"statuses",
"of",
"property",
"into",
"XML",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropertyWriteUtil.java#L79-L139 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropertyWriteUtil.java | PropertyWriteUtil.writeAttributes | public static void writeAttributes(XMLStreamWriter xmlStreamWriter, HierarchicalProperty property)
throws XMLStreamException
{
Map<String, String> attributes = property.getAttributes();
Iterator<String> keyIter = attributes.keySet().iterator();
while (keyIter.hasNext())
{
... | java | public static void writeAttributes(XMLStreamWriter xmlStreamWriter, HierarchicalProperty property)
throws XMLStreamException
{
Map<String, String> attributes = property.getAttributes();
Iterator<String> keyIter = attributes.keySet().iterator();
while (keyIter.hasNext())
{
... | [
"public",
"static",
"void",
"writeAttributes",
"(",
"XMLStreamWriter",
"xmlStreamWriter",
",",
"HierarchicalProperty",
"property",
")",
"throws",
"XMLStreamException",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"attributes",
"=",
"property",
".",
"getAttributes",
... | Writes property attributes into XML.
@param xmlStreamWriter XML writer
@param property property
@throws XMLStreamException {@link XMLStreamException} | [
"Writes",
"property",
"attributes",
"into",
"XML",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropertyWriteUtil.java#L148-L159 | train |
exoplatform/jcr | applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/ClientTransportImpl.java | ClientTransportImpl.getRealm | private String getRealm(String sUrl) throws IOException, ModuleException
{
AuthorizationHandler ah = AuthorizationInfo.getAuthHandler();
try
{
URL url = new URL(sUrl);
HTTPConnection connection = new HTTPConnection(url);
connection.removeModule(CookieModule.cla... | java | private String getRealm(String sUrl) throws IOException, ModuleException
{
AuthorizationHandler ah = AuthorizationInfo.getAuthHandler();
try
{
URL url = new URL(sUrl);
HTTPConnection connection = new HTTPConnection(url);
connection.removeModule(CookieModule.cla... | [
"private",
"String",
"getRealm",
"(",
"String",
"sUrl",
")",
"throws",
"IOException",
",",
"ModuleException",
"{",
"AuthorizationHandler",
"ah",
"=",
"AuthorizationInfo",
".",
"getAuthHandler",
"(",
")",
";",
"try",
"{",
"URL",
"url",
"=",
"new",
"URL",
"(",
... | Get realm by URL.
@param sUrl URL string.
@return realm name or null.
@throws IOException transport exception.
@throws ModuleException ModuleException. | [
"Get",
"realm",
"by",
"URL",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/ClientTransportImpl.java#L109-L139 | train |
exoplatform/jcr | exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/artifact/CRCGenerator.java | CRCGenerator.getChecksum | public static String getChecksum(InputStream in, String algo) throws NoSuchAlgorithmException,
IOException {
MessageDigest md = MessageDigest.getInstance(algo);
DigestInputStream digestInputStream = new DigestInputStream(in, md);
digestInputSt... | java | public static String getChecksum(InputStream in, String algo) throws NoSuchAlgorithmException,
IOException {
MessageDigest md = MessageDigest.getInstance(algo);
DigestInputStream digestInputStream = new DigestInputStream(in, md);
digestInputSt... | [
"public",
"static",
"String",
"getChecksum",
"(",
"InputStream",
"in",
",",
"String",
"algo",
")",
"throws",
"NoSuchAlgorithmException",
",",
"IOException",
"{",
"MessageDigest",
"md",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"algo",
")",
";",
"DigestInputSt... | Generates checksum for the InputStream.
@param in
stream to generate CheckSum
@param algo
algorithm name according to the
{@literal
<a href= "http://java.sun.com/j2se/1.4.2/docs/guide/security/CryptoSpec.html#AppA">
Java Cryptography Architecture API Specification & Reference
</a>
}
@return hexadecimal string checksun... | [
"Generates",
"checksum",
"for",
"the",
"InputStream",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/artifact/CRCGenerator.java#L52-L66 | train |
exoplatform/jcr | exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/artifact/CRCGenerator.java | CRCGenerator.generateString | private static String generateString(byte[] bytes) {
StringBuffer sb = new StringBuffer();
for (byte b : bytes) {
int v = b & 0xFF;
sb.append((char) HEX.charAt(v >> 4));
sb.append((char) HEX.charAt(v & 0x0f));
}
return sb.toString();
} | java | private static String generateString(byte[] bytes) {
StringBuffer sb = new StringBuffer();
for (byte b : bytes) {
int v = b & 0xFF;
sb.append((char) HEX.charAt(v >> 4));
sb.append((char) HEX.charAt(v & 0x0f));
}
return sb.toString();
} | [
"private",
"static",
"String",
"generateString",
"(",
"byte",
"[",
"]",
"bytes",
")",
"{",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"for",
"(",
"byte",
"b",
":",
"bytes",
")",
"{",
"int",
"v",
"=",
"b",
"&",
"0xFF",
";",
"sb... | Converts the array of bytes into a HEX string.
@param bytes
byte array
@return HEX string | [
"Converts",
"the",
"array",
"of",
"bytes",
"into",
"a",
"HEX",
"string",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/artifact/CRCGenerator.java#L75-L88 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java | DBCleanService.cleanWorkspaceData | public static void cleanWorkspaceData(WorkspaceEntry wsEntry) throws DBCleanException
{
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
Connection jdbcConn = getConnection(wsEntry);
String dialect = resolveDialect(jdbcConn, wsEntry);
boole... | java | public static void cleanWorkspaceData(WorkspaceEntry wsEntry) throws DBCleanException
{
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
Connection jdbcConn = getConnection(wsEntry);
String dialect = resolveDialect(jdbcConn, wsEntry);
boole... | [
"public",
"static",
"void",
"cleanWorkspaceData",
"(",
"WorkspaceEntry",
"wsEntry",
")",
"throws",
"DBCleanException",
"{",
"SecurityHelper",
".",
"validateSecurityPermission",
"(",
"JCRRuntimePermissions",
".",
"MANAGE_REPOSITORY_PERMISSION",
")",
";",
"Connection",
"jdbcC... | Cleans workspace data from database.
@param wsEntry
workspace configuration
@throws DBCleanException | [
"Cleans",
"workspace",
"data",
"from",
"database",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java#L64-L94 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java | DBCleanService.cleanRepositoryData | public static void cleanRepositoryData(RepositoryEntry rEntry) throws DBCleanException
{
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
WorkspaceEntry wsEntry = rEntry.getWorkspaceEntries().get(0);
boolean multiDB = getMultiDbParameter(wsEntry... | java | public static void cleanRepositoryData(RepositoryEntry rEntry) throws DBCleanException
{
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
WorkspaceEntry wsEntry = rEntry.getWorkspaceEntries().get(0);
boolean multiDB = getMultiDbParameter(wsEntry... | [
"public",
"static",
"void",
"cleanRepositoryData",
"(",
"RepositoryEntry",
"rEntry",
")",
"throws",
"DBCleanException",
"{",
"SecurityHelper",
".",
"validateSecurityPermission",
"(",
"JCRRuntimePermissions",
".",
"MANAGE_REPOSITORY_PERMISSION",
")",
";",
"WorkspaceEntry",
"... | Cleans repository data from database.
@param rEntry
the repository configuration
@throws DBCleanException | [
"Cleans",
"repository",
"data",
"from",
"database",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java#L103-L146 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java | DBCleanService.getRepositoryDBCleaner | public static DBCleanerTool getRepositoryDBCleaner(Connection jdbcConn, RepositoryEntry rEntry)
throws DBCleanException
{
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
WorkspaceEntry wsEntry = rEntry.getWorkspaceEntries().get(0);
boole... | java | public static DBCleanerTool getRepositoryDBCleaner(Connection jdbcConn, RepositoryEntry rEntry)
throws DBCleanException
{
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
WorkspaceEntry wsEntry = rEntry.getWorkspaceEntries().get(0);
boole... | [
"public",
"static",
"DBCleanerTool",
"getRepositoryDBCleaner",
"(",
"Connection",
"jdbcConn",
",",
"RepositoryEntry",
"rEntry",
")",
"throws",
"DBCleanException",
"{",
"SecurityHelper",
".",
"validateSecurityPermission",
"(",
"JCRRuntimePermissions",
".",
"MANAGE_REPOSITORY_P... | Returns database cleaner for repository.
@param jdbcConn
database connection which need to use
@param rEntry
repository configuration
@return DBCleanerTool
@throws DBCleanException | [
"Returns",
"database",
"cleaner",
"for",
"repository",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java#L158-L179 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java | DBCleanService.getWorkspaceDBCleaner | public static DBCleanerTool getWorkspaceDBCleaner(Connection jdbcConn, WorkspaceEntry wsEntry) throws DBCleanException
{
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
String dialect = resolveDialect(jdbcConn, wsEntry);
boolean autoCommit = dial... | java | public static DBCleanerTool getWorkspaceDBCleaner(Connection jdbcConn, WorkspaceEntry wsEntry) throws DBCleanException
{
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
String dialect = resolveDialect(jdbcConn, wsEntry);
boolean autoCommit = dial... | [
"public",
"static",
"DBCleanerTool",
"getWorkspaceDBCleaner",
"(",
"Connection",
"jdbcConn",
",",
"WorkspaceEntry",
"wsEntry",
")",
"throws",
"DBCleanException",
"{",
"SecurityHelper",
".",
"validateSecurityPermission",
"(",
"JCRRuntimePermissions",
".",
"MANAGE_REPOSITORY_PE... | Returns database cleaner for workspace.
@param jdbcConn
database connection which need to use
@param wsEntry
workspace configuration
@return DBCleanerTool
@throws DBCleanException | [
"Returns",
"database",
"cleaner",
"for",
"workspace",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java#L191-L202 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java | DBCleanService.getConnection | private static Connection getConnection(WorkspaceEntry wsEntry) throws DBCleanException
{
String dsName = getSourceNameParameter(wsEntry);
DataSource ds;
try
{
ds = (DataSource)new InitialContext().lookup(dsName);
}
catch (NamingException e)
{
t... | java | private static Connection getConnection(WorkspaceEntry wsEntry) throws DBCleanException
{
String dsName = getSourceNameParameter(wsEntry);
DataSource ds;
try
{
ds = (DataSource)new InitialContext().lookup(dsName);
}
catch (NamingException e)
{
t... | [
"private",
"static",
"Connection",
"getConnection",
"(",
"WorkspaceEntry",
"wsEntry",
")",
"throws",
"DBCleanException",
"{",
"String",
"dsName",
"=",
"getSourceNameParameter",
"(",
"wsEntry",
")",
";",
"DataSource",
"ds",
";",
"try",
"{",
"ds",
"=",
"(",
"DataS... | Opens connection to database underlying a workspace. | [
"Opens",
"connection",
"to",
"database",
"underlying",
"a",
"workspace",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java#L232-L270 | train |
exoplatform/jcr | exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/distribution/impl/DataDistributionByHash.java | DataDistributionByHash.hash | private String hash(String dataId)
{
try
{
MessageDigest digest = MessageDigest.getInstance(hashAlgorithm);
digest.update(dataId.getBytes("UTF-8"));
return new BigInteger(1, digest.digest()).toString(32);
}
catch (NumberFormatException e)
{
throw new ... | java | private String hash(String dataId)
{
try
{
MessageDigest digest = MessageDigest.getInstance(hashAlgorithm);
digest.update(dataId.getBytes("UTF-8"));
return new BigInteger(1, digest.digest()).toString(32);
}
catch (NumberFormatException e)
{
throw new ... | [
"private",
"String",
"hash",
"(",
"String",
"dataId",
")",
"{",
"try",
"{",
"MessageDigest",
"digest",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"hashAlgorithm",
")",
";",
"digest",
".",
"update",
"(",
"dataId",
".",
"getBytes",
"(",
"\"UTF-8\"",
")",
... | Gives the hash code of the given data id
@param dataId The id of the data to hash
@return The hash code of the value of the given data id in base 32 | [
"Gives",
"the",
"hash",
"code",
"of",
"the",
"given",
"data",
"id"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/distribution/impl/DataDistributionByHash.java#L74-L97 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/itemfilters/AbstractNamePatternFilter.java | AbstractNamePatternFilter.parsePatternQPathEntry | private QPathEntry parsePatternQPathEntry(String namePattern, SessionImpl session) throws RepositoryException
{
int colonIndex = namePattern.indexOf(':');
int bracketIndex = namePattern.lastIndexOf('[');
String namespaceURI;
String localName;
int index = getDefaultIndex();
... | java | private QPathEntry parsePatternQPathEntry(String namePattern, SessionImpl session) throws RepositoryException
{
int colonIndex = namePattern.indexOf(':');
int bracketIndex = namePattern.lastIndexOf('[');
String namespaceURI;
String localName;
int index = getDefaultIndex();
... | [
"private",
"QPathEntry",
"parsePatternQPathEntry",
"(",
"String",
"namePattern",
",",
"SessionImpl",
"session",
")",
"throws",
"RepositoryException",
"{",
"int",
"colonIndex",
"=",
"namePattern",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"int",
"bracketIndex",
"=",... | Parse QPathEntry from string namePattern. NamePattern may contain wildcard symbols in
namespace and local name. And may not contain index, which means look all samename siblings.
So ordinary QPathEntry parser is not acceptable.
@param namePattern string pattern
@param session session used to fetch namespace URI
@retur... | [
"Parse",
"QPathEntry",
"from",
"string",
"namePattern",
".",
"NamePattern",
"may",
"contain",
"wildcard",
"symbols",
"in",
"namespace",
"and",
"local",
"name",
".",
"And",
"may",
"not",
"contain",
"index",
"which",
"means",
"look",
"all",
"samename",
"siblings",... | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/itemfilters/AbstractNamePatternFilter.java#L293-L333 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ApplyPersistedChangesTask.java | ApplyPersistedChangesTask.accumulatePersistedNodesChanges | protected void accumulatePersistedNodesChanges(Map<String, Long> calculatedChangedNodesSize)
throws QuotaManagerException
{
for (Entry<String, Long> entry : calculatedChangedNodesSize.entrySet())
{
String nodePath = entry.getKey();
long delta = entry.getValue();
try
... | java | protected void accumulatePersistedNodesChanges(Map<String, Long> calculatedChangedNodesSize)
throws QuotaManagerException
{
for (Entry<String, Long> entry : calculatedChangedNodesSize.entrySet())
{
String nodePath = entry.getKey();
long delta = entry.getValue();
try
... | [
"protected",
"void",
"accumulatePersistedNodesChanges",
"(",
"Map",
"<",
"String",
",",
"Long",
">",
"calculatedChangedNodesSize",
")",
"throws",
"QuotaManagerException",
"{",
"for",
"(",
"Entry",
"<",
"String",
",",
"Long",
">",
"entry",
":",
"calculatedChangedNode... | Update nodes data size. | [
"Update",
"nodes",
"data",
"size",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ApplyPersistedChangesTask.java#L133-L151 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ApplyPersistedChangesTask.java | ApplyPersistedChangesTask.accumulatePersistedWorkspaceChanges | protected void accumulatePersistedWorkspaceChanges(long delta) throws QuotaManagerException
{
long dataSize = 0;
try
{
dataSize = quotaPersister.getWorkspaceDataSize(rName, wsName);
}
catch (UnknownDataSizeException e)
{
if (LOG.isTraceEnabled())
{
... | java | protected void accumulatePersistedWorkspaceChanges(long delta) throws QuotaManagerException
{
long dataSize = 0;
try
{
dataSize = quotaPersister.getWorkspaceDataSize(rName, wsName);
}
catch (UnknownDataSizeException e)
{
if (LOG.isTraceEnabled())
{
... | [
"protected",
"void",
"accumulatePersistedWorkspaceChanges",
"(",
"long",
"delta",
")",
"throws",
"QuotaManagerException",
"{",
"long",
"dataSize",
"=",
"0",
";",
"try",
"{",
"dataSize",
"=",
"quotaPersister",
".",
"getWorkspaceDataSize",
"(",
"rName",
",",
"wsName",... | Update workspace data size. | [
"Update",
"workspace",
"data",
"size",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ApplyPersistedChangesTask.java#L156-L173 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ApplyPersistedChangesTask.java | ApplyPersistedChangesTask.accumulatePersistedRepositoryChanges | protected void accumulatePersistedRepositoryChanges(long delta)
{
long dataSize = 0;
try
{
dataSize = quotaPersister.getRepositoryDataSize(rName);
}
catch (UnknownDataSizeException e)
{
if (LOG.isTraceEnabled())
{
LOG.trace(e.getMessage(), e)... | java | protected void accumulatePersistedRepositoryChanges(long delta)
{
long dataSize = 0;
try
{
dataSize = quotaPersister.getRepositoryDataSize(rName);
}
catch (UnknownDataSizeException e)
{
if (LOG.isTraceEnabled())
{
LOG.trace(e.getMessage(), e)... | [
"protected",
"void",
"accumulatePersistedRepositoryChanges",
"(",
"long",
"delta",
")",
"{",
"long",
"dataSize",
"=",
"0",
";",
"try",
"{",
"dataSize",
"=",
"quotaPersister",
".",
"getRepositoryDataSize",
"(",
"rName",
")",
";",
"}",
"catch",
"(",
"UnknownDataSi... | Update repository data size. | [
"Update",
"repository",
"data",
"size",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ApplyPersistedChangesTask.java#L178-L195 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ApplyPersistedChangesTask.java | ApplyPersistedChangesTask.accumulatePersistedGlobalChanges | private void accumulatePersistedGlobalChanges(long delta)
{
long dataSize = 0;
try
{
dataSize = quotaPersister.getGlobalDataSize();
}
catch (UnknownDataSizeException e)
{
if (LOG.isTraceEnabled())
{
LOG.trace(e.getMessage(), e);
}
... | java | private void accumulatePersistedGlobalChanges(long delta)
{
long dataSize = 0;
try
{
dataSize = quotaPersister.getGlobalDataSize();
}
catch (UnknownDataSizeException e)
{
if (LOG.isTraceEnabled())
{
LOG.trace(e.getMessage(), e);
}
... | [
"private",
"void",
"accumulatePersistedGlobalChanges",
"(",
"long",
"delta",
")",
"{",
"long",
"dataSize",
"=",
"0",
";",
"try",
"{",
"dataSize",
"=",
"quotaPersister",
".",
"getGlobalDataSize",
"(",
")",
";",
"}",
"catch",
"(",
"UnknownDataSizeException",
"e",
... | Update global data size. | [
"Update",
"global",
"data",
"size",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ApplyPersistedChangesTask.java#L200-L217 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java | ItemImpl.parent | protected NodeImpl parent(final boolean pool) throws RepositoryException
{
NodeImpl parent = (NodeImpl)dataManager.getItemByIdentifier(getParentIdentifier(), pool);
if (parent == null)
{
throw new ItemNotFoundException("FATAL: Parent is null for " + getPath() + " parent UUID: "
... | java | protected NodeImpl parent(final boolean pool) throws RepositoryException
{
NodeImpl parent = (NodeImpl)dataManager.getItemByIdentifier(getParentIdentifier(), pool);
if (parent == null)
{
throw new ItemNotFoundException("FATAL: Parent is null for " + getPath() + " parent UUID: "
... | [
"protected",
"NodeImpl",
"parent",
"(",
"final",
"boolean",
"pool",
")",
"throws",
"RepositoryException",
"{",
"NodeImpl",
"parent",
"=",
"(",
"NodeImpl",
")",
"dataManager",
".",
"getItemByIdentifier",
"(",
"getParentIdentifier",
"(",
")",
",",
"pool",
")",
";"... | Get parent node item.
@param pool - take a parent from session pool
@return parent item
@throws RepositoryException if parent item is null | [
"Get",
"parent",
"node",
"item",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java#L772-L781 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java | ItemImpl.parentData | public NodeData parentData() throws RepositoryException
{
checkValid();
NodeData parent = (NodeData)dataManager.getItemData(getData().getParentIdentifier());
if (parent == null)
{
throw new ItemNotFoundException("FATAL: Parent is null for " + getPath() + " parent UUID: "
... | java | public NodeData parentData() throws RepositoryException
{
checkValid();
NodeData parent = (NodeData)dataManager.getItemData(getData().getParentIdentifier());
if (parent == null)
{
throw new ItemNotFoundException("FATAL: Parent is null for " + getPath() + " parent UUID: "
... | [
"public",
"NodeData",
"parentData",
"(",
")",
"throws",
"RepositoryException",
"{",
"checkValid",
"(",
")",
";",
"NodeData",
"parent",
"=",
"(",
"NodeData",
")",
"dataManager",
".",
"getItemData",
"(",
"getData",
"(",
")",
".",
"getParentIdentifier",
"(",
")",... | Get and return parent node data.
@return parent node data
@throws RepositoryException if parent item is null | [
"Get",
"and",
"return",
"parent",
"node",
"data",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java#L789-L800 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java | ItemImpl.getLocation | public JCRPath getLocation() throws RepositoryException
{
if (this.location == null)
{
this.location = session.getLocationFactory().createJCRPath(qpath);
}
return this.location;
} | java | public JCRPath getLocation() throws RepositoryException
{
if (this.location == null)
{
this.location = session.getLocationFactory().createJCRPath(qpath);
}
return this.location;
} | [
"public",
"JCRPath",
"getLocation",
"(",
")",
"throws",
"RepositoryException",
"{",
"if",
"(",
"this",
".",
"location",
"==",
"null",
")",
"{",
"this",
".",
"location",
"=",
"session",
".",
"getLocationFactory",
"(",
")",
".",
"createJCRPath",
"(",
"qpath",
... | Get item JCRPath location.
@return item JCRPath | [
"Get",
"item",
"JCRPath",
"location",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java#L829-L837 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindRequestEntity.java | PropFindRequestEntity.getType | public String getType()
{
if (input == null)
{
return "allprop";
}
if (input.getChild(PropertyConstants.DAV_ALLPROP_INCLUDE) != null)
{
return "include";
}
QName name = input.getChild(0).getName();
if (name.getNamespaceURI().equals("D... | java | public String getType()
{
if (input == null)
{
return "allprop";
}
if (input.getChild(PropertyConstants.DAV_ALLPROP_INCLUDE) != null)
{
return "include";
}
QName name = input.getChild(0).getName();
if (name.getNamespaceURI().equals("D... | [
"public",
"String",
"getType",
"(",
")",
"{",
"if",
"(",
"input",
"==",
"null",
")",
"{",
"return",
"\"allprop\"",
";",
"}",
"if",
"(",
"input",
".",
"getChild",
"(",
"PropertyConstants",
".",
"DAV_ALLPROP_INCLUDE",
")",
"!=",
"null",
")",
"{",
"return",... | Returns the type of request.
@return request type | [
"Returns",
"the",
"type",
"of",
"request",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindRequestEntity.java#L56-L74 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/ActionNonTxAware.java | ActionNonTxAware.run | public R run(A... arg) throws E
{
final TransactionManager tm = getTransactionManager();
Transaction tx = null;
try
{
if (tm != null)
{
try
{
tx = tm.suspend();
}
catch (SystemException e)
{
... | java | public R run(A... arg) throws E
{
final TransactionManager tm = getTransactionManager();
Transaction tx = null;
try
{
if (tm != null)
{
try
{
tx = tm.suspend();
}
catch (SystemException e)
{
... | [
"public",
"R",
"run",
"(",
"A",
"...",
"arg",
")",
"throws",
"E",
"{",
"final",
"TransactionManager",
"tm",
"=",
"getTransactionManager",
"(",
")",
";",
"Transaction",
"tx",
"=",
"null",
";",
"try",
"{",
"if",
"(",
"tm",
"!=",
"null",
")",
"{",
"try"... | Executes the action outside the context of the current tx
@param arg the argument to use to execute the action
@return the result of the action
@throws E if an error occurs while executing the action | [
"Executes",
"the",
"action",
"outside",
"the",
"context",
"of",
"the",
"current",
"tx"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/ActionNonTxAware.java#L49-L82 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/ActionNonTxAware.java | ActionNonTxAware.execute | protected R execute(A... arg) throws E
{
if (arg == null || arg.length == 0)
{
return execute((A)null);
}
return execute(arg[0]);
} | java | protected R execute(A... arg) throws E
{
if (arg == null || arg.length == 0)
{
return execute((A)null);
}
return execute(arg[0]);
} | [
"protected",
"R",
"execute",
"(",
"A",
"...",
"arg",
")",
"throws",
"E",
"{",
"if",
"(",
"arg",
"==",
"null",
"||",
"arg",
".",
"length",
"==",
"0",
")",
"{",
"return",
"execute",
"(",
"(",
"A",
")",
"null",
")",
";",
"}",
"return",
"execute",
... | Executes the action
@param arg the argument to use to execute the action
@return the result of the action
@throws E if an error occurs while executing the action | [
"Executes",
"the",
"action"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/ActionNonTxAware.java#L102-L109 | train |
exoplatform/jcr | exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/NodeRepresentationService.java | NodeRepresentationService.getNodeRepresentation | public NodeRepresentation getNodeRepresentation(Node node, String mediaTypeHint) throws RepositoryException
{
NodeRepresentationFactory factory = factory(node);
if (factory != null)
return factory.createNodeRepresentation(node, mediaTypeHint);
else
return new DocumentViewNodeRepr... | java | public NodeRepresentation getNodeRepresentation(Node node, String mediaTypeHint) throws RepositoryException
{
NodeRepresentationFactory factory = factory(node);
if (factory != null)
return factory.createNodeRepresentation(node, mediaTypeHint);
else
return new DocumentViewNodeRepr... | [
"public",
"NodeRepresentation",
"getNodeRepresentation",
"(",
"Node",
"node",
",",
"String",
"mediaTypeHint",
")",
"throws",
"RepositoryException",
"{",
"NodeRepresentationFactory",
"factory",
"=",
"factory",
"(",
"node",
")",
";",
"if",
"(",
"factory",
"!=",
"null"... | Get NodeRepresentation for given node. String mediaTypeHint can be used as external information
for representation. By default node will be represented as doc-view.
@param node
the jcr node.
@param mediaTypeHint
the mimetype hint or null if not known.
@return the NodeRepresentation.
@throws RepositoryException | [
"Get",
"NodeRepresentation",
"for",
"given",
"node",
".",
"String",
"mediaTypeHint",
"can",
"be",
"used",
"as",
"external",
"information",
"for",
"representation",
".",
"By",
"default",
"node",
"will",
"be",
"represented",
"as",
"doc",
"-",
"view",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/NodeRepresentationService.java#L87-L95 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/SwapFile.java | SwapFile.spoolDone | public void spoolDone()
{
final CountDownLatch sl = this.spoolLatch.get();
this.spoolLatch.set(null);
sl.countDown();
} | java | public void spoolDone()
{
final CountDownLatch sl = this.spoolLatch.get();
this.spoolLatch.set(null);
sl.countDown();
} | [
"public",
"void",
"spoolDone",
"(",
")",
"{",
"final",
"CountDownLatch",
"sl",
"=",
"this",
".",
"spoolLatch",
".",
"get",
"(",
")",
";",
"this",
".",
"spoolLatch",
".",
"set",
"(",
"null",
")",
";",
"sl",
".",
"countDown",
"(",
")",
";",
"}"
] | Mark the file ready for read. | [
"Mark",
"the",
"file",
"ready",
"for",
"read",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/SwapFile.java#L201-L206 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.getItemData | public ItemData getItemData(NodeData parent, QPathEntry[] relPathEntries, ItemType itemType)
throws RepositoryException
{
ItemData item = parent;
for (int i = 0; i < relPathEntries.length; i++)
{
if (i == relPathEntries.length - 1)
{
item = getItemData(parent, re... | java | public ItemData getItemData(NodeData parent, QPathEntry[] relPathEntries, ItemType itemType)
throws RepositoryException
{
ItemData item = parent;
for (int i = 0; i < relPathEntries.length; i++)
{
if (i == relPathEntries.length - 1)
{
item = getItemData(parent, re... | [
"public",
"ItemData",
"getItemData",
"(",
"NodeData",
"parent",
",",
"QPathEntry",
"[",
"]",
"relPathEntries",
",",
"ItemType",
"itemType",
")",
"throws",
"RepositoryException",
"{",
"ItemData",
"item",
"=",
"parent",
";",
"for",
"(",
"int",
"i",
"=",
"0",
"... | Return item data by parent NodeDada and relPathEntries If relpath is JCRPath.THIS_RELPATH = '.'
it return itself
@param parent
@param relPathEntries
- array of QPathEntry which represents the relation path to the searched item
@param itemType
- item type
@return existed item data or null if not found
@throws Repositor... | [
"Return",
"item",
"data",
"by",
"parent",
"NodeDada",
"and",
"relPathEntries",
"If",
"relpath",
"is",
"JCRPath",
".",
"THIS_RELPATH",
"=",
".",
"it",
"return",
"itself"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L179-L209 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.getItemData | public ItemData getItemData(String identifier,boolean checkChangesLogOnly) throws RepositoryException
{
ItemData data = null;
// 1. Try in transient changes
ItemState state = changesLog.getItemState(identifier);
if (state == null)
{
// 2. Try from txdatamanager
data = ... | java | public ItemData getItemData(String identifier,boolean checkChangesLogOnly) throws RepositoryException
{
ItemData data = null;
// 1. Try in transient changes
ItemState state = changesLog.getItemState(identifier);
if (state == null)
{
// 2. Try from txdatamanager
data = ... | [
"public",
"ItemData",
"getItemData",
"(",
"String",
"identifier",
",",
"boolean",
"checkChangesLogOnly",
")",
"throws",
"RepositoryException",
"{",
"ItemData",
"data",
"=",
"null",
";",
"// 1. Try in transient changes",
"ItemState",
"state",
"=",
"changesLog",
".",
"g... | Return item data by identifier in this transient storage then in workspace container.
@param identifier
@param checkChangesLogOnly
@return existed item data or null if not found
@throws RepositoryException
@see org.exoplatform.services.jcr.dataflow.ItemDataConsumer#getItemData(java.lang.String) | [
"Return",
"item",
"data",
"by",
"identifier",
"in",
"this",
"transient",
"storage",
"then",
"in",
"workspace",
"container",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L316-L332 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.getItem | public ItemImpl getItem(NodeData parent, QPathEntry name, boolean pool, ItemType itemType)
throws RepositoryException
{
return getItem(parent, name, pool, itemType, true);
} | java | public ItemImpl getItem(NodeData parent, QPathEntry name, boolean pool, ItemType itemType)
throws RepositoryException
{
return getItem(parent, name, pool, itemType, true);
} | [
"public",
"ItemImpl",
"getItem",
"(",
"NodeData",
"parent",
",",
"QPathEntry",
"name",
",",
"boolean",
"pool",
",",
"ItemType",
"itemType",
")",
"throws",
"RepositoryException",
"{",
"return",
"getItem",
"(",
"parent",
",",
"name",
",",
"pool",
",",
"itemType"... | Return Item by parent NodeDada and the name of searched item.
@param parent
- parent of the searched item
@param name
- item name
@param itemType
- item type
@param pool
- indicates does the item fall in pool
@return existed item or null if not found
@throws RepositoryException | [
"Return",
"Item",
"by",
"parent",
"NodeDada",
"and",
"the",
"name",
"of",
"searched",
"item",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L361-L365 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.getItem | public ItemImpl getItem(NodeData parent, QPathEntry name, boolean pool, ItemType itemType, boolean apiRead,
boolean createNullItemData)
throws RepositoryException
{
long start = 0;
if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
LOG.debug("getItem(" + p... | java | public ItemImpl getItem(NodeData parent, QPathEntry name, boolean pool, ItemType itemType, boolean apiRead,
boolean createNullItemData)
throws RepositoryException
{
long start = 0;
if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
LOG.debug("getItem(" + p... | [
"public",
"ItemImpl",
"getItem",
"(",
"NodeData",
"parent",
",",
"QPathEntry",
"name",
",",
"boolean",
"pool",
",",
"ItemType",
"itemType",
",",
"boolean",
"apiRead",
",",
"boolean",
"createNullItemData",
")",
"throws",
"RepositoryException",
"{",
"long",
"start",... | For internal use. Return Item by parent NodeDada and the name of searched item.
@param parent
- parent of the searched item
@param name
- item name
@param itemType
- item type
@param pool
- indicates does the item fall in pool
@param apiRead
- if true will call postRead Action and check permissions
@param createNullIt... | [
"For",
"internal",
"use",
".",
"Return",
"Item",
"by",
"parent",
"NodeDada",
"and",
"the",
"name",
"of",
"searched",
"item",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L408-L433 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.getItem | public ItemImpl getItem(NodeData parent, QPathEntry[] relPath, boolean pool, ItemType itemType)
throws RepositoryException
{
long start = 0;
if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
StringBuilder debugPath = new StringBuilder();
for (QPathEntr... | java | public ItemImpl getItem(NodeData parent, QPathEntry[] relPath, boolean pool, ItemType itemType)
throws RepositoryException
{
long start = 0;
if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
StringBuilder debugPath = new StringBuilder();
for (QPathEntr... | [
"public",
"ItemImpl",
"getItem",
"(",
"NodeData",
"parent",
",",
"QPathEntry",
"[",
"]",
"relPath",
",",
"boolean",
"pool",
",",
"ItemType",
"itemType",
")",
"throws",
"RepositoryException",
"{",
"long",
"start",
"=",
"0",
";",
"if",
"(",
"LOG",
".",
"isDe... | Return Item by parent NodeDada and array of QPathEntry which represent a relative path to the
searched item
@param parent
- parent of the searched item
@param relPath
- array of QPathEntry which represents the relation path to the searched item
@param pool
- indicates does the item fall in pool
@param itemType
- item ... | [
"Return",
"Item",
"by",
"parent",
"NodeDada",
"and",
"array",
"of",
"QPathEntry",
"which",
"represent",
"a",
"relative",
"path",
"to",
"the",
"searched",
"item"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L500-L534 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.getItem | public ItemImpl getItem(QPath path, boolean pool) throws RepositoryException
{
long start = 0;
if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
LOG.debug("getItem(" + path.getAsString() + " ) >>>>>");
}
ItemImpl item = null;
try
{
r... | java | public ItemImpl getItem(QPath path, boolean pool) throws RepositoryException
{
long start = 0;
if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
LOG.debug("getItem(" + path.getAsString() + " ) >>>>>");
}
ItemImpl item = null;
try
{
r... | [
"public",
"ItemImpl",
"getItem",
"(",
"QPath",
"path",
",",
"boolean",
"pool",
")",
"throws",
"RepositoryException",
"{",
"long",
"start",
"=",
"0",
";",
"if",
"(",
"LOG",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"start",
"=",
"System",
".",
"currentTi... | Return item by absolute path in this transient storage then in workspace container.
@param path
- absolute path to the searched item
@param pool
- indicates does the item fall in pool
@return existed item or null if not found
@throws RepositoryException | [
"Return",
"item",
"by",
"absolute",
"path",
"in",
"this",
"transient",
"storage",
"then",
"in",
"workspace",
"container",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L546-L568 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.readItem | protected ItemImpl readItem(ItemData itemData, boolean pool) throws RepositoryException
{
return readItem(itemData, null, pool, true);
} | java | protected ItemImpl readItem(ItemData itemData, boolean pool) throws RepositoryException
{
return readItem(itemData, null, pool, true);
} | [
"protected",
"ItemImpl",
"readItem",
"(",
"ItemData",
"itemData",
",",
"boolean",
"pool",
")",
"throws",
"RepositoryException",
"{",
"return",
"readItem",
"(",
"itemData",
",",
"null",
",",
"pool",
",",
"true",
")",
";",
"}"
] | Read ItemImpl of given ItemData.
Will call postRead Action and check permissions.
@param itemData ItemData
@param pool boolean, if true will reload pooled ItemImpl
@return ItemImpl
@throws RepositoryException if errro occurs | [
"Read",
"ItemImpl",
"of",
"given",
"ItemData",
".",
"Will",
"call",
"postRead",
"Action",
"and",
"check",
"permissions",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L579-L582 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.readItem | protected ItemImpl readItem(ItemData itemData, NodeData parent, boolean pool, boolean apiRead)
throws RepositoryException
{
if (!apiRead)
{
// Need privileges
SecurityManager security = System.getSecurityManager();
if (security != null)
{
security.che... | java | protected ItemImpl readItem(ItemData itemData, NodeData parent, boolean pool, boolean apiRead)
throws RepositoryException
{
if (!apiRead)
{
// Need privileges
SecurityManager security = System.getSecurityManager();
if (security != null)
{
security.che... | [
"protected",
"ItemImpl",
"readItem",
"(",
"ItemData",
"itemData",
",",
"NodeData",
"parent",
",",
"boolean",
"pool",
",",
"boolean",
"apiRead",
")",
"throws",
"RepositoryException",
"{",
"if",
"(",
"!",
"apiRead",
")",
"{",
"// Need privileges",
"SecurityManager",... | Create or reload pooled ItemImpl with the given ItemData.
@param itemData ItemData, data to create ItemImpl
@param parent NodeData, this item parent data, can be null. Not null used for getChildXXX()
@param pool boolean, if true will reload pooled ItemImpl
@param apiRead boolean, if true will call postRead Action and ... | [
"Create",
"or",
"reload",
"pooled",
"ItemImpl",
"with",
"the",
"given",
"ItemData",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L594-L638 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.getItemByIdentifier | public ItemImpl getItemByIdentifier(String identifier, boolean pool) throws RepositoryException
{
return getItemByIdentifier(identifier, pool, true);
} | java | public ItemImpl getItemByIdentifier(String identifier, boolean pool) throws RepositoryException
{
return getItemByIdentifier(identifier, pool, true);
} | [
"public",
"ItemImpl",
"getItemByIdentifier",
"(",
"String",
"identifier",
",",
"boolean",
"pool",
")",
"throws",
"RepositoryException",
"{",
"return",
"getItemByIdentifier",
"(",
"identifier",
",",
"pool",
",",
"true",
")",
";",
"}"
] | Return item by identifier in this transient storage then in workspace container.
@param identifier
- identifier of searched item
@param pool
- indicates does the item fall in pool
@return existed item data or null if not found
@throws RepositoryException | [
"Return",
"item",
"by",
"identifier",
"in",
"this",
"transient",
"storage",
"then",
"in",
"workspace",
"container",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L650-L653 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.getItemByIdentifier | public ItemImpl getItemByIdentifier(String identifier, boolean pool, boolean apiRead) throws RepositoryException
{
long start = 0;
if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
LOG.debug("getItemByIdentifier(" + identifier + " ) >>>>>");
}
ItemImpl i... | java | public ItemImpl getItemByIdentifier(String identifier, boolean pool, boolean apiRead) throws RepositoryException
{
long start = 0;
if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
LOG.debug("getItemByIdentifier(" + identifier + " ) >>>>>");
}
ItemImpl i... | [
"public",
"ItemImpl",
"getItemByIdentifier",
"(",
"String",
"identifier",
",",
"boolean",
"pool",
",",
"boolean",
"apiRead",
")",
"throws",
"RepositoryException",
"{",
"long",
"start",
"=",
"0",
";",
"if",
"(",
"LOG",
".",
"isDebugEnabled",
"(",
")",
")",
"{... | For internal use, required privileges. Return item by identifier in this transient storage then in workspace container.
@param identifier
- identifier of searched item
@param pool
- indicates does the item fall in pool
@param apiRead
- if true will call postRead Action and check permissions
@return existed item data o... | [
"For",
"internal",
"use",
"required",
"privileges",
".",
"Return",
"item",
"by",
"identifier",
"in",
"this",
"transient",
"storage",
"then",
"in",
"workspace",
"container",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L667-L689 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.getACL | public AccessControlList getACL(QPath path) throws RepositoryException
{
long start = 0;
if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
LOG.debug("getACL(" + path.getAsString() + " ) >>>>>");
}
try
{
NodeData parent = (NodeData)getItemD... | java | public AccessControlList getACL(QPath path) throws RepositoryException
{
long start = 0;
if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
LOG.debug("getACL(" + path.getAsString() + " ) >>>>>");
}
try
{
NodeData parent = (NodeData)getItemD... | [
"public",
"AccessControlList",
"getACL",
"(",
"QPath",
"path",
")",
"throws",
"RepositoryException",
"{",
"long",
"start",
"=",
"0",
";",
"if",
"(",
"LOG",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"start",
"=",
"System",
".",
"currentTimeMillis",
"(",
")... | Return the ACL of the location. A session pending changes will be searched too. Item path will
be traversed from the root node to a last existing item.
@param path
- path of an ACL
@return - an item or its parent ancestor ACL
@throws RepositoryException | [
"Return",
"the",
"ACL",
"of",
"the",
"location",
".",
"A",
"session",
"pending",
"changes",
"will",
"be",
"searched",
"too",
".",
"Item",
"path",
"will",
"be",
"traversed",
"from",
"the",
"root",
"node",
"to",
"a",
"last",
"existing",
"item",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L1107-L1171 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.reindexSameNameSiblings | protected List<ItemState> reindexSameNameSiblings(NodeData cause, ItemDataConsumer dataManager)
throws RepositoryException
{
List<ItemState> changes = new ArrayList<ItemState>();
NodeData parentNodeData = (NodeData)dataManager.getItemData(cause.getParentIdentifier());
NodeData nextSibling =... | java | protected List<ItemState> reindexSameNameSiblings(NodeData cause, ItemDataConsumer dataManager)
throws RepositoryException
{
List<ItemState> changes = new ArrayList<ItemState>();
NodeData parentNodeData = (NodeData)dataManager.getItemData(cause.getParentIdentifier());
NodeData nextSibling =... | [
"protected",
"List",
"<",
"ItemState",
">",
"reindexSameNameSiblings",
"(",
"NodeData",
"cause",
",",
"ItemDataConsumer",
"dataManager",
")",
"throws",
"RepositoryException",
"{",
"List",
"<",
"ItemState",
">",
"changes",
"=",
"new",
"ArrayList",
"<",
"ItemState",
... | Reindex same-name siblings of the node Reindex is actual for remove, move only. If node is
added then its index always is a last in list of childs.
@param cause
a node caused reindexing, i.e. deleted or moved node. | [
"Reindex",
"same",
"-",
"name",
"siblings",
"of",
"the",
"node",
"Reindex",
"is",
"actual",
"for",
"remove",
"move",
"only",
".",
"If",
"node",
"is",
"added",
"then",
"its",
"index",
"always",
"is",
"a",
"last",
"in",
"list",
"of",
"childs",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L1452-L1499 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.getReferencesData | public List<PropertyData> getReferencesData(String identifier, boolean skipVersionStorage)
throws RepositoryException
{
List<PropertyData> persisted = transactionableManager.getReferencesData(identifier, skipVersionStorage);
List<PropertyData> sessionTransient = new ArrayList<PropertyData>();
... | java | public List<PropertyData> getReferencesData(String identifier, boolean skipVersionStorage)
throws RepositoryException
{
List<PropertyData> persisted = transactionableManager.getReferencesData(identifier, skipVersionStorage);
List<PropertyData> sessionTransient = new ArrayList<PropertyData>();
... | [
"public",
"List",
"<",
"PropertyData",
">",
"getReferencesData",
"(",
"String",
"identifier",
",",
"boolean",
"skipVersionStorage",
")",
"throws",
"RepositoryException",
"{",
"List",
"<",
"PropertyData",
">",
"persisted",
"=",
"transactionableManager",
".",
"getRefere... | Returns all REFERENCE properties that refer to this node.
@see org.exoplatform.services.jcr.dataflow.ItemDataConsumer#getReferencesData(String, boolean) | [
"Returns",
"all",
"REFERENCE",
"properties",
"that",
"refer",
"to",
"this",
"node",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L1618-L1628 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.validate | private void validate(QPath path) throws RepositoryException, AccessDeniedException, ReferentialIntegrityException
{
List<ItemState> changes = changesLog.getAllStates();
for (ItemState itemState : changes)
{
if (itemState.isInternallyCreated())
{
// skip internally c... | java | private void validate(QPath path) throws RepositoryException, AccessDeniedException, ReferentialIntegrityException
{
List<ItemState> changes = changesLog.getAllStates();
for (ItemState itemState : changes)
{
if (itemState.isInternallyCreated())
{
// skip internally c... | [
"private",
"void",
"validate",
"(",
"QPath",
"path",
")",
"throws",
"RepositoryException",
",",
"AccessDeniedException",
",",
"ReferentialIntegrityException",
"{",
"List",
"<",
"ItemState",
">",
"changes",
"=",
"changesLog",
".",
"getAllStates",
"(",
")",
";",
"fo... | Validate all user created changes saves like access permeations, mandatory items, value
constraint.
@param path
@throws RepositoryException
@throws AccessDeniedException
@throws ReferentialIntegrityException | [
"Validate",
"all",
"user",
"created",
"changes",
"saves",
"like",
"access",
"permeations",
"mandatory",
"items",
"value",
"constraint",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L1639-L1681 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.validateAccessPermissions | private void validateAccessPermissions(ItemState changedItem) throws RepositoryException, AccessDeniedException
{
if (changedItem.isAddedAutoCreatedNodes())
{
validateAddNodePermission(changedItem);
}
else if (changedItem.isDeleted())
{
validateRemoveAccessPermission(c... | java | private void validateAccessPermissions(ItemState changedItem) throws RepositoryException, AccessDeniedException
{
if (changedItem.isAddedAutoCreatedNodes())
{
validateAddNodePermission(changedItem);
}
else if (changedItem.isDeleted())
{
validateRemoveAccessPermission(c... | [
"private",
"void",
"validateAccessPermissions",
"(",
"ItemState",
"changedItem",
")",
"throws",
"RepositoryException",
",",
"AccessDeniedException",
"{",
"if",
"(",
"changedItem",
".",
"isAddedAutoCreatedNodes",
"(",
")",
")",
"{",
"validateAddNodePermission",
"(",
"cha... | Validate ItemState for access permeations
@param changedItem
@throws RepositoryException
@throws AccessDeniedException | [
"Validate",
"ItemState",
"for",
"access",
"permeations"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L1690-L1736 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.validateMandatoryItem | private void validateMandatoryItem(ItemState changedItem) throws ConstraintViolationException, AccessDeniedException
{
if (changedItem.getData().isNode() && (changedItem.isAdded() || changedItem.isMixinChanged())
&& !changesLog.getItemState(changedItem.getData().getQPath()).isDeleted())
{
... | java | private void validateMandatoryItem(ItemState changedItem) throws ConstraintViolationException, AccessDeniedException
{
if (changedItem.getData().isNode() && (changedItem.isAdded() || changedItem.isMixinChanged())
&& !changesLog.getItemState(changedItem.getData().getQPath()).isDeleted())
{
... | [
"private",
"void",
"validateMandatoryItem",
"(",
"ItemState",
"changedItem",
")",
"throws",
"ConstraintViolationException",
",",
"AccessDeniedException",
"{",
"if",
"(",
"changedItem",
".",
"getData",
"(",
")",
".",
"isNode",
"(",
")",
"&&",
"(",
"changedItem",
".... | Validate ItemState which represents the add node, for it's all mandatory items
@param changedItem
@throws ConstraintViolationException
@throws AccessDeniedException | [
"Validate",
"ItemState",
"which",
"represents",
"the",
"add",
"node",
"for",
"it",
"s",
"all",
"mandatory",
"items"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L1791-L1818 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.rollback | void rollback(ItemData item) throws InvalidItemStateException, RepositoryException
{
// remove from changes log (Session pending changes)
PlainChangesLog slog = changesLog.pushLog(item.getQPath());
SessionChangesLog changes = new SessionChangesLog(slog.getAllStates(), session);
for (Iterator... | java | void rollback(ItemData item) throws InvalidItemStateException, RepositoryException
{
// remove from changes log (Session pending changes)
PlainChangesLog slog = changesLog.pushLog(item.getQPath());
SessionChangesLog changes = new SessionChangesLog(slog.getAllStates(), session);
for (Iterator... | [
"void",
"rollback",
"(",
"ItemData",
"item",
")",
"throws",
"InvalidItemStateException",
",",
"RepositoryException",
"{",
"// remove from changes log (Session pending changes)",
"PlainChangesLog",
"slog",
"=",
"changesLog",
".",
"pushLog",
"(",
"item",
".",
"getQPath",
"(... | Removes all pending changes of this item
@param item
@throws RepositoryException | [
"Removes",
"all",
"pending",
"changes",
"of",
"this",
"item"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L1846-L1899 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.mergeList | protected List<? extends ItemData> mergeList(ItemData rootData, DataManager dataManager, boolean deep, int action)
throws RepositoryException
{
// 1 get all transient descendants
List<ItemState> transientDescendants = new ArrayList<ItemState>();
traverseTransientDescendants(rootData, action,... | java | protected List<? extends ItemData> mergeList(ItemData rootData, DataManager dataManager, boolean deep, int action)
throws RepositoryException
{
// 1 get all transient descendants
List<ItemState> transientDescendants = new ArrayList<ItemState>();
traverseTransientDescendants(rootData, action,... | [
"protected",
"List",
"<",
"?",
"extends",
"ItemData",
">",
"mergeList",
"(",
"ItemData",
"rootData",
",",
"DataManager",
"dataManager",
",",
"boolean",
"deep",
",",
"int",
"action",
")",
"throws",
"RepositoryException",
"{",
"// 1 get all transient descendants",
"Li... | Merge a list of nodes and properties of root data. NOTE. Properties in the list will have empty
value data. I.e. for operations not changes properties content. USED FOR DELETE.
@param rootData
@param dataManager
@param deep
@param action
@return
@throws RepositoryException | [
"Merge",
"a",
"list",
"of",
"nodes",
"and",
"properties",
"of",
"root",
"data",
".",
"NOTE",
".",
"Properties",
"in",
"the",
"list",
"will",
"have",
"empty",
"value",
"data",
".",
"I",
".",
"e",
".",
"for",
"operations",
"not",
"changes",
"properties",
... | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L2182-L2235 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.traverseStoredDescendants | private void traverseStoredDescendants(ItemData parent, DataManager dataManager, int action,
Map<String, ItemData> ret, boolean listOnly, Collection<ItemState> transientDescendants)
throws RepositoryException
{
if (parent.isNode() && !isNew(parent.getIdentifier()))
{
if (action != M... | java | private void traverseStoredDescendants(ItemData parent, DataManager dataManager, int action,
Map<String, ItemData> ret, boolean listOnly, Collection<ItemState> transientDescendants)
throws RepositoryException
{
if (parent.isNode() && !isNew(parent.getIdentifier()))
{
if (action != M... | [
"private",
"void",
"traverseStoredDescendants",
"(",
"ItemData",
"parent",
",",
"DataManager",
"dataManager",
",",
"int",
"action",
",",
"Map",
"<",
"String",
",",
"ItemData",
">",
"ret",
",",
"boolean",
"listOnly",
",",
"Collection",
"<",
"ItemState",
">",
"t... | Calculate all stored descendants for the given parent node
@param parent
@param dataManager
@param action
@param ret
@throws RepositoryException | [
"Calculate",
"all",
"stored",
"descendants",
"for",
"the",
"given",
"parent",
"node"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L2246-L2293 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.getStoredDescendants | private List<? extends ItemData> getStoredDescendants(ItemData parent, DataManager dataManager, int action)
throws RepositoryException
{
if (parent.isNode())
{
List<ItemData> childItems = null;
List<NodeData> childNodes = dataManager.getChildNodesData((NodeData)parent);
... | java | private List<? extends ItemData> getStoredDescendants(ItemData parent, DataManager dataManager, int action)
throws RepositoryException
{
if (parent.isNode())
{
List<ItemData> childItems = null;
List<NodeData> childNodes = dataManager.getChildNodesData((NodeData)parent);
... | [
"private",
"List",
"<",
"?",
"extends",
"ItemData",
">",
"getStoredDescendants",
"(",
"ItemData",
"parent",
",",
"DataManager",
"dataManager",
",",
"int",
"action",
")",
"throws",
"RepositoryException",
"{",
"if",
"(",
"parent",
".",
"isNode",
"(",
")",
")",
... | Get all stored descendants for the given parent node
@param parent
@param dataManager
@param action
@throws RepositoryException | [
"Get",
"all",
"stored",
"descendants",
"for",
"the",
"given",
"parent",
"node"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L2303-L2333 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.traverseTransientDescendants | private void traverseTransientDescendants(ItemData parent, int action, List<ItemState> ret)
throws RepositoryException
{
if (parent.isNode())
{
if (action != MERGE_PROPS)
{
Collection<ItemState> childNodes = changesLog.getLastChildrenStates(parent, true);
... | java | private void traverseTransientDescendants(ItemData parent, int action, List<ItemState> ret)
throws RepositoryException
{
if (parent.isNode())
{
if (action != MERGE_PROPS)
{
Collection<ItemState> childNodes = changesLog.getLastChildrenStates(parent, true);
... | [
"private",
"void",
"traverseTransientDescendants",
"(",
"ItemData",
"parent",
",",
"int",
"action",
",",
"List",
"<",
"ItemState",
">",
"ret",
")",
"throws",
"RepositoryException",
"{",
"if",
"(",
"parent",
".",
"isNode",
"(",
")",
")",
"{",
"if",
"(",
"ac... | Calculate all transient descendants for the given parent node
@param parent
@param action
@param ret
@throws RepositoryException | [
"Calculate",
"all",
"transient",
"descendants",
"for",
"the",
"given",
"parent",
"node"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L2343-L2366 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.reloadDescendants | private void reloadDescendants(QPath parentOld, QPath parent) throws RepositoryException
{
List<ItemImpl> items = itemsPool.getDescendats(parentOld);
for (ItemImpl item : items)
{
ItemData oldItemData = item.getData();
ItemData newItemData = updatePath(parentOld, parent, oldItem... | java | private void reloadDescendants(QPath parentOld, QPath parent) throws RepositoryException
{
List<ItemImpl> items = itemsPool.getDescendats(parentOld);
for (ItemImpl item : items)
{
ItemData oldItemData = item.getData();
ItemData newItemData = updatePath(parentOld, parent, oldItem... | [
"private",
"void",
"reloadDescendants",
"(",
"QPath",
"parentOld",
",",
"QPath",
"parent",
")",
"throws",
"RepositoryException",
"{",
"List",
"<",
"ItemImpl",
">",
"items",
"=",
"itemsPool",
".",
"getDescendats",
"(",
"parentOld",
")",
";",
"for",
"(",
"ItemIm... | Reload item's descendants in item reference pool
@param parentOld old item's QPath to get descendants out of item reference pool
@param parent new item's QPath to set for reloaded descendants
@throws RepositoryException | [
"Reload",
"item",
"s",
"descendants",
"in",
"item",
"reference",
"pool"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L2375-L2391 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.updatePathIfNeeded | private ItemData updatePathIfNeeded(ItemData data) throws IllegalPathException
{
if (data == null || changesLog.getAllPathsChanged() == null)
return data;
List<ItemState> states = changesLog.getAllPathsChanged();
for (int i = 0, length = states.size(); i < length; i++)
{
Ite... | java | private ItemData updatePathIfNeeded(ItemData data) throws IllegalPathException
{
if (data == null || changesLog.getAllPathsChanged() == null)
return data;
List<ItemState> states = changesLog.getAllPathsChanged();
for (int i = 0, length = states.size(); i < length; i++)
{
Ite... | [
"private",
"ItemData",
"updatePathIfNeeded",
"(",
"ItemData",
"data",
")",
"throws",
"IllegalPathException",
"{",
"if",
"(",
"data",
"==",
"null",
"||",
"changesLog",
".",
"getAllPathsChanged",
"(",
")",
"==",
"null",
")",
"return",
"data",
";",
"List",
"<",
... | Updates the path if needed and gives the updated item data if an update was needed or the provided item data
otherwise
@throws IllegalPathException | [
"Updates",
"the",
"path",
"if",
"needed",
"and",
"gives",
"the",
"updated",
"item",
"data",
"if",
"an",
"update",
"was",
"needed",
"or",
"the",
"provided",
"item",
"data",
"otherwise"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L2398-L2412 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.updatePath | private ItemData updatePath(QPath parentOld, QPath parent, ItemData oldItemData) throws IllegalPathException
{
int relativeDegree = oldItemData.getQPath().getDepth() - parentOld.getDepth();
QPath newQPath = QPath.makeChildPath(parent, oldItemData.getQPath().getRelPath(relativeDegree));
ItemData ne... | java | private ItemData updatePath(QPath parentOld, QPath parent, ItemData oldItemData) throws IllegalPathException
{
int relativeDegree = oldItemData.getQPath().getDepth() - parentOld.getDepth();
QPath newQPath = QPath.makeChildPath(parent, oldItemData.getQPath().getRelPath(relativeDegree));
ItemData ne... | [
"private",
"ItemData",
"updatePath",
"(",
"QPath",
"parentOld",
",",
"QPath",
"parent",
",",
"ItemData",
"oldItemData",
")",
"throws",
"IllegalPathException",
"{",
"int",
"relativeDegree",
"=",
"oldItemData",
".",
"getQPath",
"(",
")",
".",
"getDepth",
"(",
")",... | Updates the path of the item data and gives the updated objects
@param parentOld the path of the old ancestor
@param parent the path of the new ancestor
@param oldItemData the old item data
@return the {@link ItemData} with the updated path
@throws IllegalPathException if the relative path could not be retrieved | [
"Updates",
"the",
"path",
"of",
"the",
"item",
"data",
"and",
"gives",
"the",
"updated",
"objects"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L2422-L2445 | train |
exoplatform/jcr | exo.jcr.component.statistics/src/main/java/org/exoplatform/services/jcr/statistics/JCRAPIAspect.java | JCRAPIAspect.getStatistics | private static Statistics getStatistics(Class<?> target, String signature)
{
initIfNeeded();
Statistics statistics = MAPPING.get(signature);
if (statistics == null)
{
synchronized (JCRAPIAspect.class)
{
Class<?> interfaceClass = findInterface(target);
... | java | private static Statistics getStatistics(Class<?> target, String signature)
{
initIfNeeded();
Statistics statistics = MAPPING.get(signature);
if (statistics == null)
{
synchronized (JCRAPIAspect.class)
{
Class<?> interfaceClass = findInterface(target);
... | [
"private",
"static",
"Statistics",
"getStatistics",
"(",
"Class",
"<",
"?",
">",
"target",
",",
"String",
"signature",
")",
"{",
"initIfNeeded",
"(",
")",
";",
"Statistics",
"statistics",
"=",
"MAPPING",
".",
"get",
"(",
"signature",
")",
";",
"if",
"(",
... | Gives the corresponding statistics for the given target class and AspectJ signature
@param target the target {@link Class}
@param signature the AspectJ signature
@return the related {@link Statistics} or <code>null</code> if it cannot be found | [
"Gives",
"the",
"corresponding",
"statistics",
"for",
"the",
"given",
"target",
"class",
"and",
"AspectJ",
"signature"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.statistics/src/main/java/org/exoplatform/services/jcr/statistics/JCRAPIAspect.java#L128-L162 | train |
exoplatform/jcr | exo.jcr.component.statistics/src/main/java/org/exoplatform/services/jcr/statistics/JCRAPIAspect.java | JCRAPIAspect.initIfNeeded | private static void initIfNeeded()
{
if (!INITIALIZED)
{
synchronized (JCRAPIAspect.class)
{
if (!INITIALIZED)
{
ExoContainer container = ExoContainerContext.getTopContainer();
JCRAPIAspectConfig config = null;
if (con... | java | private static void initIfNeeded()
{
if (!INITIALIZED)
{
synchronized (JCRAPIAspect.class)
{
if (!INITIALIZED)
{
ExoContainer container = ExoContainerContext.getTopContainer();
JCRAPIAspectConfig config = null;
if (con... | [
"private",
"static",
"void",
"initIfNeeded",
"(",
")",
"{",
"if",
"(",
"!",
"INITIALIZED",
")",
"{",
"synchronized",
"(",
"JCRAPIAspect",
".",
"class",
")",
"{",
"if",
"(",
"!",
"INITIALIZED",
")",
"{",
"ExoContainer",
"container",
"=",
"ExoContainerContext"... | Initializes the aspect if needed | [
"Initializes",
"the",
"aspect",
"if",
"needed"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.statistics/src/main/java/org/exoplatform/services/jcr/statistics/JCRAPIAspect.java#L195-L235 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/scripts/DBCleaningScriptsFactory.java | DBCleaningScriptsFactory.prepareScripts | public static DBCleaningScripts prepareScripts(String dialect, WorkspaceEntry wsEntry) throws DBCleanException
{
if (dialect.startsWith(DialectConstants.DB_DIALECT_MYSQL))
{
return new MySQLCleaningScipts(dialect, wsEntry);
}
else if (dialect.startsWith(DialectConstants.DB_DIALECT_DB... | java | public static DBCleaningScripts prepareScripts(String dialect, WorkspaceEntry wsEntry) throws DBCleanException
{
if (dialect.startsWith(DialectConstants.DB_DIALECT_MYSQL))
{
return new MySQLCleaningScipts(dialect, wsEntry);
}
else if (dialect.startsWith(DialectConstants.DB_DIALECT_DB... | [
"public",
"static",
"DBCleaningScripts",
"prepareScripts",
"(",
"String",
"dialect",
",",
"WorkspaceEntry",
"wsEntry",
")",
"throws",
"DBCleanException",
"{",
"if",
"(",
"dialect",
".",
"startsWith",
"(",
"DialectConstants",
".",
"DB_DIALECT_MYSQL",
")",
")",
"{",
... | Prepare SQL scripts for cleaning workspace data from database.
@param wsEntry
workspace configuration
@param dialect
database dialect which is used, since {@link JDBCWorkspaceDataContainer#DB_DIALECT} parameter
can contain {@link DialectConstants#DB_DIALECT_AUTO} value it is necessary to resolve dialect
before based o... | [
"Prepare",
"SQL",
"scripts",
"for",
"cleaning",
"workspace",
"data",
"from",
"database",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/scripts/DBCleaningScriptsFactory.java#L43-L81 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/RsyncIndexInfos.java | RsyncIndexInfos.triggerRSyncSynchronization | private void triggerRSyncSynchronization()
{
// Call RSync to retrieve actual index from coordinator
if (modeHandler.getMode() == IndexerIoMode.READ_ONLY)
{
EmbeddedCacheManager cacheManager = cache.getCacheManager();
if (cacheManager.getCoordinator() instanceof JGroupsAddress
... | java | private void triggerRSyncSynchronization()
{
// Call RSync to retrieve actual index from coordinator
if (modeHandler.getMode() == IndexerIoMode.READ_ONLY)
{
EmbeddedCacheManager cacheManager = cache.getCacheManager();
if (cacheManager.getCoordinator() instanceof JGroupsAddress
... | [
"private",
"void",
"triggerRSyncSynchronization",
"(",
")",
"{",
"// Call RSync to retrieve actual index from coordinator",
"if",
"(",
"modeHandler",
".",
"getMode",
"(",
")",
"==",
"IndexerIoMode",
".",
"READ_ONLY",
")",
"{",
"EmbeddedCacheManager",
"cacheManager",
"=",
... | Call to system RSync binary implementation, | [
"Call",
"to",
"system",
"RSync",
"binary",
"implementation"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/RsyncIndexInfos.java#L101-L152 | train |
exoplatform/jcr | exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/common/SessionProvider.java | SessionProvider.createAnonimProvider | public static SessionProvider createAnonimProvider()
{
Identity id = new Identity(IdentityConstants.ANONIM, new HashSet<MembershipEntry>());
return new SessionProvider(new ConversationState(id));
} | java | public static SessionProvider createAnonimProvider()
{
Identity id = new Identity(IdentityConstants.ANONIM, new HashSet<MembershipEntry>());
return new SessionProvider(new ConversationState(id));
} | [
"public",
"static",
"SessionProvider",
"createAnonimProvider",
"(",
")",
"{",
"Identity",
"id",
"=",
"new",
"Identity",
"(",
"IdentityConstants",
".",
"ANONIM",
",",
"new",
"HashSet",
"<",
"MembershipEntry",
">",
"(",
")",
")",
";",
"return",
"new",
"SessionPr... | Helper for creating Anonymous session provider.
@return an anonymous session provider | [
"Helper",
"for",
"creating",
"Anonymous",
"session",
"provider",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/common/SessionProvider.java#L128-L132 | train |
exoplatform/jcr | exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/common/SessionProvider.java | SessionProvider.getSession | public synchronized Session getSession(String workspaceName, ManageableRepository repository) throws LoginException,
NoSuchWorkspaceException, RepositoryException
{
if (closed)
{
throw new IllegalStateException("Session provider already closed");
}
if (workspaceName == null)
... | java | public synchronized Session getSession(String workspaceName, ManageableRepository repository) throws LoginException,
NoSuchWorkspaceException, RepositoryException
{
if (closed)
{
throw new IllegalStateException("Session provider already closed");
}
if (workspaceName == null)
... | [
"public",
"synchronized",
"Session",
"getSession",
"(",
"String",
"workspaceName",
",",
"ManageableRepository",
"repository",
")",
"throws",
"LoginException",
",",
"NoSuchWorkspaceException",
",",
"RepositoryException",
"{",
"if",
"(",
"closed",
")",
"{",
"throw",
"ne... | Gets the session from an internal cache if a similar session has already been used
or creates a new session and puts it into the internal cache.
@param workspaceName the workspace name
@param repository the repository instance
@return a session corresponding to the given repository and workspace
@throws LoginException... | [
"Gets",
"the",
"session",
"from",
"an",
"internal",
"cache",
"if",
"a",
"similar",
"session",
"has",
"already",
"been",
"used",
"or",
"creates",
"a",
"new",
"session",
"and",
"puts",
"it",
"into",
"the",
"internal",
"cache",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/common/SessionProvider.java#L171-L211 | train |
exoplatform/jcr | exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/common/SessionProvider.java | SessionProvider.key | private String key(ManageableRepository repository, String workspaceName)
{
String repositoryName = repository.getConfiguration().getName();
return repositoryName + workspaceName;
} | java | private String key(ManageableRepository repository, String workspaceName)
{
String repositoryName = repository.getConfiguration().getName();
return repositoryName + workspaceName;
} | [
"private",
"String",
"key",
"(",
"ManageableRepository",
"repository",
",",
"String",
"workspaceName",
")",
"{",
"String",
"repositoryName",
"=",
"repository",
".",
"getConfiguration",
"(",
")",
".",
"getName",
"(",
")",
";",
"return",
"repositoryName",
"+",
"wo... | Key generator for sessions cache.
@param repository the repository instance
@param workspaceName the workspace name
@return | [
"Key",
"generator",
"for",
"sessions",
"cache",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/common/SessionProvider.java#L256-L260 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/PathPatternUtils.java | PathPatternUtils.extractCommonAncestor | public static String extractCommonAncestor(String pattern, String absPath)
{
pattern = normalizePath(pattern);
absPath = normalizePath(absPath);
String[] patterEntries = pattern.split("/");
String[] pathEntries = absPath.split("/");
StringBuilder ancestor = new StringBuilder();
... | java | public static String extractCommonAncestor(String pattern, String absPath)
{
pattern = normalizePath(pattern);
absPath = normalizePath(absPath);
String[] patterEntries = pattern.split("/");
String[] pathEntries = absPath.split("/");
StringBuilder ancestor = new StringBuilder();
... | [
"public",
"static",
"String",
"extractCommonAncestor",
"(",
"String",
"pattern",
",",
"String",
"absPath",
")",
"{",
"pattern",
"=",
"normalizePath",
"(",
"pattern",
")",
";",
"absPath",
"=",
"normalizePath",
"(",
"absPath",
")",
";",
"String",
"[",
"]",
"pa... | Returns common ancestor for paths represented by absolute path and pattern. | [
"Returns",
"common",
"ancestor",
"for",
"paths",
"represented",
"by",
"absolute",
"path",
"and",
"pattern",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/PathPatternUtils.java#L98-L123 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/IndexerChangesFilter.java | IndexerChangesFilter.doUpdateIndex | protected void doUpdateIndex(Set<String> removedNodes, Set<String> addedNodes, Set<String> parentRemovedNodes,
Set<String> parentAddedNodes)
{
ChangesHolder changes = searchManager.getChanges(removedNodes, addedNodes);
ChangesHolder parentChanges = parentSearchManager.getChanges(parentRemovedNodes,... | java | protected void doUpdateIndex(Set<String> removedNodes, Set<String> addedNodes, Set<String> parentRemovedNodes,
Set<String> parentAddedNodes)
{
ChangesHolder changes = searchManager.getChanges(removedNodes, addedNodes);
ChangesHolder parentChanges = parentSearchManager.getChanges(parentRemovedNodes,... | [
"protected",
"void",
"doUpdateIndex",
"(",
"Set",
"<",
"String",
">",
"removedNodes",
",",
"Set",
"<",
"String",
">",
"addedNodes",
",",
"Set",
"<",
"String",
">",
"parentRemovedNodes",
",",
"Set",
"<",
"String",
">",
"parentAddedNodes",
")",
"{",
"ChangesHo... | Update index.
@param removedNodes
@param addedNodes | [
"Update",
"index",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/IndexerChangesFilter.java#L218-L245 | train |
exoplatform/jcr | exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingWorkspaceRestore.java | JobExistingWorkspaceRestore.forceCloseSession | private int forceCloseSession(String repositoryName, String workspaceName) throws RepositoryException,
RepositoryConfigurationException
{
ManageableRepository mr = repositoryService.getRepository(repositoryName);
WorkspaceContainerFacade wc = mr.getWorkspaceContainer(workspaceName);
SessionR... | java | private int forceCloseSession(String repositoryName, String workspaceName) throws RepositoryException,
RepositoryConfigurationException
{
ManageableRepository mr = repositoryService.getRepository(repositoryName);
WorkspaceContainerFacade wc = mr.getWorkspaceContainer(workspaceName);
SessionR... | [
"private",
"int",
"forceCloseSession",
"(",
"String",
"repositoryName",
",",
"String",
"workspaceName",
")",
"throws",
"RepositoryException",
",",
"RepositoryConfigurationException",
"{",
"ManageableRepository",
"mr",
"=",
"repositoryService",
".",
"getRepository",
"(",
"... | Close sessions on specific workspace.
@param repositoryName
repository name
@param workspaceName
workspace name
@return int return the how many sessions was closed
@throws RepositoryConfigurationException
will be generate RepositoryConfigurationException
@throws RepositoryException
will be generate RepositoryException | [
"Close",
"sessions",
"on",
"specific",
"workspace",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingWorkspaceRestore.java#L131-L140 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ErrorLog.java | ErrorLog.readList | public List<String> readList() throws IOException
{
InputStream in = PrivilegedFileHelper.fileInputStream(logFile);
try
{
List<String> list = new ArrayList<String>();
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
String line;
whil... | java | public List<String> readList() throws IOException
{
InputStream in = PrivilegedFileHelper.fileInputStream(logFile);
try
{
List<String> list = new ArrayList<String>();
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
String line;
whil... | [
"public",
"List",
"<",
"String",
">",
"readList",
"(",
")",
"throws",
"IOException",
"{",
"InputStream",
"in",
"=",
"PrivilegedFileHelper",
".",
"fileInputStream",
"(",
"logFile",
")",
";",
"try",
"{",
"List",
"<",
"String",
">",
"list",
"=",
"new",
"Array... | Reads the log file .
@throws IOException
if an error occurs while reading from the log file. | [
"Reads",
"the",
"log",
"file",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ErrorLog.java#L196-L228 | train |
exoplatform/jcr | exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/BackupChainLog.java | BackupChainLog.addJobEntry | public void addJobEntry(BackupJob job)
{
// jobEntries
try
{
JobEntryInfo info = new JobEntryInfo();
info.setDate(Calendar.getInstance());
info.setType(job.getType());
info.setState(job.getState());
info.setURL(job.getStorageURL());
... | java | public void addJobEntry(BackupJob job)
{
// jobEntries
try
{
JobEntryInfo info = new JobEntryInfo();
info.setDate(Calendar.getInstance());
info.setType(job.getType());
info.setState(job.getState());
info.setURL(job.getStorageURL());
... | [
"public",
"void",
"addJobEntry",
"(",
"BackupJob",
"job",
")",
"{",
"// jobEntries\r",
"try",
"{",
"JobEntryInfo",
"info",
"=",
"new",
"JobEntryInfo",
"(",
")",
";",
"info",
".",
"setDate",
"(",
"Calendar",
".",
"getInstance",
"(",
")",
")",
";",
"info",
... | Adding the the backup job.
@param job
BackupJob, the backup job | [
"Adding",
"the",
"the",
"backup",
"job",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/BackupChainLog.java#L285-L310 | train |
exoplatform/jcr | exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/BackupChainLog.java | BackupChainLog.getJobEntryStates | public Collection<JobEntryInfo> getJobEntryStates()
{
HashMap<Integer, JobEntryInfo> infos = new HashMap<Integer, JobEntryInfo>();
for (JobEntryInfo jobEntry : jobEntries)
{
infos.put(jobEntry.getID(), jobEntry);
}
return infos.values();
} | java | public Collection<JobEntryInfo> getJobEntryStates()
{
HashMap<Integer, JobEntryInfo> infos = new HashMap<Integer, JobEntryInfo>();
for (JobEntryInfo jobEntry : jobEntries)
{
infos.put(jobEntry.getID(), jobEntry);
}
return infos.values();
} | [
"public",
"Collection",
"<",
"JobEntryInfo",
">",
"getJobEntryStates",
"(",
")",
"{",
"HashMap",
"<",
"Integer",
",",
"JobEntryInfo",
">",
"infos",
"=",
"new",
"HashMap",
"<",
"Integer",
",",
"JobEntryInfo",
">",
"(",
")",
";",
"for",
"(",
"JobEntryInfo",
... | Getting the states for jobs.
@return Collection
return the collection of states for jobs | [
"Getting",
"the",
"states",
"for",
"jobs",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/BackupChainLog.java#L397-L405 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/MkColCommand.java | MkColCommand.mkCol | public Response mkCol(Session session, String path, String nodeType, List<String> mixinTypes, List<String> tokens)
{
Node node;
try
{
nullResourceLocks.checkLock(session, path, tokens);
node = session.getRootNode().addNode(TextUtil.relativizePath(path), nodeType);
... | java | public Response mkCol(Session session, String path, String nodeType, List<String> mixinTypes, List<String> tokens)
{
Node node;
try
{
nullResourceLocks.checkLock(session, path, tokens);
node = session.getRootNode().addNode(TextUtil.relativizePath(path), nodeType);
... | [
"public",
"Response",
"mkCol",
"(",
"Session",
"session",
",",
"String",
"path",
",",
"String",
"nodeType",
",",
"List",
"<",
"String",
">",
"mixinTypes",
",",
"List",
"<",
"String",
">",
"tokens",
")",
"{",
"Node",
"node",
";",
"try",
"{",
"nullResource... | Webdav Mkcol method implementation.
@param session current session
@param path resource path
@param nodeType folder node type
@param mixinTypes mixin types
@param tokens tokens
@return the instance of javax.ws.rs.core.Response | [
"Webdav",
"Mkcol",
"method",
"implementation",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/MkColCommand.java#L97-L150 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/MkColCommand.java | MkColCommand.addMixins | private void addMixins(Node node, List<String> mixinTypes)
{
for (int i = 0; i < mixinTypes.size(); i++)
{
String curMixinType = mixinTypes.get(i);
try
{
node.addMixin(curMixinType);
}
catch (Exception exc)
{
log.err... | java | private void addMixins(Node node, List<String> mixinTypes)
{
for (int i = 0; i < mixinTypes.size(); i++)
{
String curMixinType = mixinTypes.get(i);
try
{
node.addMixin(curMixinType);
}
catch (Exception exc)
{
log.err... | [
"private",
"void",
"addMixins",
"(",
"Node",
"node",
",",
"List",
"<",
"String",
">",
"mixinTypes",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"mixinTypes",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"String",
"curMixinType",
... | Adds mixins to node.
@param node node.
@param mixinTypes mixin types. | [
"Adds",
"mixins",
"to",
"node",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/MkColCommand.java#L158-L172 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/UnLockCommand.java | UnLockCommand.unLock | public Response unLock(Session session, String path, List<String> tokens)
{
try
{
try
{
Node node = (Node)session.getItem(path);
if (node.isLocked())
{
node.unlock();
session.save();
}
... | java | public Response unLock(Session session, String path, List<String> tokens)
{
try
{
try
{
Node node = (Node)session.getItem(path);
if (node.isLocked())
{
node.unlock();
session.save();
}
... | [
"public",
"Response",
"unLock",
"(",
"Session",
"session",
",",
"String",
"path",
",",
"List",
"<",
"String",
">",
"tokens",
")",
"{",
"try",
"{",
"try",
"{",
"Node",
"node",
"=",
"(",
"Node",
")",
"session",
".",
"getItem",
"(",
"path",
")",
";",
... | Webdav Unlock method implementation.
@param session current seesion
@param path resource path
@param tokens tokens
@return the instance of javax.ws.rs.core.Response | [
"Webdav",
"Unlock",
"method",
"implementation",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/UnLockCommand.java#L72-L111 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/GenericResource.java | GenericResource.lockDiscovery | public static HierarchicalProperty lockDiscovery(String token, String lockOwner, String timeOut)
{
HierarchicalProperty lockDiscovery = new HierarchicalProperty(new QName("DAV:", "lockdiscovery"));
HierarchicalProperty activeLock =
lockDiscovery.addChild(new HierarchicalProperty(new QName(... | java | public static HierarchicalProperty lockDiscovery(String token, String lockOwner, String timeOut)
{
HierarchicalProperty lockDiscovery = new HierarchicalProperty(new QName("DAV:", "lockdiscovery"));
HierarchicalProperty activeLock =
lockDiscovery.addChild(new HierarchicalProperty(new QName(... | [
"public",
"static",
"HierarchicalProperty",
"lockDiscovery",
"(",
"String",
"token",
",",
"String",
"lockOwner",
",",
"String",
"timeOut",
")",
"{",
"HierarchicalProperty",
"lockDiscovery",
"=",
"new",
"HierarchicalProperty",
"(",
"new",
"QName",
"(",
"\"DAV:\"",
",... | Returns the information about lock.
@param token lock token
@param lockOwner lockowner
@param timeOut lock timeout
@return lock information | [
"Returns",
"the",
"information",
"about",
"lock",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/GenericResource.java#L146-L179 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/GenericResource.java | GenericResource.supportedLock | protected HierarchicalProperty supportedLock()
{
HierarchicalProperty supportedLock = new HierarchicalProperty(new QName("DAV:", "supportedlock"));
HierarchicalProperty lockEntry = new HierarchicalProperty(new QName("DAV:", "lockentry"));
supportedLock.addChild(lockEntry);
Hierarchic... | java | protected HierarchicalProperty supportedLock()
{
HierarchicalProperty supportedLock = new HierarchicalProperty(new QName("DAV:", "supportedlock"));
HierarchicalProperty lockEntry = new HierarchicalProperty(new QName("DAV:", "lockentry"));
supportedLock.addChild(lockEntry);
Hierarchic... | [
"protected",
"HierarchicalProperty",
"supportedLock",
"(",
")",
"{",
"HierarchicalProperty",
"supportedLock",
"=",
"new",
"HierarchicalProperty",
"(",
"new",
"QName",
"(",
"\"DAV:\"",
",",
"\"supportedlock\"",
")",
")",
";",
"HierarchicalProperty",
"lockEntry",
"=",
"... | The information about supported locks.
@return information about supported locks | [
"The",
"information",
"about",
"supported",
"locks",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/GenericResource.java#L186-L202 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/GenericResource.java | GenericResource.supportedMethodSet | protected HierarchicalProperty supportedMethodSet()
{
HierarchicalProperty supportedMethodProp = new HierarchicalProperty(SUPPORTEDMETHODSET);
supportedMethodProp.addChild(new HierarchicalProperty(new QName("DAV:", "supported-method"))).setAttribute(
"name", "PROPFIND");
supportedMe... | java | protected HierarchicalProperty supportedMethodSet()
{
HierarchicalProperty supportedMethodProp = new HierarchicalProperty(SUPPORTEDMETHODSET);
supportedMethodProp.addChild(new HierarchicalProperty(new QName("DAV:", "supported-method"))).setAttribute(
"name", "PROPFIND");
supportedMe... | [
"protected",
"HierarchicalProperty",
"supportedMethodSet",
"(",
")",
"{",
"HierarchicalProperty",
"supportedMethodProp",
"=",
"new",
"HierarchicalProperty",
"(",
"SUPPORTEDMETHODSET",
")",
";",
"supportedMethodProp",
".",
"addChild",
"(",
"new",
"HierarchicalProperty",
"(",... | The information about supported methods.
@return information about supported methods | [
"The",
"information",
"about",
"supported",
"methods",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/GenericResource.java#L209-L250 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PutCommand.java | PutCommand.updateVersion | private void updateVersion(Node fileNode, InputStream inputStream, String autoVersion, List<String> mixins)
throws RepositoryException
{
if (!fileNode.isCheckedOut())
{
fileNode.checkout();
fileNode.getSession().save();
}
if (CHECKOUT.equals(autoVersion))
... | java | private void updateVersion(Node fileNode, InputStream inputStream, String autoVersion, List<String> mixins)
throws RepositoryException
{
if (!fileNode.isCheckedOut())
{
fileNode.checkout();
fileNode.getSession().save();
}
if (CHECKOUT.equals(autoVersion))
... | [
"private",
"void",
"updateVersion",
"(",
"Node",
"fileNode",
",",
"InputStream",
"inputStream",
",",
"String",
"autoVersion",
",",
"List",
"<",
"String",
">",
"mixins",
")",
"throws",
"RepositoryException",
"{",
"if",
"(",
"!",
"fileNode",
".",
"isCheckedOut",
... | Updates the content of the versionable file according to auto-version value.
@param fileNode Node to update
@param inputStream input stream that contains the content of
file
@param autoVersion auto-version value
@param mixins list of mixins
@throws RepositoryException {@link RepositoryException} | [
"Updates",
"the",
"content",
"of",
"the",
"versionable",
"file",
"according",
"to",
"auto",
"-",
"version",
"value",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PutCommand.java#L420-L439 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DocNumberCache.java | DocNumberCache.put | void put(String uuid, CachingIndexReader reader, int n)
{
LRUMap cacheSegment = docNumbers[getSegmentIndex(uuid.charAt(0))];
//UUID key = UUID.fromString(uuid);
String key = uuid;
synchronized (cacheSegment)
{
Entry e = (Entry)cacheSegment.get(key);
if (e != null)
... | java | void put(String uuid, CachingIndexReader reader, int n)
{
LRUMap cacheSegment = docNumbers[getSegmentIndex(uuid.charAt(0))];
//UUID key = UUID.fromString(uuid);
String key = uuid;
synchronized (cacheSegment)
{
Entry e = (Entry)cacheSegment.get(key);
if (e != null)
... | [
"void",
"put",
"(",
"String",
"uuid",
",",
"CachingIndexReader",
"reader",
",",
"int",
"n",
")",
"{",
"LRUMap",
"cacheSegment",
"=",
"docNumbers",
"[",
"getSegmentIndex",
"(",
"uuid",
".",
"charAt",
"(",
"0",
")",
")",
"]",
";",
"//UUID key = UUID.fromString... | Puts a document number into the cache using a uuid as key. An entry is
only overwritten if the according reader is younger than the reader
associated with the existing entry.
@param uuid the key.
@param reader the index reader from where the document number was read.
@param n the document number. | [
"Puts",
"a",
"document",
"number",
"into",
"the",
"cache",
"using",
"a",
"uuid",
"as",
"key",
".",
"An",
"entry",
"is",
"only",
"overwritten",
"if",
"the",
"according",
"reader",
"is",
"younger",
"than",
"the",
"reader",
"associated",
"with",
"the",
"exist... | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DocNumberCache.java#L98-L131 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/ValueFactoryImpl.java | ValueFactoryImpl.createValue | public Value createValue(JCRName value) throws RepositoryException
{
if (value == null)
return null;
try
{
return new NameValue(value.getInternalName(), locationFactory);
}
catch (IOException e)
{
throw new RepositoryException("Cannot create NAME Value f... | java | public Value createValue(JCRName value) throws RepositoryException
{
if (value == null)
return null;
try
{
return new NameValue(value.getInternalName(), locationFactory);
}
catch (IOException e)
{
throw new RepositoryException("Cannot create NAME Value f... | [
"public",
"Value",
"createValue",
"(",
"JCRName",
"value",
")",
"throws",
"RepositoryException",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"return",
"null",
";",
"try",
"{",
"return",
"new",
"NameValue",
"(",
"value",
".",
"getInternalName",
"(",
")",
",... | Create Value from JCRName.
@param value
JCRName
@return Value
@throws RepositoryException
if error | [
"Create",
"Value",
"from",
"JCRName",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/ValueFactoryImpl.java#L304-L316 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/ValueFactoryImpl.java | ValueFactoryImpl.createValue | public Value createValue(JCRPath value) throws RepositoryException
{
if (value == null)
return null;
try
{
return new PathValue(value.getInternalPath(), locationFactory);
}
catch (IOException e)
{
throw new RepositoryException("Cannot create PATH Value f... | java | public Value createValue(JCRPath value) throws RepositoryException
{
if (value == null)
return null;
try
{
return new PathValue(value.getInternalPath(), locationFactory);
}
catch (IOException e)
{
throw new RepositoryException("Cannot create PATH Value f... | [
"public",
"Value",
"createValue",
"(",
"JCRPath",
"value",
")",
"throws",
"RepositoryException",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"return",
"null",
";",
"try",
"{",
"return",
"new",
"PathValue",
"(",
"value",
".",
"getInternalPath",
"(",
")",
",... | Create Value from JCRPath.
@param value
JCRPath
@return Value
@throws RepositoryException
if error | [
"Create",
"Value",
"from",
"JCRPath",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/ValueFactoryImpl.java#L327-L339 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/ValueFactoryImpl.java | ValueFactoryImpl.createValue | public Value createValue(Identifier value)
{
if (value == null)
return null;
try
{
return new ReferenceValue(value);
}
catch (IOException e)
{
LOG.warn("Cannot create REFERENCE Value from Identifier " + value, e);
return null;
}
} | java | public Value createValue(Identifier value)
{
if (value == null)
return null;
try
{
return new ReferenceValue(value);
}
catch (IOException e)
{
LOG.warn("Cannot create REFERENCE Value from Identifier " + value, e);
return null;
}
} | [
"public",
"Value",
"createValue",
"(",
"Identifier",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"return",
"null",
";",
"try",
"{",
"return",
"new",
"ReferenceValue",
"(",
"value",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{"... | Create Value from Id.
@param value
Identifier
@return Value Reference | [
"Create",
"Value",
"from",
"Id",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/ValueFactoryImpl.java#L348-L361 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/ValueFactoryImpl.java | ValueFactoryImpl.loadValue | public Value loadValue(ValueData data, int type) throws RepositoryException
{
try
{
switch (type)
{
case PropertyType.STRING :
return new StringValue(data);
case PropertyType.BINARY :
return new BinaryValue(data, spoolConfig);
... | java | public Value loadValue(ValueData data, int type) throws RepositoryException
{
try
{
switch (type)
{
case PropertyType.STRING :
return new StringValue(data);
case PropertyType.BINARY :
return new BinaryValue(data, spoolConfig);
... | [
"public",
"Value",
"loadValue",
"(",
"ValueData",
"data",
",",
"int",
"type",
")",
"throws",
"RepositoryException",
"{",
"try",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"PropertyType",
".",
"STRING",
":",
"return",
"new",
"StringValue",
"(",
"data",
"... | Creates new Value object using ValueData
@param data
ValueData
@param type
int
@return Value
@throws RepositoryException
if error | [
"Creates",
"new",
"Value",
"object",
"using",
"ValueData"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/ValueFactoryImpl.java#L374-L410 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/AbstractLockTableHandler.java | AbstractLockTableHandler.openConnection | protected Connection openConnection() throws SQLException
{
return SecurityHelper.doPrivilegedSQLExceptionAction(new PrivilegedExceptionAction<Connection>()
{
public Connection run() throws SQLException
{
return ds.getConnection();
}
});
} | java | protected Connection openConnection() throws SQLException
{
return SecurityHelper.doPrivilegedSQLExceptionAction(new PrivilegedExceptionAction<Connection>()
{
public Connection run() throws SQLException
{
return ds.getConnection();
}
});
} | [
"protected",
"Connection",
"openConnection",
"(",
")",
"throws",
"SQLException",
"{",
"return",
"SecurityHelper",
".",
"doPrivilegedSQLExceptionAction",
"(",
"new",
"PrivilegedExceptionAction",
"<",
"Connection",
">",
"(",
")",
"{",
"public",
"Connection",
"run",
"(",... | Opens connection to database. | [
"Opens",
"connection",
"to",
"database",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/AbstractLockTableHandler.java#L122-L131 | train |
exoplatform/jcr | exo.jcr.framework.web/src/main/java/org/exoplatform/frameworks/jcr/web/fckeditor/FCKeditorConfigurations.java | FCKeditorConfigurations.getUrlParams | public String getUrlParams()
{
StringBuffer osParams = new StringBuffer();
for (Iterator i = this.entrySet().iterator(); i.hasNext();)
{
Map.Entry entry = (Map.Entry)i.next();
if (entry.getValue() != null)
osParams.append("&" + encodeConfig(entry.getKey().toString()) ... | java | public String getUrlParams()
{
StringBuffer osParams = new StringBuffer();
for (Iterator i = this.entrySet().iterator(); i.hasNext();)
{
Map.Entry entry = (Map.Entry)i.next();
if (entry.getValue() != null)
osParams.append("&" + encodeConfig(entry.getKey().toString()) ... | [
"public",
"String",
"getUrlParams",
"(",
")",
"{",
"StringBuffer",
"osParams",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"for",
"(",
"Iterator",
"i",
"=",
"this",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"i",
".",
"hasNext",
"(",
"... | Generate the url parameter sequence used to pass this configuration to the editor.
@return html endocode sequence of configuration parameters | [
"Generate",
"the",
"url",
"parameter",
"sequence",
"used",
"to",
"pass",
"this",
"configuration",
"to",
"the",
"editor",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.framework.web/src/main/java/org/exoplatform/frameworks/jcr/web/fckeditor/FCKeditorConfigurations.java#L47-L59 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lock/NullResourceLocksHolder.java | NullResourceLocksHolder.addLock | public String addLock(Session session, String path) throws LockException
{
String repoPath = session.getRepository().hashCode() + "/" + session.getWorkspace().getName() + "/" + path;
if (!nullResourceLocks.containsKey(repoPath))
{
String newLockToken = IdGenerator.generate();
... | java | public String addLock(Session session, String path) throws LockException
{
String repoPath = session.getRepository().hashCode() + "/" + session.getWorkspace().getName() + "/" + path;
if (!nullResourceLocks.containsKey(repoPath))
{
String newLockToken = IdGenerator.generate();
... | [
"public",
"String",
"addLock",
"(",
"Session",
"session",
",",
"String",
"path",
")",
"throws",
"LockException",
"{",
"String",
"repoPath",
"=",
"session",
".",
"getRepository",
"(",
")",
".",
"hashCode",
"(",
")",
"+",
"\"/\"",
"+",
"session",
".",
"getWo... | Locks the node.
@param session current session
@param path node path
@return thee lock token key
@throws LockException {@link LockException} | [
"Locks",
"the",
"node",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lock/NullResourceLocksHolder.java#L60-L81 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lock/NullResourceLocksHolder.java | NullResourceLocksHolder.removeLock | public void removeLock(Session session, String path)
{
String repoPath = session.getRepository().hashCode() + "/" + session.getWorkspace().getName() + "/" + path;
String token = nullResourceLocks.get(repoPath);
session.removeLockToken(token);
nullResourceLocks.remove(repoPath);
} | java | public void removeLock(Session session, String path)
{
String repoPath = session.getRepository().hashCode() + "/" + session.getWorkspace().getName() + "/" + path;
String token = nullResourceLocks.get(repoPath);
session.removeLockToken(token);
nullResourceLocks.remove(repoPath);
} | [
"public",
"void",
"removeLock",
"(",
"Session",
"session",
",",
"String",
"path",
")",
"{",
"String",
"repoPath",
"=",
"session",
".",
"getRepository",
"(",
")",
".",
"hashCode",
"(",
")",
"+",
"\"/\"",
"+",
"session",
".",
"getWorkspace",
"(",
")",
".",... | Removes lock from the node.
@param session current session
@param path nodepath | [
"Removes",
"lock",
"from",
"the",
"node",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lock/NullResourceLocksHolder.java#L89-L95 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lock/NullResourceLocksHolder.java | NullResourceLocksHolder.isLocked | public boolean isLocked(Session session, String path)
{
String repoPath = session.getRepository().hashCode() + "/" + session.getWorkspace().getName() + "/" + path;
if (nullResourceLocks.get(repoPath) != null)
{
return true;
}
return false;
} | java | public boolean isLocked(Session session, String path)
{
String repoPath = session.getRepository().hashCode() + "/" + session.getWorkspace().getName() + "/" + path;
if (nullResourceLocks.get(repoPath) != null)
{
return true;
}
return false;
} | [
"public",
"boolean",
"isLocked",
"(",
"Session",
"session",
",",
"String",
"path",
")",
"{",
"String",
"repoPath",
"=",
"session",
".",
"getRepository",
"(",
")",
".",
"hashCode",
"(",
")",
"+",
"\"/\"",
"+",
"session",
".",
"getWorkspace",
"(",
")",
"."... | Checks if the node is locked.
@param session current session
@param path node path
@return true if the node is locked false if not | [
"Checks",
"if",
"the",
"node",
"is",
"locked",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lock/NullResourceLocksHolder.java#L104-L113 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lock/NullResourceLocksHolder.java | NullResourceLocksHolder.checkLock | public void checkLock(Session session, String path, List<String> tokens) throws LockException
{
String repoPath = session.getRepository().hashCode() + "/" + session.getWorkspace().getName() + "/" + path;
String currentToken = nullResourceLocks.get(repoPath);
if (currentToken == null)
... | java | public void checkLock(Session session, String path, List<String> tokens) throws LockException
{
String repoPath = session.getRepository().hashCode() + "/" + session.getWorkspace().getName() + "/" + path;
String currentToken = nullResourceLocks.get(repoPath);
if (currentToken == null)
... | [
"public",
"void",
"checkLock",
"(",
"Session",
"session",
",",
"String",
"path",
",",
"List",
"<",
"String",
">",
"tokens",
")",
"throws",
"LockException",
"{",
"String",
"repoPath",
"=",
"session",
".",
"getRepository",
"(",
")",
".",
"hashCode",
"(",
")"... | Checks if the node can be unlocked using current tokens.
@param session current session
@param path node path
@param tokens tokens
@throws LockException {@link LockException} | [
"Checks",
"if",
"the",
"node",
"can",
"be",
"unlocked",
"using",
"current",
"tokens",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lock/NullResourceLocksHolder.java#L123-L146 | train |
exoplatform/jcr | applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java | BackupClientImpl.getObject | private Object getObject(Class cl, byte[] data) throws Exception
{
JsonHandler jsonHandler = new JsonDefaultHandler();
JsonParser jsonParser = new JsonParserImpl();
InputStream inputStream = new ByteArrayInputStream(data);
jsonParser.parse(inputStream, jsonHandler);
JsonValue json... | java | private Object getObject(Class cl, byte[] data) throws Exception
{
JsonHandler jsonHandler = new JsonDefaultHandler();
JsonParser jsonParser = new JsonParserImpl();
InputStream inputStream = new ByteArrayInputStream(data);
jsonParser.parse(inputStream, jsonHandler);
JsonValue json... | [
"private",
"Object",
"getObject",
"(",
"Class",
"cl",
",",
"byte",
"[",
"]",
"data",
")",
"throws",
"Exception",
"{",
"JsonHandler",
"jsonHandler",
"=",
"new",
"JsonDefaultHandler",
"(",
")",
";",
"JsonParser",
"jsonParser",
"=",
"new",
"JsonParserImpl",
"(",
... | Will be created the Object from JSON binary data.
@param cl
Class
@param data
binary data (JSON)
@return Object
@throws Exception
will be generated Exception | [
"Will",
"be",
"created",
"the",
"Object",
"from",
"JSON",
"binary",
"data",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java#L1008-L1017 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropPatchCommand.java | PropPatchCommand.propPatch | public Response propPatch(Session session, String path, HierarchicalProperty body, List<String> tokens,
String baseURI)
{
try
{
lockHolder.checkLock(session, path, tokens);
Node node = (Node)session.getItem(path);
WebDavNamespaceContext nsContext = new WebDav... | java | public Response propPatch(Session session, String path, HierarchicalProperty body, List<String> tokens,
String baseURI)
{
try
{
lockHolder.checkLock(session, path, tokens);
Node node = (Node)session.getItem(path);
WebDavNamespaceContext nsContext = new WebDav... | [
"public",
"Response",
"propPatch",
"(",
"Session",
"session",
",",
"String",
"path",
",",
"HierarchicalProperty",
"body",
",",
"List",
"<",
"String",
">",
"tokens",
",",
"String",
"baseURI",
")",
"{",
"try",
"{",
"lockHolder",
".",
"checkLock",
"(",
"session... | Webdav Proppatch method method implementation.
@param session current session
@param path resource path
@param body request body
@param tokens tokens
@param baseURI base uri
@return the instance of javax.ws.rs.core.Response | [
"Webdav",
"Proppatch",
"method",
"method",
"implementation",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropPatchCommand.java#L82-L126 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropPatchCommand.java | PropPatchCommand.setList | public List<HierarchicalProperty> setList(HierarchicalProperty request)
{
HierarchicalProperty set = request.getChild(new QName("DAV:", "set"));
HierarchicalProperty prop = set.getChild(new QName("DAV:", "prop"));
List<HierarchicalProperty> setList = prop.getChildren();
return setList;
... | java | public List<HierarchicalProperty> setList(HierarchicalProperty request)
{
HierarchicalProperty set = request.getChild(new QName("DAV:", "set"));
HierarchicalProperty prop = set.getChild(new QName("DAV:", "prop"));
List<HierarchicalProperty> setList = prop.getChildren();
return setList;
... | [
"public",
"List",
"<",
"HierarchicalProperty",
">",
"setList",
"(",
"HierarchicalProperty",
"request",
")",
"{",
"HierarchicalProperty",
"set",
"=",
"request",
".",
"getChild",
"(",
"new",
"QName",
"(",
"\"DAV:\"",
",",
"\"set\"",
")",
")",
";",
"HierarchicalPro... | List of properties to set.
@param request request body
@return list of properties to set. | [
"List",
"of",
"properties",
"to",
"set",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropPatchCommand.java#L134-L140 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropPatchCommand.java | PropPatchCommand.removeList | public List<HierarchicalProperty> removeList(HierarchicalProperty request)
{
HierarchicalProperty remove = request.getChild(new QName("DAV:", "remove"));
HierarchicalProperty prop = remove.getChild(new QName("DAV:", "prop"));
List<HierarchicalProperty> removeList = prop.getChildren();
re... | java | public List<HierarchicalProperty> removeList(HierarchicalProperty request)
{
HierarchicalProperty remove = request.getChild(new QName("DAV:", "remove"));
HierarchicalProperty prop = remove.getChild(new QName("DAV:", "prop"));
List<HierarchicalProperty> removeList = prop.getChildren();
re... | [
"public",
"List",
"<",
"HierarchicalProperty",
">",
"removeList",
"(",
"HierarchicalProperty",
"request",
")",
"{",
"HierarchicalProperty",
"remove",
"=",
"request",
".",
"getChild",
"(",
"new",
"QName",
"(",
"\"DAV:\"",
",",
"\"remove\"",
")",
")",
";",
"Hierar... | List of properties to remove.
@param request request body
@return list of properties to remove. | [
"List",
"of",
"properties",
"to",
"remove",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropPatchCommand.java#L148-L154 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/OrderPatchCommand.java | OrderPatchCommand.orderPatch | public Response orderPatch(Session session, String path, HierarchicalProperty body, String baseURI)
{
try
{
Node node = (Node)session.getItem(path);
List<OrderMember> members = getMembers(body);
WebDavNamespaceContext nsContext = new WebDavNamespaceContext(session);
... | java | public Response orderPatch(Session session, String path, HierarchicalProperty body, String baseURI)
{
try
{
Node node = (Node)session.getItem(path);
List<OrderMember> members = getMembers(body);
WebDavNamespaceContext nsContext = new WebDavNamespaceContext(session);
... | [
"public",
"Response",
"orderPatch",
"(",
"Session",
"session",
",",
"String",
"path",
",",
"HierarchicalProperty",
"body",
",",
"String",
"baseURI",
")",
"{",
"try",
"{",
"Node",
"node",
"=",
"(",
"Node",
")",
"session",
".",
"getItem",
"(",
"path",
")",
... | Webdav OrderPatch method implementation.
@param session current session
@param path resource path
@param body responce body
@param baseURI base uri
@return the instance of javax.ws.rs.core.Response | [
"Webdav",
"OrderPatch",
"method",
"implementation",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/OrderPatchCommand.java#L74-L107 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/OrderPatchCommand.java | OrderPatchCommand.getMembers | protected List<OrderMember> getMembers(HierarchicalProperty body)
{
ArrayList<OrderMember> members = new ArrayList<OrderMember>();
List<HierarchicalProperty> childs = body.getChildren();
for (int i = 0; i < childs.size(); i++)
{
OrderMember member = new OrderMember(childs.get(i... | java | protected List<OrderMember> getMembers(HierarchicalProperty body)
{
ArrayList<OrderMember> members = new ArrayList<OrderMember>();
List<HierarchicalProperty> childs = body.getChildren();
for (int i = 0; i < childs.size(); i++)
{
OrderMember member = new OrderMember(childs.get(i... | [
"protected",
"List",
"<",
"OrderMember",
">",
"getMembers",
"(",
"HierarchicalProperty",
"body",
")",
"{",
"ArrayList",
"<",
"OrderMember",
">",
"members",
"=",
"new",
"ArrayList",
"<",
"OrderMember",
">",
"(",
")",
";",
"List",
"<",
"HierarchicalProperty",
">... | Get oder members.
@param body request body.
@return list of members | [
"Get",
"oder",
"members",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/OrderPatchCommand.java#L115-L125 | train |
exoplatform/jcr | exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/OrderPatchCommand.java | OrderPatchCommand.doOrder | protected boolean doOrder(Node parentNode, List<OrderMember> members)
{
boolean success = true;
for (int i = 0; i < members.size(); i++)
{
OrderMember member = members.get(i);
int status = HTTPStatus.OK;
try
{
parentNode.getSession().refr... | java | protected boolean doOrder(Node parentNode, List<OrderMember> members)
{
boolean success = true;
for (int i = 0; i < members.size(); i++)
{
OrderMember member = members.get(i);
int status = HTTPStatus.OK;
try
{
parentNode.getSession().refr... | [
"protected",
"boolean",
"doOrder",
"(",
"Node",
"parentNode",
",",
"List",
"<",
"OrderMember",
">",
"members",
")",
"{",
"boolean",
"success",
"=",
"true",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"members",
".",
"size",
"(",
")",
";",
... | Order members.
@param parentNode parent node
@param members members
@return true if can order | [
"Order",
"members",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/OrderPatchCommand.java#L134-L230 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBRestore.java | DBRestore.spoolInputStream | private InputStream spoolInputStream(ObjectReader in, long contentLen) throws IOException
{
byte[] buffer = new byte[0];
byte[] tmpBuff;
long readLen = 0;
File sf = null;
OutputStream sfout = null;
try
{
while (true)
{
int needToRead = contentL... | java | private InputStream spoolInputStream(ObjectReader in, long contentLen) throws IOException
{
byte[] buffer = new byte[0];
byte[] tmpBuff;
long readLen = 0;
File sf = null;
OutputStream sfout = null;
try
{
while (true)
{
int needToRead = contentL... | [
"private",
"InputStream",
"spoolInputStream",
"(",
"ObjectReader",
"in",
",",
"long",
"contentLen",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"buffer",
"=",
"new",
"byte",
"[",
"0",
"]",
";",
"byte",
"[",
"]",
"tmpBuff",
";",
"long",
"readLen",
... | Spool input stream. | [
"Spool",
"input",
"stream",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBRestore.java#L639-L707 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/ItemDataRemoveVisitor.java | ItemDataRemoveVisitor.copyItemDataDelete | protected TransientItemData copyItemDataDelete(final ItemData item) throws RepositoryException
{
if (item == null)
{
return null;
}
// make a copy
if (item.isNode())
{
final NodeData node = (NodeData)item;
// the node ACL can't be are null as ACL mana... | java | protected TransientItemData copyItemDataDelete(final ItemData item) throws RepositoryException
{
if (item == null)
{
return null;
}
// make a copy
if (item.isNode())
{
final NodeData node = (NodeData)item;
// the node ACL can't be are null as ACL mana... | [
"protected",
"TransientItemData",
"copyItemDataDelete",
"(",
"final",
"ItemData",
"item",
")",
"throws",
"RepositoryException",
"{",
"if",
"(",
"item",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"// make a copy",
"if",
"(",
"item",
".",
"isNode",
"(",... | Copy ItemData for Delete operation.
@param item
ItemData
@return TransientItemData
@throws RepositoryException
if error occurs | [
"Copy",
"ItemData",
"for",
"Delete",
"operation",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/ItemDataRemoveVisitor.java#L309-L343 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractItemDataCopyVisitor.java | AbstractItemDataCopyVisitor.copyValues | protected List<ValueData> copyValues(PropertyData property) throws RepositoryException
{
List<ValueData> src = property.getValues();
List<ValueData> copy = new ArrayList<ValueData>(src.size());
try
{
for (ValueData vd : src)
{
copy.add(ValueDataUtil.creat... | java | protected List<ValueData> copyValues(PropertyData property) throws RepositoryException
{
List<ValueData> src = property.getValues();
List<ValueData> copy = new ArrayList<ValueData>(src.size());
try
{
for (ValueData vd : src)
{
copy.add(ValueDataUtil.creat... | [
"protected",
"List",
"<",
"ValueData",
">",
"copyValues",
"(",
"PropertyData",
"property",
")",
"throws",
"RepositoryException",
"{",
"List",
"<",
"ValueData",
">",
"src",
"=",
"property",
".",
"getValues",
"(",
")",
";",
"List",
"<",
"ValueData",
">",
"copy... | Do actual copy of the property ValueDatas.
@param property PropertyData
@return List of ValueData
@throws RepositoryException if I/O error occurs | [
"Do",
"actual",
"copy",
"of",
"the",
"property",
"ValueDatas",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractItemDataCopyVisitor.java#L58-L75 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/NodeTypeDataBuilder.java | NodeTypeDataBuilder.build | public NodeTypeData build()
{
if (nodeDefinitionDataBuilders.size() > 0)
{
childNodeDefinitions = new NodeDefinitionData[nodeDefinitionDataBuilders.size()];
for (int i = 0; i < childNodeDefinitions.length; i++)
{
childNodeDefinitions[i] = nodeDefinitionDataBuilders.... | java | public NodeTypeData build()
{
if (nodeDefinitionDataBuilders.size() > 0)
{
childNodeDefinitions = new NodeDefinitionData[nodeDefinitionDataBuilders.size()];
for (int i = 0; i < childNodeDefinitions.length; i++)
{
childNodeDefinitions[i] = nodeDefinitionDataBuilders.... | [
"public",
"NodeTypeData",
"build",
"(",
")",
"{",
"if",
"(",
"nodeDefinitionDataBuilders",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"childNodeDefinitions",
"=",
"new",
"NodeDefinitionData",
"[",
"nodeDefinitionDataBuilders",
".",
"size",
"(",
")",
"]",
";",
... | Creates instance of NodeTypeData using parameters stored in this object.
@return NodeTypeData | [
"Creates",
"instance",
"of",
"NodeTypeData",
"using",
"parameters",
"stored",
"in",
"this",
"object",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/NodeTypeDataBuilder.java#L378-L398 | train |
exoplatform/jcr | exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/utils/VersionHistoryUtils.java | VersionHistoryUtils.createVersion | public static void createVersion(Node nodeVersioning) throws Exception {
if(!nodeVersioning.isNodeType(NT_FILE)) {
if(log.isDebugEnabled()){
log.debug("Version history is not impact with non-nt:file documents, there'is not any version created.");
}
return;
}
if(!nodeVersioning.is... | java | public static void createVersion(Node nodeVersioning) throws Exception {
if(!nodeVersioning.isNodeType(NT_FILE)) {
if(log.isDebugEnabled()){
log.debug("Version history is not impact with non-nt:file documents, there'is not any version created.");
}
return;
}
if(!nodeVersioning.is... | [
"public",
"static",
"void",
"createVersion",
"(",
"Node",
"nodeVersioning",
")",
"throws",
"Exception",
"{",
"if",
"(",
"!",
"nodeVersioning",
".",
"isNodeType",
"(",
"NT_FILE",
")",
")",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
... | Create new version and clear redundant versions
@param nodeVersioning | [
"Create",
"new",
"version",
"and",
"clear",
"redundant",
"versions"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/utils/VersionHistoryUtils.java#L75-L105 | train |
exoplatform/jcr | exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/utils/VersionHistoryUtils.java | VersionHistoryUtils.removeRedundant | private static void removeRedundant(Node nodeVersioning) throws Exception{
VersionHistory versionHistory = nodeVersioning.getVersionHistory();
String baseVersion = nodeVersioning.getBaseVersion().getName();
String rootVersion = nodeVersioning.getVersionHistory().getRootVersion().getName();
VersionIterat... | java | private static void removeRedundant(Node nodeVersioning) throws Exception{
VersionHistory versionHistory = nodeVersioning.getVersionHistory();
String baseVersion = nodeVersioning.getBaseVersion().getName();
String rootVersion = nodeVersioning.getVersionHistory().getRootVersion().getName();
VersionIterat... | [
"private",
"static",
"void",
"removeRedundant",
"(",
"Node",
"nodeVersioning",
")",
"throws",
"Exception",
"{",
"VersionHistory",
"versionHistory",
"=",
"nodeVersioning",
".",
"getVersionHistory",
"(",
")",
";",
"String",
"baseVersion",
"=",
"nodeVersioning",
".",
"... | Remove redundant version
- Remove versions has been expired
- Remove versions over max allow
@param nodeVersioning
@throws Exception | [
"Remove",
"redundant",
"version",
"-",
"Remove",
"versions",
"has",
"been",
"expired",
"-",
"Remove",
"versions",
"over",
"max",
"allow"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/utils/VersionHistoryUtils.java#L114-L141 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java | ISPNCacheWorkspaceStorageCache.getChildProps | protected List<PropertyData> getChildProps(String parentId, boolean withValue)
{
return getChildProps.run(parentId, withValue);
} | java | protected List<PropertyData> getChildProps(String parentId, boolean withValue)
{
return getChildProps.run(parentId, withValue);
} | [
"protected",
"List",
"<",
"PropertyData",
">",
"getChildProps",
"(",
"String",
"parentId",
",",
"boolean",
"withValue",
")",
"{",
"return",
"getChildProps",
".",
"run",
"(",
"parentId",
",",
"withValue",
")",
";",
"}"
] | Internal get child properties.
@param parentId String
@param withValue boolean, if true only "full" Propeties can be returned
@return List of PropertyData | [
"Internal",
"get",
"child",
"properties",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java#L1244-L1247 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java | ISPNCacheWorkspaceStorageCache.putItem | protected ItemData putItem(ItemData item)
{
if (item.isNode())
{
return putNode((NodeData)item, ModifyChildOption.MODIFY);
}
else
{
return putProperty((PropertyData)item, ModifyChildOption.MODIFY);
}
} | java | protected ItemData putItem(ItemData item)
{
if (item.isNode())
{
return putNode((NodeData)item, ModifyChildOption.MODIFY);
}
else
{
return putProperty((PropertyData)item, ModifyChildOption.MODIFY);
}
} | [
"protected",
"ItemData",
"putItem",
"(",
"ItemData",
"item",
")",
"{",
"if",
"(",
"item",
".",
"isNode",
"(",
")",
")",
"{",
"return",
"putNode",
"(",
"(",
"NodeData",
")",
"item",
",",
"ModifyChildOption",
".",
"MODIFY",
")",
";",
"}",
"else",
"{",
... | Internal put Item.
@param item ItemData, new data to put in the cache
@return ItemData, previous data or null | [
"Internal",
"put",
"Item",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java#L1287-L1297 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java | ISPNCacheWorkspaceStorageCache.putNode | protected ItemData putNode(NodeData node, ModifyChildOption modifyListsOfChild)
{
if (node.getParentIdentifier() != null)
{
if (modifyListsOfChild == ModifyChildOption.NOT_MODIFY)
{
cache.putIfAbsent(new CacheQPath(getOwnerId(), node.getParentIdentifier(), node.getQPat... | java | protected ItemData putNode(NodeData node, ModifyChildOption modifyListsOfChild)
{
if (node.getParentIdentifier() != null)
{
if (modifyListsOfChild == ModifyChildOption.NOT_MODIFY)
{
cache.putIfAbsent(new CacheQPath(getOwnerId(), node.getParentIdentifier(), node.getQPat... | [
"protected",
"ItemData",
"putNode",
"(",
"NodeData",
"node",
",",
"ModifyChildOption",
"modifyListsOfChild",
")",
"{",
"if",
"(",
"node",
".",
"getParentIdentifier",
"(",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"modifyListsOfChild",
"==",
"ModifyChildOption",
".... | Internal put Node.
@param node, NodeData, new data to put in the cache
@return NodeData, previous data or null | [
"Internal",
"put",
"Node",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java#L1318-L1352 | train |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java | ISPNCacheWorkspaceStorageCache.putNullItem | protected void putNullItem(NullItemData item)
{
boolean inTransaction = cache.isTransactionActive();
try
{
if (!inTransaction)
{
cache.beginTransaction();
}
cache.setLocal(true);
if (!item.getIdentifier().equals(NullItemData.NULL_... | java | protected void putNullItem(NullItemData item)
{
boolean inTransaction = cache.isTransactionActive();
try
{
if (!inTransaction)
{
cache.beginTransaction();
}
cache.setLocal(true);
if (!item.getIdentifier().equals(NullItemData.NULL_... | [
"protected",
"void",
"putNullItem",
"(",
"NullItemData",
"item",
")",
"{",
"boolean",
"inTransaction",
"=",
"cache",
".",
"isTransactionActive",
"(",
")",
";",
"try",
"{",
"if",
"(",
"!",
"inTransaction",
")",
"{",
"cache",
".",
"beginTransaction",
"(",
")",... | Internal put NullNode.
@param item, NullItemData, new data to put in the cache | [
"Internal",
"put",
"NullNode",
"."
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java#L1379-L1409 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.