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/lucene/DefaultHighlighter.java
DefaultHighlighter.createDefaultExcerpt
protected String createDefaultExcerpt(String text, String excerptStart, String excerptEnd, String fragmentStart, String fragmentEnd, ...
java
protected String createDefaultExcerpt(String text, String excerptStart, String excerptEnd, String fragmentStart, String fragmentEnd, ...
[ "protected", "String", "createDefaultExcerpt", "(", "String", "text", ",", "String", "excerptStart", ",", "String", "excerptEnd", ",", "String", "fragmentStart", ",", "String", "fragmentEnd", ",", "int", "maxLength", ")", "throws", "IOException", "{", "StringReader"...
Creates a default excerpt with the given text. @param text the text. @param excerptStart the excerpt start. @param excerptEnd the excerpt end. @param fragmentStart the fragement start. @param fragmentEnd the fragment end. @param maxLength the maximum length of the fragment. @return a default excerpt. @throws IOExcepti...
[ "Creates", "a", "default", "excerpt", "with", "the", "given", "text", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DefaultHighlighter.java#L371-L399
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java
LinkedWorkspaceStorageCacheImpl.putItem
protected void putItem(final ItemData data) { cache.put(new CacheId(data.getIdentifier()), new CacheValue(data, System.currentTimeMillis() + liveTime)); cache.put(new CacheQPath(data.getParentIdentifier(), data.getQPath(), ItemType.getItemType(data)), new CacheValue(data, System.currentTimeMilli...
java
protected void putItem(final ItemData data) { cache.put(new CacheId(data.getIdentifier()), new CacheValue(data, System.currentTimeMillis() + liveTime)); cache.put(new CacheQPath(data.getParentIdentifier(), data.getQPath(), ItemType.getItemType(data)), new CacheValue(data, System.currentTimeMilli...
[ "protected", "void", "putItem", "(", "final", "ItemData", "data", ")", "{", "cache", ".", "put", "(", "new", "CacheId", "(", "data", ".", "getIdentifier", "(", ")", ")", ",", "new", "CacheValue", "(", "data", ",", "System", ".", "currentTimeMillis", "(",...
Put item in cache C. @param data
[ "Put", "item", "in", "cache", "C", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java#L937-L942
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java
LinkedWorkspaceStorageCacheImpl.getItem
protected ItemData getItem(final String identifier) { long start = System.currentTimeMillis(); try { final CacheId k = new CacheId(identifier); final CacheValue v = cache.get(k); if (v != null) { final ItemData c = v.getItem(); if (v.getE...
java
protected ItemData getItem(final String identifier) { long start = System.currentTimeMillis(); try { final CacheId k = new CacheId(identifier); final CacheValue v = cache.get(k); if (v != null) { final ItemData c = v.getItem(); if (v.getE...
[ "protected", "ItemData", "getItem", "(", "final", "String", "identifier", ")", "{", "long", "start", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "try", "{", "final", "CacheId", "k", "=", "new", "CacheId", "(", "identifier", ")", ";", "final", ...
Get item from cache C by item id. Checks is it expired, calcs statistics. @param identifier @return item
[ "Get", "item", "from", "cache", "C", "by", "item", "id", ".", "Checks", "is", "it", "expired", "calcs", "statistics", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java#L1366-L1419
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java
LinkedWorkspaceStorageCacheImpl.setLiveTime
public void setLiveTime(long liveTime) { writeLock.lock(); try { this.liveTime = liveTime; } finally { writeLock.unlock(); } LOG .info(name + " : set liveTime=" + liveTime + "ms. New value will be applied to items cached from this moment."); ...
java
public void setLiveTime(long liveTime) { writeLock.lock(); try { this.liveTime = liveTime; } finally { writeLock.unlock(); } LOG .info(name + " : set liveTime=" + liveTime + "ms. New value will be applied to items cached from this moment."); ...
[ "public", "void", "setLiveTime", "(", "long", "liveTime", ")", "{", "writeLock", ".", "lock", "(", ")", ";", "try", "{", "this", ".", "liveTime", "=", "liveTime", ";", "}", "finally", "{", "writeLock", ".", "unlock", "(", ")", ";", "}", "LOG", ".", ...
Set liveTime of newly cached items. @param liveTime
[ "Set", "liveTime", "of", "newly", "cached", "items", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java#L1770-L1783
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java
LinkedWorkspaceStorageCacheImpl.removeItem
protected void removeItem(final ItemData item) { final String itemId = item.getIdentifier(); cache.remove(new CacheId(itemId)); final CacheValue v2 = cache.remove(new CacheQPath(item.getParentIdentifier(), item.getQPath(), ItemType.getItemType(item))); if (v2 != null && !v2.getItem...
java
protected void removeItem(final ItemData item) { final String itemId = item.getIdentifier(); cache.remove(new CacheId(itemId)); final CacheValue v2 = cache.remove(new CacheQPath(item.getParentIdentifier(), item.getQPath(), ItemType.getItemType(item))); if (v2 != null && !v2.getItem...
[ "protected", "void", "removeItem", "(", "final", "ItemData", "item", ")", "{", "final", "String", "itemId", "=", "item", ".", "getIdentifier", "(", ")", ";", "cache", ".", "remove", "(", "new", "CacheId", "(", "itemId", ")", ")", ";", "final", "CacheValu...
Remove item from cache C. @param item
[ "Remove", "item", "from", "cache", "C", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java#L1790-L1803
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java
LinkedWorkspaceStorageCacheImpl.removeChildProperty
protected PropertyData removeChildProperty(final String parentIdentifier, final String childIdentifier) { final List<PropertyData> childProperties = propertiesCache.get(parentIdentifier); if (childProperties != null) { synchronized (childProperties) { // [PN] 17.01.07 ...
java
protected PropertyData removeChildProperty(final String parentIdentifier, final String childIdentifier) { final List<PropertyData> childProperties = propertiesCache.get(parentIdentifier); if (childProperties != null) { synchronized (childProperties) { // [PN] 17.01.07 ...
[ "protected", "PropertyData", "removeChildProperty", "(", "final", "String", "parentIdentifier", ",", "final", "String", "childIdentifier", ")", "{", "final", "List", "<", "PropertyData", ">", "childProperties", "=", "propertiesCache", ".", "get", "(", "parentIdentifie...
Remove property by id if parent properties are cached in CP. @param parentIdentifier - parent id @param childIdentifier - property id @return removed property or null if property not cached or parent properties are not cached
[ "Remove", "property", "by", "id", "if", "parent", "properties", "are", "cached", "in", "CP", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java#L2065-L2088
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java
LinkedWorkspaceStorageCacheImpl.removeChildNode
protected NodeData removeChildNode(final String parentIdentifier, final String childIdentifier) { final List<NodeData> childNodes = nodesCache.get(parentIdentifier); if (childNodes != null) { synchronized (childNodes) { // [PN] 17.01.07 for (Iterator<NodeData> i = chil...
java
protected NodeData removeChildNode(final String parentIdentifier, final String childIdentifier) { final List<NodeData> childNodes = nodesCache.get(parentIdentifier); if (childNodes != null) { synchronized (childNodes) { // [PN] 17.01.07 for (Iterator<NodeData> i = chil...
[ "protected", "NodeData", "removeChildNode", "(", "final", "String", "parentIdentifier", ",", "final", "String", "childIdentifier", ")", "{", "final", "List", "<", "NodeData", ">", "childNodes", "=", "nodesCache", ".", "get", "(", "parentIdentifier", ")", ";", "i...
Remove child node by id if parent child nodes are cached in CN. @param parentIdentifier - parebt if @param childIdentifier - node id @return removed node or null if node not cached or parent child nodes are not cached
[ "Remove", "child", "node", "by", "id", "if", "parent", "child", "nodes", "are", "cached", "in", "CN", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java#L2099-L2118
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java
LinkedWorkspaceStorageCacheImpl.dump
String dump() { StringBuilder res = new StringBuilder(); for (Map.Entry<CacheKey, CacheValue> ce : cache.entrySet()) { res.append(ce.getKey().hashCode()); res.append("\t\t"); res.append(ce.getValue().getItem().getIdentifier()); res.append(", "); res.appe...
java
String dump() { StringBuilder res = new StringBuilder(); for (Map.Entry<CacheKey, CacheValue> ce : cache.entrySet()) { res.append(ce.getKey().hashCode()); res.append("\t\t"); res.append(ce.getValue().getItem().getIdentifier()); res.append(", "); res.appe...
[ "String", "dump", "(", ")", "{", "StringBuilder", "res", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<", "CacheKey", ",", "CacheValue", ">", "ce", ":", "cache", ".", "entrySet", "(", ")", ")", "{", "res", ".", "app...
For debug.
[ "For", "debug", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java#L2135-L2153
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java
JobRepositoryRestore.restore
final protected void restore() throws RepositoryRestoreExeption { try { stateRestore = REPOSITORY_RESTORE_STARTED; startTime = Calendar.getInstance(); restoreRepository(); stateRestore = REPOSITORY_RESTORE_SUCCESSFUL; endTime = Calendar.getInstance(); ...
java
final protected void restore() throws RepositoryRestoreExeption { try { stateRestore = REPOSITORY_RESTORE_STARTED; startTime = Calendar.getInstance(); restoreRepository(); stateRestore = REPOSITORY_RESTORE_SUCCESSFUL; endTime = Calendar.getInstance(); ...
[ "final", "protected", "void", "restore", "(", ")", "throws", "RepositoryRestoreExeption", "{", "try", "{", "stateRestore", "=", "REPOSITORY_RESTORE_STARTED", ";", "startTime", "=", "Calendar", ".", "getInstance", "(", ")", ";", "restoreRepository", "(", ")", ";", ...
Restore repository. Provide information about start and finish process. @throws RepositoryRestoreExeption if exception occurred during restore
[ "Restore", "repository", ".", "Provide", "information", "about", "start", "and", "finish", "process", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java#L139-L165
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java
JobRepositoryRestore.removeRepository
protected void removeRepository(RepositoryService repositoryService, String repositoryName) throws RepositoryException, RepositoryConfigurationException { ManageableRepository mr = null; try { mr = repositoryService.getRepository(repositoryName); } catch (Repositor...
java
protected void removeRepository(RepositoryService repositoryService, String repositoryName) throws RepositoryException, RepositoryConfigurationException { ManageableRepository mr = null; try { mr = repositoryService.getRepository(repositoryName); } catch (Repositor...
[ "protected", "void", "removeRepository", "(", "RepositoryService", "repositoryService", ",", "String", "repositoryName", ")", "throws", "RepositoryException", ",", "RepositoryConfigurationException", "{", "ManageableRepository", "mr", "=", "null", ";", "try", "{", "mr", ...
Remove repository. @param repositoryService RepositoryService, the repository service @param repositoryName String, the repository name @throws RepositoryException will be generated the RepositoryException @throws RepositoryConfigurationException
[ "Remove", "repository", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java#L294-L319
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java
JobRepositoryRestore.closeAllSession
private void closeAllSession(ManageableRepository mr) throws NoSuchWorkspaceException { for (String wsName : mr.getWorkspaceNames()) { if (!mr.canRemoveWorkspace(wsName)) { WorkspaceContainerFacade wc = mr.getWorkspaceContainer(wsName); SessionRegistry sessionReg...
java
private void closeAllSession(ManageableRepository mr) throws NoSuchWorkspaceException { for (String wsName : mr.getWorkspaceNames()) { if (!mr.canRemoveWorkspace(wsName)) { WorkspaceContainerFacade wc = mr.getWorkspaceContainer(wsName); SessionRegistry sessionReg...
[ "private", "void", "closeAllSession", "(", "ManageableRepository", "mr", ")", "throws", "NoSuchWorkspaceException", "{", "for", "(", "String", "wsName", ":", "mr", ".", "getWorkspaceNames", "(", ")", ")", "{", "if", "(", "!", "mr", ".", "canRemoveWorkspace", "...
Close all open session in repository @param mr @throws NoSuchWorkspaceException
[ "Close", "all", "open", "session", "in", "repository" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java#L385-L396
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/DefaultItemDataCopyVisitor.java
DefaultItemDataCopyVisitor.findItemStates
protected List<ItemState> findItemStates(QPath itemPath) { List<ItemState> istates = new ArrayList<ItemState>(); for (ItemState istate : itemAddStates) { if (istate.getData().getQPath().equals(itemPath)) istates.add(istate); } return istates; }
java
protected List<ItemState> findItemStates(QPath itemPath) { List<ItemState> istates = new ArrayList<ItemState>(); for (ItemState istate : itemAddStates) { if (istate.getData().getQPath().equals(itemPath)) istates.add(istate); } return istates; }
[ "protected", "List", "<", "ItemState", ">", "findItemStates", "(", "QPath", "itemPath", ")", "{", "List", "<", "ItemState", ">", "istates", "=", "new", "ArrayList", "<", "ItemState", ">", "(", ")", ";", "for", "(", "ItemState", "istate", ":", "itemAddState...
Find item states. @param itemPath item path @return List of states
[ "Find", "item", "states", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/DefaultItemDataCopyVisitor.java#L243-L252
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/DefaultItemDataCopyVisitor.java
DefaultItemDataCopyVisitor.findLastItemState
protected ItemState findLastItemState(QPath itemPath) { for (int i = itemAddStates.size() - 1; i >= 0; i--) { ItemState istate = itemAddStates.get(i); if (istate.getData().getQPath().equals(itemPath)) return istate; } return null; }
java
protected ItemState findLastItemState(QPath itemPath) { for (int i = itemAddStates.size() - 1; i >= 0; i--) { ItemState istate = itemAddStates.get(i); if (istate.getData().getQPath().equals(itemPath)) return istate; } return null; }
[ "protected", "ItemState", "findLastItemState", "(", "QPath", "itemPath", ")", "{", "for", "(", "int", "i", "=", "itemAddStates", ".", "size", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "ItemState", "istate", "=", "itemAddStates"...
Find last ItemState. @param itemPath item path @return ItemState
[ "Find", "last", "ItemState", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/DefaultItemDataCopyVisitor.java#L260-L269
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDStreamReader.java
CNDStreamReader.read
public List<NodeTypeData> read(InputStream is) throws RepositoryException { try { if (is != null) { /** Lexing input stream */ CNDLexer lex = new CNDLexer(new ANTLRInputStream(is)); CommonTokenStream tokens = new CommonTokenStream(lex); /*...
java
public List<NodeTypeData> read(InputStream is) throws RepositoryException { try { if (is != null) { /** Lexing input stream */ CNDLexer lex = new CNDLexer(new ANTLRInputStream(is)); CommonTokenStream tokens = new CommonTokenStream(lex); /*...
[ "public", "List", "<", "NodeTypeData", ">", "read", "(", "InputStream", "is", ")", "throws", "RepositoryException", "{", "try", "{", "if", "(", "is", "!=", "null", ")", "{", "/** Lexing input stream */", "CNDLexer", "lex", "=", "new", "CNDLexer", "(", "new",...
Method which reads input stream as compact node type definition string. If any namespaces are placed in stream they are registered through namespace registry. @param is {@link InputStream} to read from. @return List of parsed nodetypes @throws RepositoryException Exception is thrown when wrong input is provided in str...
[ "Method", "which", "reads", "input", "stream", "as", "compact", "node", "type", "definition", "string", ".", "If", "any", "namespaces", "are", "placed", "in", "stream", "they", "are", "registered", "through", "namespace", "registry", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDStreamReader.java#L73-L120
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanerTool.java
DBCleanerTool.execute
protected void execute(List<String> scripts) throws SQLException { SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION); // set needed auto commit mode boolean autoCommit = connection.getAutoCommit(); if (autoCommit != this.autoCommit) { ...
java
protected void execute(List<String> scripts) throws SQLException { SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION); // set needed auto commit mode boolean autoCommit = connection.getAutoCommit(); if (autoCommit != this.autoCommit) { ...
[ "protected", "void", "execute", "(", "List", "<", "String", ">", "scripts", ")", "throws", "SQLException", "{", "SecurityHelper", ".", "validateSecurityPermission", "(", "JCRRuntimePermissions", ".", "MANAGE_REPOSITORY_PERMISSION", ")", ";", "// set needed auto commit mod...
Execute script on database. Set auto commit mode if needed. @param scripts the scripts for execution @throws SQLException
[ "Execute", "script", "on", "database", ".", "Set", "auto", "commit", "mode", "if", "needed", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanerTool.java#L159-L204
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DocOrderScoreNodeIterator.java
DocOrderScoreNodeIterator.initOrderedIterator
private void initOrderedIterator() { if (orderedNodes != null) { return; } long time = 0; if (LOG.isDebugEnabled()) { time = System.currentTimeMillis(); } ScoreNode[][] nodes = (ScoreNode[][])scoreNodes.toArray(new ScoreNode[scoreNodes.size()][]); ...
java
private void initOrderedIterator() { if (orderedNodes != null) { return; } long time = 0; if (LOG.isDebugEnabled()) { time = System.currentTimeMillis(); } ScoreNode[][] nodes = (ScoreNode[][])scoreNodes.toArray(new ScoreNode[scoreNodes.size()][]); ...
[ "private", "void", "initOrderedIterator", "(", ")", "{", "if", "(", "orderedNodes", "!=", "null", ")", "{", "return", ";", "}", "long", "time", "=", "0", ";", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "time", "=", "System", ".", ...
Initializes the NodeIterator in document order
[ "Initializes", "the", "NodeIterator", "in", "document", "order" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DocOrderScoreNodeIterator.java#L169-L225
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/JCRRestore.java
JCRRestore.getFullBackupFile
public static File getFullBackupFile(File restoreDir) { Pattern p = Pattern.compile(".+\\.0"); for (File f : PrivilegedFileHelper.listFiles(restoreDir, new FileFilter() { public boolean accept(File pathname) { Pattern p = Pattern.compile(".+\\.[0-9]+"); ...
java
public static File getFullBackupFile(File restoreDir) { Pattern p = Pattern.compile(".+\\.0"); for (File f : PrivilegedFileHelper.listFiles(restoreDir, new FileFilter() { public boolean accept(File pathname) { Pattern p = Pattern.compile(".+\\.[0-9]+"); ...
[ "public", "static", "File", "getFullBackupFile", "(", "File", "restoreDir", ")", "{", "Pattern", "p", "=", "Pattern", ".", "compile", "(", "\".+\\\\.0\"", ")", ";", "for", "(", "File", "f", ":", "PrivilegedFileHelper", ".", "listFiles", "(", "restoreDir", ",...
Returns file with full backup. In case of RDBMS backup it may be a directory. @param restoreDir @return
[ "Returns", "file", "with", "full", "backup", ".", "In", "case", "of", "RDBMS", "backup", "it", "may", "be", "a", "directory", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/JCRRestore.java#L94-L116
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/JCRRestore.java
JCRRestore.getIncrementalFiles
public static List<File> getIncrementalFiles(File restoreDir) { ArrayList<File> list = new ArrayList<File>(); Pattern fullBackupPattern = Pattern.compile(".+\\.0"); for (File f : PrivilegedFileHelper.listFiles(restoreDir, new FileFilter() { public boolean accept(File pathna...
java
public static List<File> getIncrementalFiles(File restoreDir) { ArrayList<File> list = new ArrayList<File>(); Pattern fullBackupPattern = Pattern.compile(".+\\.0"); for (File f : PrivilegedFileHelper.listFiles(restoreDir, new FileFilter() { public boolean accept(File pathna...
[ "public", "static", "List", "<", "File", ">", "getIncrementalFiles", "(", "File", "restoreDir", ")", "{", "ArrayList", "<", "File", ">", "list", "=", "new", "ArrayList", "<", "File", ">", "(", ")", ";", "Pattern", "fullBackupPattern", "=", "Pattern", ".", ...
Get list of incremental backup files. @param restoreDir @return list of files
[ "Get", "list", "of", "incremental", "backup", "files", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/JCRRestore.java#L124-L147
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/JCRRestore.java
JCRRestore.incrementalRestore
public void incrementalRestore(File incrementalBackupFile) throws FileNotFoundException, IOException, ClassNotFoundException, RepositoryException { ObjectInputStream ois = null; try { ois = new ObjectInputStream(PrivilegedFileHelper.fileInputStream(incrementalBackupFile)); ...
java
public void incrementalRestore(File incrementalBackupFile) throws FileNotFoundException, IOException, ClassNotFoundException, RepositoryException { ObjectInputStream ois = null; try { ois = new ObjectInputStream(PrivilegedFileHelper.fileInputStream(incrementalBackupFile)); ...
[ "public", "void", "incrementalRestore", "(", "File", "incrementalBackupFile", ")", "throws", "FileNotFoundException", ",", "IOException", ",", "ClassNotFoundException", ",", "RepositoryException", "{", "ObjectInputStream", "ois", "=", "null", ";", "try", "{", "ois", "...
Perform incremental restore operation. @param incrementalBackupFile incremental backup file @throws FileNotFoundException @throws IOException @throws ClassNotFoundException @throws RepositoryException
[ "Perform", "incremental", "restore", "operation", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/JCRRestore.java#L159-L191
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ChangesItem.java
ChangesItem.getNodeChangedSize
public long getNodeChangedSize(String nodePath) { Long delta = calculatedChangedNodesSize.get(nodePath); return delta == null ? 0 : delta; }
java
public long getNodeChangedSize(String nodePath) { Long delta = calculatedChangedNodesSize.get(nodePath); return delta == null ? 0 : delta; }
[ "public", "long", "getNodeChangedSize", "(", "String", "nodePath", ")", "{", "Long", "delta", "=", "calculatedChangedNodesSize", ".", "get", "(", "nodePath", ")", ";", "return", "delta", "==", "null", "?", "0", ":", "delta", ";", "}" ]
Returns node data changed size if exists or zero otherwise.
[ "Returns", "node", "data", "changed", "size", "if", "exists", "or", "zero", "otherwise", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ChangesItem.java#L94-L98
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ChangesItem.java
ChangesItem.merge
public void merge(ChangesItem changesItem) { workspaceChangedSize += changesItem.getWorkspaceChangedSize(); for (Entry<String, Long> changesEntry : changesItem.calculatedChangedNodesSize.entrySet()) { String nodePath = changesEntry.getKey(); Long currentDelta = changesEntry.getVa...
java
public void merge(ChangesItem changesItem) { workspaceChangedSize += changesItem.getWorkspaceChangedSize(); for (Entry<String, Long> changesEntry : changesItem.calculatedChangedNodesSize.entrySet()) { String nodePath = changesEntry.getKey(); Long currentDelta = changesEntry.getVa...
[ "public", "void", "merge", "(", "ChangesItem", "changesItem", ")", "{", "workspaceChangedSize", "+=", "changesItem", ".", "getWorkspaceChangedSize", "(", ")", ";", "for", "(", "Entry", "<", "String", ",", "Long", ">", "changesEntry", ":", "changesItem", ".", "...
Merges current changes with new one.
[ "Merges", "current", "changes", "with", "new", "one", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ChangesItem.java#L147-L171
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/ResourceUtil.java
ResourceUtil.isFile
public static boolean isFile(Node node) { try { if (!node.isNodeType("nt:file")) return false; if (!node.getNode("jcr:content").isNodeType("nt:resource")) return false; return true; } catch (RepositoryException exc) { ...
java
public static boolean isFile(Node node) { try { if (!node.isNodeType("nt:file")) return false; if (!node.getNode("jcr:content").isNodeType("nt:resource")) return false; return true; } catch (RepositoryException exc) { ...
[ "public", "static", "boolean", "isFile", "(", "Node", "node", ")", "{", "try", "{", "if", "(", "!", "node", ".", "isNodeType", "(", "\"nt:file\"", ")", ")", "return", "false", ";", "if", "(", "!", "node", ".", "getNode", "(", "\"jcr:content\"", ")", ...
If the node is file. @param node node @return true if node is file false if not
[ "If", "the", "node", "is", "file", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/ResourceUtil.java#L64-L79
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/ResourceUtil.java
ResourceUtil.isVersion
public static boolean isVersion(Node node) { try { if (node.isNodeType("nt:version")) return true; return false; } catch (RepositoryException exc) { LOG.error(exc.getMessage(), exc); return false; } }
java
public static boolean isVersion(Node node) { try { if (node.isNodeType("nt:version")) return true; return false; } catch (RepositoryException exc) { LOG.error(exc.getMessage(), exc); return false; } }
[ "public", "static", "boolean", "isVersion", "(", "Node", "node", ")", "{", "try", "{", "if", "(", "node", ".", "isNodeType", "(", "\"nt:version\"", ")", ")", "return", "true", ";", "return", "false", ";", "}", "catch", "(", "RepositoryException", "exc", ...
If the node is version. @param node node @return true if node is version false if not
[ "If", "the", "node", "is", "version", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/ResourceUtil.java#L87-L100
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/NodeTypeDataValidator.java
NodeTypeDataValidator.validateNodeType
private void validateNodeType(NodeTypeData nodeType) throws RepositoryException { if (nodeType == null) { throw new RepositoryException("NodeType object " + nodeType + " is null"); } if (nodeType.getName() == null) { throw new RepositoryException("NodeType implementat...
java
private void validateNodeType(NodeTypeData nodeType) throws RepositoryException { if (nodeType == null) { throw new RepositoryException("NodeType object " + nodeType + " is null"); } if (nodeType.getName() == null) { throw new RepositoryException("NodeType implementat...
[ "private", "void", "validateNodeType", "(", "NodeTypeData", "nodeType", ")", "throws", "RepositoryException", "{", "if", "(", "nodeType", "==", "null", ")", "{", "throw", "new", "RepositoryException", "(", "\"NodeType object \"", "+", "nodeType", "+", "\" is null\""...
Check according the JSR-170
[ "Check", "according", "the", "JSR", "-", "170" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/NodeTypeDataValidator.java#L189-L250
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/version/VersionHistoryImpl.java
VersionHistoryImpl.version
public Version version(String versionName, boolean pool) throws VersionException, RepositoryException { JCRName jcrVersionName = locationFactory.parseJCRName(versionName); VersionImpl version = (VersionImpl)dataManager.getItem(nodeData(), new QPathEntry(jcrVersionName.getInternalName(), 1), pool...
java
public Version version(String versionName, boolean pool) throws VersionException, RepositoryException { JCRName jcrVersionName = locationFactory.parseJCRName(versionName); VersionImpl version = (VersionImpl)dataManager.getItem(nodeData(), new QPathEntry(jcrVersionName.getInternalName(), 1), pool...
[ "public", "Version", "version", "(", "String", "versionName", ",", "boolean", "pool", ")", "throws", "VersionException", ",", "RepositoryException", "{", "JCRName", "jcrVersionName", "=", "locationFactory", ".", "parseJCRName", "(", "versionName", ")", ";", "Version...
For internal use. Doesn't check InvalidItemStateException. May return unpooled Version object.
[ "For", "internal", "use", ".", "Doesn", "t", "check", "InvalidItemStateException", ".", "May", "return", "unpooled", "Version", "object", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/version/VersionHistoryImpl.java#L187-L200
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java
MigrationTool.migrate
void migrate() throws RepositoryException { try { LOG.info("Migration started."); moveOldStructure(); service.createStructure(); //Migration order is important due to removal of nodes. migrateGroups(); migrateMembershipTypes(); migrateUsers...
java
void migrate() throws RepositoryException { try { LOG.info("Migration started."); moveOldStructure(); service.createStructure(); //Migration order is important due to removal of nodes. migrateGroups(); migrateMembershipTypes(); migrateUsers...
[ "void", "migrate", "(", ")", "throws", "RepositoryException", "{", "try", "{", "LOG", ".", "info", "(", "\"Migration started.\"", ")", ";", "moveOldStructure", "(", ")", ";", "service", ".", "createStructure", "(", ")", ";", "//Migration order is important due to ...
Method that aggregates all needed migration operations in needed order. @throws RepositoryException
[ "Method", "that", "aggregates", "all", "needed", "migration", "operations", "in", "needed", "order", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java#L117-L141
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java
MigrationTool.migrationRequired
boolean migrationRequired() throws RepositoryException { Session session = service.getStorageSession(); try { if (session.itemExists(storagePathOld)) { return true; } try { Node node = (Node)session.getItem(service.getStoragePat...
java
boolean migrationRequired() throws RepositoryException { Session session = service.getStorageSession(); try { if (session.itemExists(storagePathOld)) { return true; } try { Node node = (Node)session.getItem(service.getStoragePat...
[ "boolean", "migrationRequired", "(", ")", "throws", "RepositoryException", "{", "Session", "session", "=", "service", ".", "getStorageSession", "(", ")", ";", "try", "{", "if", "(", "session", ".", "itemExists", "(", "storagePathOld", ")", ")", "{", "return", ...
Method to know if migration is need. @return true if migration is need false otherwise. @throws RepositoryException
[ "Method", "to", "know", "if", "migration", "is", "need", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java#L148-L173
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java
MigrationTool.moveOldStructure
private void moveOldStructure() throws Exception { ExtendedSession session = (ExtendedSession)service.getStorageSession(); try { if (session.itemExists(storagePathOld)) { return; } else { session.move(service.getStoragePath(), sto...
java
private void moveOldStructure() throws Exception { ExtendedSession session = (ExtendedSession)service.getStorageSession(); try { if (session.itemExists(storagePathOld)) { return; } else { session.move(service.getStoragePath(), sto...
[ "private", "void", "moveOldStructure", "(", ")", "throws", "Exception", "{", "ExtendedSession", "session", "=", "(", "ExtendedSession", ")", "service", ".", "getStorageSession", "(", ")", ";", "try", "{", "if", "(", "session", ".", "itemExists", "(", "storageP...
Method for moving old storage into temporary location. @throws Exception
[ "Method", "for", "moving", "old", "storage", "into", "temporary", "location", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java#L179-L198
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java
MigrationTool.removeOldStructure
private void removeOldStructure() throws RepositoryException { ExtendedSession session = (ExtendedSession)service.getStorageSession(); try { if (session.itemExists(storagePathOld)) { NodeIterator usersIter = ((ExtendedNode)session.getItem(usersStorageOld)).getNodesLazi...
java
private void removeOldStructure() throws RepositoryException { ExtendedSession session = (ExtendedSession)service.getStorageSession(); try { if (session.itemExists(storagePathOld)) { NodeIterator usersIter = ((ExtendedNode)session.getItem(usersStorageOld)).getNodesLazi...
[ "private", "void", "removeOldStructure", "(", ")", "throws", "RepositoryException", "{", "ExtendedSession", "session", "=", "(", "ExtendedSession", ")", "service", ".", "getStorageSession", "(", ")", ";", "try", "{", "if", "(", "session", ".", "itemExists", "(",...
Method for removing old storage from temporary location. @throws RepositoryException
[ "Method", "for", "removing", "old", "storage", "from", "temporary", "location", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java#L204-L244
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java
MigrationTool.migrateUsers
private void migrateUsers() throws Exception { Session session = service.getStorageSession(); try { if (session.itemExists(usersStorageOld)) { NodeIterator iterator = ((ExtendedNode)session.getItem(usersStorageOld)).getNodesLazily(); UserHandlerImpl uh = ((...
java
private void migrateUsers() throws Exception { Session session = service.getStorageSession(); try { if (session.itemExists(usersStorageOld)) { NodeIterator iterator = ((ExtendedNode)session.getItem(usersStorageOld)).getNodesLazily(); UserHandlerImpl uh = ((...
[ "private", "void", "migrateUsers", "(", ")", "throws", "Exception", "{", "Session", "session", "=", "service", ".", "getStorageSession", "(", ")", ";", "try", "{", "if", "(", "session", ".", "itemExists", "(", "usersStorageOld", ")", ")", "{", "NodeIterator"...
Method for users migration. @throws Exception
[ "Method", "for", "users", "migration", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java#L250-L269
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java
MigrationTool.migrateGroups
private void migrateGroups() throws Exception { Session session = service.getStorageSession(); try { if (session.itemExists(groupsStorageOld)) { NodeIterator iterator = ((ExtendedNode)session.getItem(groupsStorageOld)).getNodesLazily(); GroupHandlerImpl gh ...
java
private void migrateGroups() throws Exception { Session session = service.getStorageSession(); try { if (session.itemExists(groupsStorageOld)) { NodeIterator iterator = ((ExtendedNode)session.getItem(groupsStorageOld)).getNodesLazily(); GroupHandlerImpl gh ...
[ "private", "void", "migrateGroups", "(", ")", "throws", "Exception", "{", "Session", "session", "=", "service", ".", "getStorageSession", "(", ")", ";", "try", "{", "if", "(", "session", ".", "itemExists", "(", "groupsStorageOld", ")", ")", "{", "NodeIterato...
Method for groups migration. Must be run after users and membershipTypes migration. @throws Exception
[ "Method", "for", "groups", "migration", ".", "Must", "be", "run", "after", "users", "and", "membershipTypes", "migration", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java#L275-L296
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java
MigrationTool.migrateGroups
private void migrateGroups(Node startNode) throws Exception { NodeIterator iterator = ((ExtendedNode)startNode).getNodesLazily(); GroupHandlerImpl gh = ((GroupHandlerImpl)service.getGroupHandler()); while (iterator.hasNext()) { Node oldGroupNode = iterator.nextNode(); gh.mig...
java
private void migrateGroups(Node startNode) throws Exception { NodeIterator iterator = ((ExtendedNode)startNode).getNodesLazily(); GroupHandlerImpl gh = ((GroupHandlerImpl)service.getGroupHandler()); while (iterator.hasNext()) { Node oldGroupNode = iterator.nextNode(); gh.mig...
[ "private", "void", "migrateGroups", "(", "Node", "startNode", ")", "throws", "Exception", "{", "NodeIterator", "iterator", "=", "(", "(", "ExtendedNode", ")", "startNode", ")", ".", "getNodesLazily", "(", ")", ";", "GroupHandlerImpl", "gh", "=", "(", "(", "G...
Method for groups migration. @throws Exception
[ "Method", "for", "groups", "migration", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java#L302-L313
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java
MigrationTool.migrateMembershipTypes
private void migrateMembershipTypes() throws Exception { Session session = service.getStorageSession(); try { if (session.itemExists(membershipTypesStorageOld)) { NodeIterator iterator = ((ExtendedNode)session.getItem(membershipTypesStorageOld)).getNodesLazily(); ...
java
private void migrateMembershipTypes() throws Exception { Session session = service.getStorageSession(); try { if (session.itemExists(membershipTypesStorageOld)) { NodeIterator iterator = ((ExtendedNode)session.getItem(membershipTypesStorageOld)).getNodesLazily(); ...
[ "private", "void", "migrateMembershipTypes", "(", ")", "throws", "Exception", "{", "Session", "session", "=", "service", ".", "getStorageSession", "(", ")", ";", "try", "{", "if", "(", "session", ".", "itemExists", "(", "membershipTypesStorageOld", ")", ")", "...
Method for membershipTypes migration. @throws Exception
[ "Method", "for", "membershipTypes", "migration", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java#L319-L339
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java
MigrationTool.migrateProfiles
private void migrateProfiles() throws Exception { Session session = service.getStorageSession(); try { if (session.itemExists(usersStorageOld)) { NodeIterator iterator = ((ExtendedNode)session.getItem(usersStorageOld)).getNodesLazily(); UserProfileHandlerIm...
java
private void migrateProfiles() throws Exception { Session session = service.getStorageSession(); try { if (session.itemExists(usersStorageOld)) { NodeIterator iterator = ((ExtendedNode)session.getItem(usersStorageOld)).getNodesLazily(); UserProfileHandlerIm...
[ "private", "void", "migrateProfiles", "(", ")", "throws", "Exception", "{", "Session", "session", "=", "service", ".", "getStorageSession", "(", ")", ";", "try", "{", "if", "(", "session", ".", "itemExists", "(", "usersStorageOld", ")", ")", "{", "NodeIterat...
Method for profiles migration. @throws Exception
[ "Method", "for", "profiles", "migration", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java#L345-L366
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java
MigrationTool.migrateMemberships
private void migrateMemberships() throws Exception { Session session = service.getStorageSession(); try { if (session.itemExists(usersStorageOld)) { NodeIterator iterator = ((ExtendedNode)session.getItem(usersStorageOld)).getNodesLazily(); MembershipHandler...
java
private void migrateMemberships() throws Exception { Session session = service.getStorageSession(); try { if (session.itemExists(usersStorageOld)) { NodeIterator iterator = ((ExtendedNode)session.getItem(usersStorageOld)).getNodesLazily(); MembershipHandler...
[ "private", "void", "migrateMemberships", "(", ")", "throws", "Exception", "{", "Session", "session", "=", "service", ".", "getStorageSession", "(", ")", ";", "try", "{", "if", "(", "session", ".", "itemExists", "(", "usersStorageOld", ")", ")", "{", "NodeIte...
Method for memberships migration. @throws Exception
[ "Method", "for", "memberships", "migration", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MigrationTool.java#L372-L394
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java
NodeIndexer.addBooleanValue
protected void addBooleanValue(Document doc, String fieldName, Object internalValue) { doc.add(createFieldWithoutNorms(fieldName, internalValue.toString(), PropertyType.BOOLEAN)); }
java
protected void addBooleanValue(Document doc, String fieldName, Object internalValue) { doc.add(createFieldWithoutNorms(fieldName, internalValue.toString(), PropertyType.BOOLEAN)); }
[ "protected", "void", "addBooleanValue", "(", "Document", "doc", ",", "String", "fieldName", ",", "Object", "internalValue", ")", "{", "doc", ".", "add", "(", "createFieldWithoutNorms", "(", "fieldName", ",", "internalValue", ".", "toString", "(", ")", ",", "Pr...
Adds the string representation of the boolean value to the document as the named field. @param doc The document to which to add the field @param fieldName The name of the field to add @param internalValue The value for the field to add to the document.
[ "Adds", "the", "string", "representation", "of", "the", "boolean", "value", "to", "the", "document", "as", "the", "named", "field", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java#L695-L698
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java
NodeIndexer.addReferenceValue
protected void addReferenceValue(Document doc, String fieldName, Object internalValue) { String uuid = internalValue.toString(); doc.add(createFieldWithoutNorms(fieldName, uuid, PropertyType.REFERENCE)); doc.add(new Field(FieldNames.PROPERTIES, FieldNames.createNamedValue(fieldName, uuid), Field.St...
java
protected void addReferenceValue(Document doc, String fieldName, Object internalValue) { String uuid = internalValue.toString(); doc.add(createFieldWithoutNorms(fieldName, uuid, PropertyType.REFERENCE)); doc.add(new Field(FieldNames.PROPERTIES, FieldNames.createNamedValue(fieldName, uuid), Field.St...
[ "protected", "void", "addReferenceValue", "(", "Document", "doc", ",", "String", "fieldName", ",", "Object", "internalValue", ")", "{", "String", "uuid", "=", "internalValue", ".", "toString", "(", ")", ";", "doc", ".", "add", "(", "createFieldWithoutNorms", "...
Adds the reference value to the document as the named field. The value's string representation is added as the reference data. Additionally the reference data is stored in the index. @param doc The document to which to add the field @param fieldName The name of the field to add @param internalValue The v...
[ "Adds", "the", "reference", "value", "to", "the", "document", "as", "the", "named", "field", ".", "The", "value", "s", "string", "representation", "is", "added", "as", "the", "reference", "data", ".", "Additionally", "the", "reference", "data", "is", "stored...
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java#L790-L796
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java
NodeIndexer.addPathValue
protected void addPathValue(Document doc, String fieldName, Object pathString) { doc.add(createFieldWithoutNorms(fieldName, pathString.toString(), PropertyType.PATH)); }
java
protected void addPathValue(Document doc, String fieldName, Object pathString) { doc.add(createFieldWithoutNorms(fieldName, pathString.toString(), PropertyType.PATH)); }
[ "protected", "void", "addPathValue", "(", "Document", "doc", ",", "String", "fieldName", ",", "Object", "pathString", ")", "{", "doc", ".", "add", "(", "createFieldWithoutNorms", "(", "fieldName", ",", "pathString", ".", "toString", "(", ")", ",", "PropertyTyp...
Adds the path value to the document as the named field. The path value is converted to an indexable string value using the name space mappings with which this class has been created. @param doc The document to which to add the field @param fieldName The name of the field to add @param pathString The v...
[ "Adds", "the", "path", "value", "to", "the", "document", "as", "the", "named", "field", ".", "The", "path", "value", "is", "converted", "to", "an", "indexable", "string", "value", "using", "the", "name", "space", "mappings", "with", "which", "this", "class...
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java#L807-L811
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java
NodeIndexer.addNameValue
protected void addNameValue(Document doc, String fieldName, Object internalValue) { doc.add(createFieldWithoutNorms(fieldName, internalValue.toString(), PropertyType.NAME)); }
java
protected void addNameValue(Document doc, String fieldName, Object internalValue) { doc.add(createFieldWithoutNorms(fieldName, internalValue.toString(), PropertyType.NAME)); }
[ "protected", "void", "addNameValue", "(", "Document", "doc", ",", "String", "fieldName", ",", "Object", "internalValue", ")", "{", "doc", ".", "add", "(", "createFieldWithoutNorms", "(", "fieldName", ",", "internalValue", ".", "toString", "(", ")", ",", "Prope...
Adds the name value to the document as the named field. The name value is converted to an indexable string treating the internal value as a qualified name and mapping the name space using the name space mappings with which this class has been created. @param doc The document to which to add the field @param ...
[ "Adds", "the", "name", "value", "to", "the", "document", "as", "the", "named", "field", ".", "The", "name", "value", "is", "converted", "to", "an", "indexable", "string", "treating", "the", "internal", "value", "as", "a", "qualified", "name", "and", "mappi...
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java#L894-L897
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java
NodeIndexer.getPropertyBoost
protected float getPropertyBoost(InternalQName propertyName) { if (indexingConfig == null) { return DEFAULT_BOOST; } else { return indexingConfig.getPropertyBoost(node, propertyName); } }
java
protected float getPropertyBoost(InternalQName propertyName) { if (indexingConfig == null) { return DEFAULT_BOOST; } else { return indexingConfig.getPropertyBoost(node, propertyName); } }
[ "protected", "float", "getPropertyBoost", "(", "InternalQName", "propertyName", ")", "{", "if", "(", "indexingConfig", "==", "null", ")", "{", "return", "DEFAULT_BOOST", ";", "}", "else", "{", "return", "indexingConfig", ".", "getPropertyBoost", "(", "node", ","...
Returns the boost value for the given property name. @param propertyName the name of a property. @return the boost value for the given property name.
[ "Returns", "the", "boost", "value", "for", "the", "given", "property", "name", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java#L997-L1007
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java
NodeIndexer.addNodeName
protected void addNodeName(Document doc, String namespaceURI, String localName) throws RepositoryException { String name = mappings.getNamespacePrefixByURI(namespaceURI) + ":" + localName; doc.add(new Field(FieldNames.LABEL, name, Field.Store.NO, Field.Index.NOT_ANALYZED_NO_NORMS)); // as of versio...
java
protected void addNodeName(Document doc, String namespaceURI, String localName) throws RepositoryException { String name = mappings.getNamespacePrefixByURI(namespaceURI) + ":" + localName; doc.add(new Field(FieldNames.LABEL, name, Field.Store.NO, Field.Index.NOT_ANALYZED_NO_NORMS)); // as of versio...
[ "protected", "void", "addNodeName", "(", "Document", "doc", ",", "String", "namespaceURI", ",", "String", "localName", ")", "throws", "RepositoryException", "{", "String", "name", "=", "mappings", ".", "getNamespacePrefixByURI", "(", "namespaceURI", ")", "+", "\":...
Depending on the index format version adds one or two fields to the document for the node name. @param doc the lucene document. @param namespaceURI the namespace URI of the node name. @param localName the local name of the node. @throws RepositoryException
[ "Depending", "on", "the", "index", "format", "version", "adds", "one", "or", "two", "fields", "to", "the", "document", "for", "the", "node", "name", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java#L1052-L1062
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
ValueFileIOHelper.writeValue
protected long writeValue(File file, ValueData value) throws IOException { if (value.isByteArray()) { return writeByteArrayValue(file, value); } else { return writeStreamedValue(file, value); } }
java
protected long writeValue(File file, ValueData value) throws IOException { if (value.isByteArray()) { return writeByteArrayValue(file, value); } else { return writeStreamedValue(file, value); } }
[ "protected", "long", "writeValue", "(", "File", "file", ",", "ValueData", "value", ")", "throws", "IOException", "{", "if", "(", "value", ".", "isByteArray", "(", ")", ")", "{", "return", "writeByteArrayValue", "(", "file", ",", "value", ")", ";", "}", "...
Write value to a file. @param file File @param value ValueData @return size of wrote content @throws IOException if error occurs
[ "Write", "value", "to", "a", "file", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java#L71-L81
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
ValueFileIOHelper.writeByteArrayValue
protected long writeByteArrayValue(File file, ValueData value) throws IOException { OutputStream out = new FileOutputStream(file); try { byte[] data = value.getAsByteArray(); out.write(data); return data.length; } finally { out.clos...
java
protected long writeByteArrayValue(File file, ValueData value) throws IOException { OutputStream out = new FileOutputStream(file); try { byte[] data = value.getAsByteArray(); out.write(data); return data.length; } finally { out.clos...
[ "protected", "long", "writeByteArrayValue", "(", "File", "file", ",", "ValueData", "value", ")", "throws", "IOException", "{", "OutputStream", "out", "=", "new", "FileOutputStream", "(", "file", ")", ";", "try", "{", "byte", "[", "]", "data", "=", "value", ...
Write value array of bytes to a file. @param file File @param value ValueData @return size of wrote content @throws IOException if error occurs
[ "Write", "value", "array", "of", "bytes", "to", "a", "file", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java#L94-L108
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
ValueFileIOHelper.writeStreamedValue
protected long writeStreamedValue(File file, ValueData value) throws IOException { long size; // stream Value if (value instanceof StreamPersistedValueData) { StreamPersistedValueData streamed = (StreamPersistedValueData)value; if (streamed.isPersisted()) ...
java
protected long writeStreamedValue(File file, ValueData value) throws IOException { long size; // stream Value if (value instanceof StreamPersistedValueData) { StreamPersistedValueData streamed = (StreamPersistedValueData)value; if (streamed.isPersisted()) ...
[ "protected", "long", "writeStreamedValue", "(", "File", "file", ",", "ValueData", "value", ")", "throws", "IOException", "{", "long", "size", ";", "// stream Value\r", "if", "(", "value", "instanceof", "StreamPersistedValueData", ")", "{", "StreamPersistedValueData", ...
Write streamed value to a file. @param file File @param value ValueData @return size of wrote content @throws IOException if error occurs
[ "Write", "streamed", "value", "to", "a", "file", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java#L121-L176
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
ValueFileIOHelper.writeOutput
protected long writeOutput(OutputStream out, ValueData value) throws IOException { if (value.isByteArray()) { byte[] buff = value.getAsByteArray(); out.write(buff); return buff.length; } else { InputStream in; if (value instanceo...
java
protected long writeOutput(OutputStream out, ValueData value) throws IOException { if (value.isByteArray()) { byte[] buff = value.getAsByteArray(); out.write(buff); return buff.length; } else { InputStream in; if (value instanceo...
[ "protected", "long", "writeOutput", "(", "OutputStream", "out", ",", "ValueData", "value", ")", "throws", "IOException", "{", "if", "(", "value", ".", "isByteArray", "(", ")", ")", "{", "byte", "[", "]", "buff", "=", "value", ".", "getAsByteArray", "(", ...
Stream value data to the output. @param out OutputStream @param value ValueData @throws IOException if error occurs
[ "Stream", "value", "data", "to", "the", "output", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java#L188-L232
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
ValueFileIOHelper.copy
protected long copy(InputStream in, OutputStream out) throws IOException { // compare classes as in Java6 Channels.newChannel(), Java5 has a bug in newChannel(). boolean inFile = in instanceof FileInputStream && FileInputStream.class.equals(in.getClass()); boolean outFile = out instanceof FileO...
java
protected long copy(InputStream in, OutputStream out) throws IOException { // compare classes as in Java6 Channels.newChannel(), Java5 has a bug in newChannel(). boolean inFile = in instanceof FileInputStream && FileInputStream.class.equals(in.getClass()); boolean outFile = out instanceof FileO...
[ "protected", "long", "copy", "(", "InputStream", "in", ",", "OutputStream", "out", ")", "throws", "IOException", "{", "// compare classes as in Java6 Channels.newChannel(), Java5 has a bug in newChannel().\r", "boolean", "inFile", "=", "in", "instanceof", "FileInputStream", "...
Copy input to output data using NIO. @param in InputStream @param out OutputStream @return The number of bytes, possibly zero, that were actually copied @throws IOException if error occurs
[ "Copy", "input", "to", "output", "data", "using", "NIO", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java#L245-L296
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
ValueFileIOHelper.copyClose
protected long copyClose(InputStream in, OutputStream out) throws IOException { try { try { return copy(in, out); } finally { in.close(); } } finally { out.close(); } }
java
protected long copyClose(InputStream in, OutputStream out) throws IOException { try { try { return copy(in, out); } finally { in.close(); } } finally { out.close(); } }
[ "protected", "long", "copyClose", "(", "InputStream", "in", ",", "OutputStream", "out", ")", "throws", "IOException", "{", "try", "{", "try", "{", "return", "copy", "(", "in", ",", "out", ")", ";", "}", "finally", "{", "in", ".", "close", "(", ")", "...
Copy input to output data using NIO. Input and output streams will be closed after the operation. @param in InputStream @param out OutputStream @return The number of bytes, possibly zero, that were actually copied @throws IOException if error occurs
[ "Copy", "input", "to", "output", "data", "using", "NIO", ".", "Input", "and", "output", "streams", "will", "be", "closed", "after", "the", "operation", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java#L310-L327
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/ReportCommand.java
ReportCommand.report
public Response report(Session session, String path, HierarchicalProperty body, Depth depth, String baseURI) { try { Node node = (Node)session.getItem(path); WebDavNamespaceContext nsContext = new WebDavNamespaceContext(session); String strUri = baseURI + node.getPath(); ...
java
public Response report(Session session, String path, HierarchicalProperty body, Depth depth, String baseURI) { try { Node node = (Node)session.getItem(path); WebDavNamespaceContext nsContext = new WebDavNamespaceContext(session); String strUri = baseURI + node.getPath(); ...
[ "public", "Response", "report", "(", "Session", "session", ",", "String", "path", ",", "HierarchicalProperty", "body", ",", "Depth", "depth", ",", "String", "baseURI", ")", "{", "try", "{", "Node", "node", "=", "(", "Node", ")", "session", ".", "getItem", ...
Webdav Report method implementation. @param session current session @param path resource path @param body request bidy @param depth report depth @param baseURI base Uri @return the instance of javax.ws.rs.core.Response
[ "Webdav", "Report", "method", "implementation", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/ReportCommand.java#L70-L115
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/ReportCommand.java
ReportCommand.getProperties
protected Set<QName> getProperties(HierarchicalProperty body) { HashSet<QName> properties = new HashSet<QName>(); HierarchicalProperty prop = body.getChild(new QName("DAV:", "prop")); if (prop == null) { return properties; } for (int i = 0; i < prop.getChildre...
java
protected Set<QName> getProperties(HierarchicalProperty body) { HashSet<QName> properties = new HashSet<QName>(); HierarchicalProperty prop = body.getChild(new QName("DAV:", "prop")); if (prop == null) { return properties; } for (int i = 0; i < prop.getChildre...
[ "protected", "Set", "<", "QName", ">", "getProperties", "(", "HierarchicalProperty", "body", ")", "{", "HashSet", "<", "QName", ">", "properties", "=", "new", "HashSet", "<", "QName", ">", "(", ")", ";", "HierarchicalProperty", "prop", "=", "body", ".", "g...
Returns the list of properties. @param body request body @return the list of properties
[ "Returns", "the", "list", "of", "properties", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/ReportCommand.java#L123-L140
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDStreamWriter.java
CNDStreamWriter.write
public void write(List<NodeTypeData> nodeTypes, OutputStream os) throws RepositoryException { OutputStreamWriter out = new OutputStreamWriter(os); try { for (NodeTypeData nodeType : nodeTypes) { printNamespaces(nodeType, out); printNodeTypeDeclaration(nodeT...
java
public void write(List<NodeTypeData> nodeTypes, OutputStream os) throws RepositoryException { OutputStreamWriter out = new OutputStreamWriter(os); try { for (NodeTypeData nodeType : nodeTypes) { printNamespaces(nodeType, out); printNodeTypeDeclaration(nodeT...
[ "public", "void", "write", "(", "List", "<", "NodeTypeData", ">", "nodeTypes", ",", "OutputStream", "os", ")", "throws", "RepositoryException", "{", "OutputStreamWriter", "out", "=", "new", "OutputStreamWriter", "(", "os", ")", ";", "try", "{", "for", "(", "...
Write given list of node types to output stream. @param nodeTypes List of NodeTypes to write. @param os OutputStream to write to. @throws RepositoryException
[ "Write", "given", "list", "of", "node", "types", "to", "output", "stream", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDStreamWriter.java#L82-L99
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDStreamWriter.java
CNDStreamWriter.printNamespaces
private void printNamespaces(NodeTypeData nodeTypeData, OutputStreamWriter out) throws RepositoryException, IOException { /** * Using set to store all prefixes found in node types to avoid * duplication */ Set<String> namespaces = new HashSet<String>(); /** Scanning node...
java
private void printNamespaces(NodeTypeData nodeTypeData, OutputStreamWriter out) throws RepositoryException, IOException { /** * Using set to store all prefixes found in node types to avoid * duplication */ Set<String> namespaces = new HashSet<String>(); /** Scanning node...
[ "private", "void", "printNamespaces", "(", "NodeTypeData", "nodeTypeData", ",", "OutputStreamWriter", "out", ")", "throws", "RepositoryException", ",", "IOException", "{", "/**\n * Using set to store all prefixes found in node types to avoid\n * duplication\n */", "...
Print namespaces to stream @param nodeTypeData @param out @throws RepositoryException @throws IOException
[ "Print", "namespaces", "to", "stream" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDStreamWriter.java#L109-L157
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDStreamWriter.java
CNDStreamWriter.printNodeTypeDeclaration
private void printNodeTypeDeclaration(NodeTypeData nodeTypeData, OutputStreamWriter out) throws RepositoryException, IOException { /** Print name */ out.write("[" + qNameToString(nodeTypeData.getName()) + "] "); /** Print supertypes */ InternalQName[] superTypes = nodeTypeData.getDecla...
java
private void printNodeTypeDeclaration(NodeTypeData nodeTypeData, OutputStreamWriter out) throws RepositoryException, IOException { /** Print name */ out.write("[" + qNameToString(nodeTypeData.getName()) + "] "); /** Print supertypes */ InternalQName[] superTypes = nodeTypeData.getDecla...
[ "private", "void", "printNodeTypeDeclaration", "(", "NodeTypeData", "nodeTypeData", ",", "OutputStreamWriter", "out", ")", "throws", "RepositoryException", ",", "IOException", "{", "/** Print name */", "out", ".", "write", "(", "\"[\"", "+", "qNameToString", "(", "nod...
Method recursively print to output stream node type definition in cnd format. @param nodeTypeData is nodeType to print @throws RepositoryException this exception may be while converting QNames to string @throws IOException this exception my be thrown during some operations with streams
[ "Method", "recursively", "print", "to", "output", "stream", "node", "type", "definition", "in", "cnd", "format", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDStreamWriter.java#L183-L251
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDStreamWriter.java
CNDStreamWriter.printPropertyDeclaration
private void printPropertyDeclaration(PropertyDefinitionData propertyDefinition, OutputStreamWriter out) throws IOException, RepositoryException { /** Print name */ out.write("\r\n "); out.write("- " + qNameToString(propertyDefinition.getName())); out.write(" (" + ExtendedPropertyType....
java
private void printPropertyDeclaration(PropertyDefinitionData propertyDefinition, OutputStreamWriter out) throws IOException, RepositoryException { /** Print name */ out.write("\r\n "); out.write("- " + qNameToString(propertyDefinition.getName())); out.write(" (" + ExtendedPropertyType....
[ "private", "void", "printPropertyDeclaration", "(", "PropertyDefinitionData", "propertyDefinition", ",", "OutputStreamWriter", "out", ")", "throws", "IOException", ",", "RepositoryException", "{", "/** Print name */", "out", ".", "write", "(", "\"\\r\\n \"", ")", ";", ...
Prints to output stream property definition in CND format @param propertyDefinition @throws IOException @throws RepositoryException
[ "Prints", "to", "output", "stream", "property", "definition", "in", "CND", "format" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDStreamWriter.java#L260-L327
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDStreamWriter.java
CNDStreamWriter.printChildDeclaration
private void printChildDeclaration(NodeDefinitionData nodeDefinition, OutputStreamWriter out) throws IOException, RepositoryException { out.write("\r\n "); out.write("+ " + qNameToString(nodeDefinition.getName()) + " "); InternalQName[] requiredTypes = nodeDefinition.getRequiredPrimaryTypes...
java
private void printChildDeclaration(NodeDefinitionData nodeDefinition, OutputStreamWriter out) throws IOException, RepositoryException { out.write("\r\n "); out.write("+ " + qNameToString(nodeDefinition.getName()) + " "); InternalQName[] requiredTypes = nodeDefinition.getRequiredPrimaryTypes...
[ "private", "void", "printChildDeclaration", "(", "NodeDefinitionData", "nodeDefinition", ",", "OutputStreamWriter", "out", ")", "throws", "IOException", ",", "RepositoryException", "{", "out", ".", "write", "(", "\"\\r\\n \"", ")", ";", "out", ".", "write", "(", ...
Print to output stream child node definition in CND format @param nodeDefinition @throws IOException @throws RepositoryException
[ "Print", "to", "output", "stream", "child", "node", "definition", "in", "CND", "format" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDStreamWriter.java#L336-L392
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/IndexingConfigurationImpl.java
IndexingConfigurationImpl.getNodeBoost
public float getNodeBoost(NodeData state) { IndexingRule rule = getApplicableIndexingRule(state); if (rule != null) { return rule.getNodeBoost(); } return DEFAULT_BOOST; }
java
public float getNodeBoost(NodeData state) { IndexingRule rule = getApplicableIndexingRule(state); if (rule != null) { return rule.getNodeBoost(); } return DEFAULT_BOOST; }
[ "public", "float", "getNodeBoost", "(", "NodeData", "state", ")", "{", "IndexingRule", "rule", "=", "getApplicableIndexingRule", "(", "state", ")", ";", "if", "(", "rule", "!=", "null", ")", "{", "return", "rule", ".", "getNodeBoost", "(", ")", ";", "}", ...
Returns the boost for the node scope fulltext index field. @param state the node state. @return the boost for the node scope fulltext index field.
[ "Returns", "the", "boost", "for", "the", "node", "scope", "fulltext", "index", "field", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/IndexingConfigurationImpl.java#L288-L296
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/IndexingConfigurationImpl.java
IndexingConfigurationImpl.getCondition
private PathExpression getCondition(Node config) throws IllegalNameException, RepositoryException { Node conditionAttr = config.getAttributes().getNamedItem("condition"); if (conditionAttr == null) { return null; } String conditionString = conditionAttr.getNodeValue(); in...
java
private PathExpression getCondition(Node config) throws IllegalNameException, RepositoryException { Node conditionAttr = config.getAttributes().getNamedItem("condition"); if (conditionAttr == null) { return null; } String conditionString = conditionAttr.getNodeValue(); in...
[ "private", "PathExpression", "getCondition", "(", "Node", "config", ")", "throws", "IllegalNameException", ",", "RepositoryException", "{", "Node", "conditionAttr", "=", "config", ".", "getAttributes", "(", ")", ".", "getNamedItem", "(", "\"condition\"", ")", ";", ...
Gets the condition expression from the configuration. @param config the config node. @return the condition expression or <code>null</code> if there is no condition set on the <code>config</code>. @throws MalformedPathException if the condition string is malformed. @throws IllegalNameException if a name contains illega...
[ "Gets", "the", "condition", "expression", "from", "the", "configuration", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/IndexingConfigurationImpl.java#L533-L614
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/BufferedDecoder.java
BufferedDecoder.remove
public void remove() throws IOException { if ((fileBuffer != null) && PrivilegedFileHelper.exists(fileBuffer)) { if (!PrivilegedFileHelper.delete(fileBuffer)) { throw new IOException("Cannot remove file " + PrivilegedFileHelper.getAbsolutePath(fileBuffer) + " ...
java
public void remove() throws IOException { if ((fileBuffer != null) && PrivilegedFileHelper.exists(fileBuffer)) { if (!PrivilegedFileHelper.delete(fileBuffer)) { throw new IOException("Cannot remove file " + PrivilegedFileHelper.getAbsolutePath(fileBuffer) + " ...
[ "public", "void", "remove", "(", ")", "throws", "IOException", "{", "if", "(", "(", "fileBuffer", "!=", "null", ")", "&&", "PrivilegedFileHelper", ".", "exists", "(", "fileBuffer", ")", ")", "{", "if", "(", "!", "PrivilegedFileHelper", ".", "delete", "(", ...
Remove buffer. @throws IOException if file cannot be removed.
[ "Remove", "buffer", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/BufferedDecoder.java#L117-L127
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/BufferedDecoder.java
BufferedDecoder.swapBuffers
private void swapBuffers() throws IOException { byte[] data = ((ByteArrayOutputStream)out).toByteArray(); fileBuffer = PrivilegedFileHelper.createTempFile("decoderBuffer", ".tmp"); PrivilegedFileHelper.deleteOnExit(fileBuffer); out = new BufferedOutputStream(PrivilegedFileHelper.fileOutputStr...
java
private void swapBuffers() throws IOException { byte[] data = ((ByteArrayOutputStream)out).toByteArray(); fileBuffer = PrivilegedFileHelper.createTempFile("decoderBuffer", ".tmp"); PrivilegedFileHelper.deleteOnExit(fileBuffer); out = new BufferedOutputStream(PrivilegedFileHelper.fileOutputStr...
[ "private", "void", "swapBuffers", "(", ")", "throws", "IOException", "{", "byte", "[", "]", "data", "=", "(", "(", "ByteArrayOutputStream", ")", "out", ")", ".", "toByteArray", "(", ")", ";", "fileBuffer", "=", "PrivilegedFileHelper", ".", "createTempFile", ...
Swap in-memory buffer with file. @exception IOException if an I/O error occurs.
[ "Swap", "in", "-", "memory", "buffer", "with", "file", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/BufferedDecoder.java#L177-L184
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/checker/InspectionReport.java
InspectionReport.logComment
public void logComment(String message) throws IOException { if (reportContext.get() != null) { reportContext.get().addComment(message); } else { writeMessage(message); } }
java
public void logComment(String message) throws IOException { if (reportContext.get() != null) { reportContext.get().addComment(message); } else { writeMessage(message); } }
[ "public", "void", "logComment", "(", "String", "message", ")", "throws", "IOException", "{", "if", "(", "reportContext", ".", "get", "(", ")", "!=", "null", ")", "{", "reportContext", ".", "get", "(", ")", ".", "addComment", "(", "message", ")", ";", "...
Adds comment to log.
[ "Adds", "comment", "to", "log", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/checker/InspectionReport.java#L118-L128
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/checker/InspectionReport.java
InspectionReport.logDescription
public void logDescription(String description) throws IOException { // The ThreadLocal has been initialized so we know that we are in multithreaded mode. if (reportContext.get() != null) { reportContext.get().addComment(description); } else { writeMessag...
java
public void logDescription(String description) throws IOException { // The ThreadLocal has been initialized so we know that we are in multithreaded mode. if (reportContext.get() != null) { reportContext.get().addComment(description); } else { writeMessag...
[ "public", "void", "logDescription", "(", "String", "description", ")", "throws", "IOException", "{", "// The ThreadLocal has been initialized so we know that we are in multithreaded mode.\r", "if", "(", "reportContext", ".", "get", "(", ")", "!=", "null", ")", "{", "repor...
Adds description to log.
[ "Adds", "description", "to", "log", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/checker/InspectionReport.java#L133-L144
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/checker/InspectionReport.java
InspectionReport.logBrokenObjectAndSetInconsistency
public void logBrokenObjectAndSetInconsistency(String brokenObject) throws IOException { setInconsistency(); // The ThreadLocal has been initialized so we know that we are in multithreaded mode. if (reportContext.get() != null) { reportContext.get().addBrokenObject(brokenObject...
java
public void logBrokenObjectAndSetInconsistency(String brokenObject) throws IOException { setInconsistency(); // The ThreadLocal has been initialized so we know that we are in multithreaded mode. if (reportContext.get() != null) { reportContext.get().addBrokenObject(brokenObject...
[ "public", "void", "logBrokenObjectAndSetInconsistency", "(", "String", "brokenObject", ")", "throws", "IOException", "{", "setInconsistency", "(", ")", ";", "// The ThreadLocal has been initialized so we know that we are in multithreaded mode.\r", "if", "(", "reportContext", ".",...
Adds detailed event to log.
[ "Adds", "detailed", "event", "to", "log", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/checker/InspectionReport.java#L155-L167
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/checker/InspectionReport.java
InspectionReport.logExceptionAndSetInconsistency
public void logExceptionAndSetInconsistency(String message, Throwable e) throws IOException { setInconsistency(); // The ThreadLocal has been initialized so we know that we are in multithreaded mode. if (reportContext.get() != null) { reportContext.get().addLogException(message...
java
public void logExceptionAndSetInconsistency(String message, Throwable e) throws IOException { setInconsistency(); // The ThreadLocal has been initialized so we know that we are in multithreaded mode. if (reportContext.get() != null) { reportContext.get().addLogException(message...
[ "public", "void", "logExceptionAndSetInconsistency", "(", "String", "message", ",", "Throwable", "e", ")", "throws", "IOException", "{", "setInconsistency", "(", ")", ";", "// The ThreadLocal has been initialized so we know that we are in multithreaded mode.\r", "if", "(", "r...
Adds exception with full stack trace.
[ "Adds", "exception", "with", "full", "stack", "trace", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/checker/InspectionReport.java#L179-L191
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNLockTableHandler.java
ISPNLockTableHandler.getIdColumn
private String getIdColumn() throws SQLException { try { return lockManagerEntry.getParameterValue(ISPNCacheableLockManagerImpl.INFINISPAN_JDBC_CL_ID_COLUMN_NAME); } catch (RepositoryConfigurationException e) { throw new SQLException(e); } }
java
private String getIdColumn() throws SQLException { try { return lockManagerEntry.getParameterValue(ISPNCacheableLockManagerImpl.INFINISPAN_JDBC_CL_ID_COLUMN_NAME); } catch (RepositoryConfigurationException e) { throw new SQLException(e); } }
[ "private", "String", "getIdColumn", "(", ")", "throws", "SQLException", "{", "try", "{", "return", "lockManagerEntry", ".", "getParameterValue", "(", "ISPNCacheableLockManagerImpl", ".", "INFINISPAN_JDBC_CL_ID_COLUMN_NAME", ")", ";", "}", "catch", "(", "RepositoryConfig...
Returns the column name which contain node identifier.
[ "Returns", "the", "column", "name", "which", "contain", "node", "identifier", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNLockTableHandler.java#L86-L96
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNLockTableHandler.java
ISPNLockTableHandler.getTableName
protected String getTableName() throws SQLException { try { String dialect = getDialect(); String quote = "\""; if (dialect.startsWith(DBConstants.DB_DIALECT_MYSQL)) quote = "`"; return quote + lockManagerEntry.getParameterValue(ISPNCacheableLockManagerImpl...
java
protected String getTableName() throws SQLException { try { String dialect = getDialect(); String quote = "\""; if (dialect.startsWith(DBConstants.DB_DIALECT_MYSQL)) quote = "`"; return quote + lockManagerEntry.getParameterValue(ISPNCacheableLockManagerImpl...
[ "protected", "String", "getTableName", "(", ")", "throws", "SQLException", "{", "try", "{", "String", "dialect", "=", "getDialect", "(", ")", ";", "String", "quote", "=", "\"\\\"\"", ";", "if", "(", "dialect", ".", "startsWith", "(", "DBConstants", ".", "D...
Returns the name of LOCK table.
[ "Returns", "the", "name", "of", "LOCK", "table", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNLockTableHandler.java#L101-L116
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/FileNameProducer.java
FileNameProducer.getNextFile
public File getNextFile() { File nextFile = null; try { String sNextName = generateName(); nextFile = new File(backupSetDir.getAbsoluteFile() + File.separator + sNextName); if (isFullBackup && isDirectoryForFullBackup) { if (!PrivilegedFi...
java
public File getNextFile() { File nextFile = null; try { String sNextName = generateName(); nextFile = new File(backupSetDir.getAbsoluteFile() + File.separator + sNextName); if (isFullBackup && isDirectoryForFullBackup) { if (!PrivilegedFi...
[ "public", "File", "getNextFile", "(", ")", "{", "File", "nextFile", "=", "null", ";", "try", "{", "String", "sNextName", "=", "generateName", "(", ")", ";", "nextFile", "=", "new", "File", "(", "backupSetDir", ".", "getAbsoluteFile", "(", ")", "+", "File...
Get next file in backup set. @return file
[ "Get", "next", "file", "in", "backup", "set", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/FileNameProducer.java#L180-L207
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/FileNameProducer.java
FileNameProducer.getStrDate
private String getStrDate(Calendar c) { int m = c.get(Calendar.MONTH) + 1; int d = c.get(Calendar.DATE); return "" + c.get(Calendar.YEAR) + (m < 10 ? "0" + m : m) + (d < 10 ? "0" + d : d); }
java
private String getStrDate(Calendar c) { int m = c.get(Calendar.MONTH) + 1; int d = c.get(Calendar.DATE); return "" + c.get(Calendar.YEAR) + (m < 10 ? "0" + m : m) + (d < 10 ? "0" + d : d); }
[ "private", "String", "getStrDate", "(", "Calendar", "c", ")", "{", "int", "m", "=", "c", ".", "get", "(", "Calendar", ".", "MONTH", ")", "+", "1", ";", "int", "d", "=", "c", ".", "get", "(", "Calendar", ".", "DATE", ")", ";", "return", "\"\"", ...
Returns date as String in format YYYYMMDD.
[ "Returns", "date", "as", "String", "in", "format", "YYYYMMDD", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/FileNameProducer.java#L259-L264
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/FileNameProducer.java
FileNameProducer.getStrTime
private String getStrTime(Calendar c) { int h = c.get(Calendar.HOUR); int m = c.get(Calendar.MINUTE); int s = c.get(Calendar.SECOND); return "" + (h < 10 ? "0" + h : h) + (m < 10 ? "0" + m : m) + (s < 10 ? "0" + s : s); }
java
private String getStrTime(Calendar c) { int h = c.get(Calendar.HOUR); int m = c.get(Calendar.MINUTE); int s = c.get(Calendar.SECOND); return "" + (h < 10 ? "0" + h : h) + (m < 10 ? "0" + m : m) + (s < 10 ? "0" + s : s); }
[ "private", "String", "getStrTime", "(", "Calendar", "c", ")", "{", "int", "h", "=", "c", ".", "get", "(", "Calendar", ".", "HOUR", ")", ";", "int", "m", "=", "c", ".", "get", "(", "Calendar", ".", "MINUTE", ")", ";", "int", "s", "=", "c", ".", ...
Returns time as String in format HHMMSS.
[ "Returns", "time", "as", "String", "in", "format", "HHMMSS", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/FileNameProducer.java#L269-L275
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/JCROrganizationServiceImpl.java
JCROrganizationServiceImpl.createStructure
void createStructure() throws RepositoryException { Session session = getStorageSession(); try { Node storage = session.getRootNode().addNode(storagePath.substring(1), STORAGE_NODETYPE); storage.addNode(STORAGE_JOS_USERS, STORAGE_JOS_USERS_NODETYPE); storage.addNode(STOR...
java
void createStructure() throws RepositoryException { Session session = getStorageSession(); try { Node storage = session.getRootNode().addNode(storagePath.substring(1), STORAGE_NODETYPE); storage.addNode(STORAGE_JOS_USERS, STORAGE_JOS_USERS_NODETYPE); storage.addNode(STOR...
[ "void", "createStructure", "(", ")", "throws", "RepositoryException", "{", "Session", "session", "=", "getStorageSession", "(", ")", ";", "try", "{", "Node", "storage", "=", "session", ".", "getRootNode", "(", ")", ".", "addNode", "(", "storagePath", ".", "s...
Creates storage structure. @throws RepositoryException if any Exception is occurred
[ "Creates", "storage", "structure", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/JCROrganizationServiceImpl.java#L303-L322
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/JCROrganizationServiceImpl.java
JCROrganizationServiceImpl.getStorageSession
Session getStorageSession() throws RepositoryException { try { ManageableRepository repository = getWorkingRepository(); String workspaceName = storageWorkspace; if (workspaceName == null) { workspaceName = repository.getConfiguration().getDefaultWorkspace...
java
Session getStorageSession() throws RepositoryException { try { ManageableRepository repository = getWorkingRepository(); String workspaceName = storageWorkspace; if (workspaceName == null) { workspaceName = repository.getConfiguration().getDefaultWorkspace...
[ "Session", "getStorageSession", "(", ")", "throws", "RepositoryException", "{", "try", "{", "ManageableRepository", "repository", "=", "getWorkingRepository", "(", ")", ";", "String", "workspaceName", "=", "storageWorkspace", ";", "if", "(", "workspaceName", "==", "...
Return system Session to org-service storage workspace. For internal use only. @return system session @throws RepositoryException if any Exception is occurred
[ "Return", "system", "Session", "to", "org", "-", "service", "storage", "workspace", ".", "For", "internal", "use", "only", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/JCROrganizationServiceImpl.java#L331-L349
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/JCROrganizationServiceImpl.java
JCROrganizationServiceImpl.getWorkingRepository
protected ManageableRepository getWorkingRepository() throws RepositoryException, RepositoryConfigurationException { return repositoryName != null ? repositoryService.getRepository(repositoryName) : repositoryService .getCurrentRepository(); }
java
protected ManageableRepository getWorkingRepository() throws RepositoryException, RepositoryConfigurationException { return repositoryName != null ? repositoryService.getRepository(repositoryName) : repositoryService .getCurrentRepository(); }
[ "protected", "ManageableRepository", "getWorkingRepository", "(", ")", "throws", "RepositoryException", ",", "RepositoryConfigurationException", "{", "return", "repositoryName", "!=", "null", "?", "repositoryService", ".", "getRepository", "(", "repositoryName", ")", ":", ...
Returns working repository. If repository name is configured then it will be returned otherwise the current repository is used.
[ "Returns", "working", "repository", ".", "If", "repository", "name", "is", "configured", "then", "it", "will", "be", "returned", "otherwise", "the", "current", "repository", "is", "used", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/JCROrganizationServiceImpl.java#L391-L395
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/LocationFactory.java
LocationFactory.createJCRPath
public JCRPath createJCRPath(JCRPath parentLoc, String relPath) throws RepositoryException { JCRPath addPath = parseNames(relPath, false); return parentLoc.add(addPath); }
java
public JCRPath createJCRPath(JCRPath parentLoc, String relPath) throws RepositoryException { JCRPath addPath = parseNames(relPath, false); return parentLoc.add(addPath); }
[ "public", "JCRPath", "createJCRPath", "(", "JCRPath", "parentLoc", ",", "String", "relPath", ")", "throws", "RepositoryException", "{", "JCRPath", "addPath", "=", "parseNames", "(", "relPath", ",", "false", ")", ";", "return", "parentLoc", ".", "add", "(", "ad...
Creates JCRPath from parent path and relPath @param parentLoc parent path @param relPath related path @return @throws RepositoryException
[ "Creates", "JCRPath", "from", "parent", "path", "and", "relPath" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/LocationFactory.java#L90-L94
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/LocationFactory.java
LocationFactory.isNonspace
private boolean isNonspace(String str, char ch) throws RepositoryException { if (ch == '|') { throw new RepositoryException("Illegal absPath: \"" + str + "\": The path entry contains an illegal char: \"" + ch + "\""); } return !((ch == '\t') || (ch == '\n') || (ch == '\f') || (ch ==...
java
private boolean isNonspace(String str, char ch) throws RepositoryException { if (ch == '|') { throw new RepositoryException("Illegal absPath: \"" + str + "\": The path entry contains an illegal char: \"" + ch + "\""); } return !((ch == '\t') || (ch == '\n') || (ch == '\f') || (ch ==...
[ "private", "boolean", "isNonspace", "(", "String", "str", ",", "char", "ch", ")", "throws", "RepositoryException", "{", "if", "(", "ch", "==", "'", "'", ")", "{", "throw", "new", "RepositoryException", "(", "\"Illegal absPath: \\\"\"", "+", "str", "+", "\"\\...
Some functions for JCRPath Validation
[ "Some", "functions", "for", "JCRPath", "Validation" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/LocationFactory.java#L299-L308
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java
QPath.isAbsolute
public boolean isAbsolute() { if (names[0].getIndex() == 1 && names[0].getName().length() == 0 && names[0].getNamespace().length() == 0) return true; else return false; }
java
public boolean isAbsolute() { if (names[0].getIndex() == 1 && names[0].getName().length() == 0 && names[0].getNamespace().length() == 0) return true; else return false; }
[ "public", "boolean", "isAbsolute", "(", ")", "{", "if", "(", "names", "[", "0", "]", ".", "getIndex", "(", ")", "==", "1", "&&", "names", "[", "0", "]", ".", "getName", "(", ")", ".", "length", "(", ")", "==", "0", "&&", "names", "[", "0", "]...
Tell if the path is absolute. @return boolean
[ "Tell", "if", "the", "path", "is", "absolute", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java#L88-L94
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java
QPath.getRelPath
public QPathEntry[] getRelPath(int relativeDegree) throws IllegalPathException { int len = getLength() - relativeDegree; if (len < 0) throw new IllegalPathException("Relative degree " + relativeDegree + " is more than depth for " + getAsString()); QPathEntry[] relPath = new Q...
java
public QPathEntry[] getRelPath(int relativeDegree) throws IllegalPathException { int len = getLength() - relativeDegree; if (len < 0) throw new IllegalPathException("Relative degree " + relativeDegree + " is more than depth for " + getAsString()); QPathEntry[] relPath = new Q...
[ "public", "QPathEntry", "[", "]", "getRelPath", "(", "int", "relativeDegree", ")", "throws", "IllegalPathException", "{", "int", "len", "=", "getLength", "(", ")", "-", "relativeDegree", ";", "if", "(", "len", "<", "0", ")", "throw", "new", "IllegalPathExcep...
Get relative path with degree. @param relativeDegree - degree value @return arrayf of QPathEntry @throws IllegalPathException - if the degree is invalid
[ "Get", "relative", "path", "with", "degree", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java#L132-L144
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java
QPath.getCommonAncestorPath
public static QPath getCommonAncestorPath(QPath firstPath, QPath secondPath) throws PathNotFoundException { if (!firstPath.getEntries()[0].equals(secondPath.getEntries()[0])) { throw new PathNotFoundException("For the given ways there is no common ancestor."); } List<QPathEntry> ca...
java
public static QPath getCommonAncestorPath(QPath firstPath, QPath secondPath) throws PathNotFoundException { if (!firstPath.getEntries()[0].equals(secondPath.getEntries()[0])) { throw new PathNotFoundException("For the given ways there is no common ancestor."); } List<QPathEntry> ca...
[ "public", "static", "QPath", "getCommonAncestorPath", "(", "QPath", "firstPath", ",", "QPath", "secondPath", ")", "throws", "PathNotFoundException", "{", "if", "(", "!", "firstPath", ".", "getEntries", "(", ")", "[", "0", "]", ".", "equals", "(", "secondPath",...
Get common ancestor path. @param firstPath @param secondPath @return The common ancestor of two paths. @throws PathNotFoundException
[ "Get", "common", "ancestor", "path", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java#L211-L233
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java
QPath.getAsString
public String getAsString() { if (stringName == null) { StringBuilder str = new StringBuilder(); for (int i = 0; i < getLength(); i++) { str.append(names[i].getAsString(true)); } stringName = str.toString(); } return stringName; }
java
public String getAsString() { if (stringName == null) { StringBuilder str = new StringBuilder(); for (int i = 0; i < getLength(); i++) { str.append(names[i].getAsString(true)); } stringName = str.toString(); } return stringName; }
[ "public", "String", "getAsString", "(", ")", "{", "if", "(", "stringName", "==", "null", ")", "{", "StringBuilder", "str", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "getLength", "(", ")", ";", "i",...
Get String representation. @return String
[ "Get", "String", "representation", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java#L264-L279
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java
QPath.parse
public static QPath parse(String qPath) throws IllegalPathException { if (qPath == null) throw new IllegalPathException("Bad internal path '" + qPath + "'"); if (qPath.length() < 2 || !qPath.startsWith("[]")) throw new IllegalPathException("Bad internal path '" + qPath + "'"); i...
java
public static QPath parse(String qPath) throws IllegalPathException { if (qPath == null) throw new IllegalPathException("Bad internal path '" + qPath + "'"); if (qPath.length() < 2 || !qPath.startsWith("[]")) throw new IllegalPathException("Bad internal path '" + qPath + "'"); i...
[ "public", "static", "QPath", "parse", "(", "String", "qPath", ")", "throws", "IllegalPathException", "{", "if", "(", "qPath", "==", "null", ")", "throw", "new", "IllegalPathException", "(", "\"Bad internal path '\"", "+", "qPath", "+", "\"'\"", ")", ";", "if",...
Parses string and make internal path from it. @param qPath - String to be parsed @return QPath @throws IllegalPathException - if string is invalid
[ "Parses", "string", "and", "make", "internal", "path", "from", "it", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java#L353-L398
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ConsistencyCheck.java
ConsistencyCheck.repair
void repair(boolean ignoreFailure) throws IOException { if (errors.size() == 0) { log.info("No errors found."); return; } int notRepairable = 0; for (Iterator<ConsistencyCheckError> it = errors.iterator(); it.hasNext();) { final ConsistencyCheckError err...
java
void repair(boolean ignoreFailure) throws IOException { if (errors.size() == 0) { log.info("No errors found."); return; } int notRepairable = 0; for (Iterator<ConsistencyCheckError> it = errors.iterator(); it.hasNext();) { final ConsistencyCheckError err...
[ "void", "repair", "(", "boolean", "ignoreFailure", ")", "throws", "IOException", "{", "if", "(", "errors", ".", "size", "(", ")", "==", "0", ")", "{", "log", ".", "info", "(", "\"No errors found.\"", ")", ";", "return", ";", "}", "int", "notRepairable", ...
Repairs detected errors during the consistency check. @param ignoreFailure if <code>true</code> repair failures are ignored, the repair continues without throwing an exception. If <code>false</code> the repair procedure is aborted on the first repair failure. @throws IOException if a repair failure occurs.
[ "Repairs", "detected", "errors", "during", "the", "consistency", "check", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ConsistencyCheck.java#L107-L159
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ConsistencyCheck.java
ConsistencyCheck.run
private void run() throws IOException, RepositoryException { // UUIDs of multiple nodes in the index Set<String> multipleEntries = new HashSet<String>(); // collect all documents UUIDs documentUUIDs = new HashSet<String>(); CachingMultiIndexReader reader = index.getIndexReader(); ...
java
private void run() throws IOException, RepositoryException { // UUIDs of multiple nodes in the index Set<String> multipleEntries = new HashSet<String>(); // collect all documents UUIDs documentUUIDs = new HashSet<String>(); CachingMultiIndexReader reader = index.getIndexReader(); ...
[ "private", "void", "run", "(", ")", "throws", "IOException", ",", "RepositoryException", "{", "// UUIDs of multiple nodes in the index", "Set", "<", "String", ">", "multipleEntries", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "// collect all documents...
Runs the consistency check. @throws IOException if an error occurs while running the check. @throws RepositoryException
[ "Runs", "the", "consistency", "check", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ConsistencyCheck.java#L175-L263
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java
RepositoryContainer.getWorkspaceContainer
public WorkspaceContainer getWorkspaceContainer(String workspaceName) { Object comp = getComponentInstance(workspaceName); return comp != null && comp instanceof WorkspaceContainer ? (WorkspaceContainer)comp : null; }
java
public WorkspaceContainer getWorkspaceContainer(String workspaceName) { Object comp = getComponentInstance(workspaceName); return comp != null && comp instanceof WorkspaceContainer ? (WorkspaceContainer)comp : null; }
[ "public", "WorkspaceContainer", "getWorkspaceContainer", "(", "String", "workspaceName", ")", "{", "Object", "comp", "=", "getComponentInstance", "(", "workspaceName", ")", ";", "return", "comp", "!=", "null", "&&", "comp", "instanceof", "WorkspaceContainer", "?", "...
Get workspace Container by name. @param workspaceName name @return WorkspaceContainer
[ "Get", "workspace", "Container", "by", "name", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java#L316-L320
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java
RepositoryContainer.getWorkspaceEntry
public WorkspaceEntry getWorkspaceEntry(String wsName) { for (WorkspaceEntry entry : config.getWorkspaceEntries()) { if (entry.getName().equals(wsName)) return entry; } return null; }
java
public WorkspaceEntry getWorkspaceEntry(String wsName) { for (WorkspaceEntry entry : config.getWorkspaceEntries()) { if (entry.getName().equals(wsName)) return entry; } return null; }
[ "public", "WorkspaceEntry", "getWorkspaceEntry", "(", "String", "wsName", ")", "{", "for", "(", "WorkspaceEntry", "entry", ":", "config", ".", "getWorkspaceEntries", "(", ")", ")", "{", "if", "(", "entry", ".", "getName", "(", ")", ".", "equals", "(", "wsN...
Get workspace configuration entry by name. @param wsName workspace name @return WorkspaceEntry
[ "Get", "workspace", "configuration", "entry", "by", "name", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java#L329-L337
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java
RepositoryContainer.load
private void load() throws RepositoryException { //Namespaces first NamespaceDataPersister namespacePersister = (NamespaceDataPersister)this.getComponentInstanceOfType(NamespaceDataPersister.class); NamespaceRegistryImpl nsRegistry = (NamespaceRegistryImpl)getNamespaceRegistry(); na...
java
private void load() throws RepositoryException { //Namespaces first NamespaceDataPersister namespacePersister = (NamespaceDataPersister)this.getComponentInstanceOfType(NamespaceDataPersister.class); NamespaceRegistryImpl nsRegistry = (NamespaceRegistryImpl)getNamespaceRegistry(); na...
[ "private", "void", "load", "(", ")", "throws", "RepositoryException", "{", "//Namespaces first", "NamespaceDataPersister", "namespacePersister", "=", "(", "NamespaceDataPersister", ")", "this", ".", "getComponentInstanceOfType", "(", "NamespaceDataPersister", ".", "class", ...
Load namespaces and nodetypes from persistent repository. <p> Runs on container start. @throws RepositoryException
[ "Load", "namespaces", "and", "nodetypes", "from", "persistent", "repository", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java#L846-L866
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/QueryImpl.java
QueryImpl.getSelectProperties
protected InternalQName[] getSelectProperties() throws RepositoryException { // get select properties List<InternalQName> selectProps = new ArrayList<InternalQName>(); selectProps.addAll(Arrays.asList(root.getSelectProperties())); if (selectProps.size() == 0) { // use node type...
java
protected InternalQName[] getSelectProperties() throws RepositoryException { // get select properties List<InternalQName> selectProps = new ArrayList<InternalQName>(); selectProps.addAll(Arrays.asList(root.getSelectProperties())); if (selectProps.size() == 0) { // use node type...
[ "protected", "InternalQName", "[", "]", "getSelectProperties", "(", ")", "throws", "RepositoryException", "{", "// get select properties", "List", "<", "InternalQName", ">", "selectProps", "=", "new", "ArrayList", "<", "InternalQName", ">", "(", ")", ";", "selectPro...
Returns the select properties for this query. @return array of select property names. @throws RepositoryException if an error occurs.
[ "Returns", "the", "select", "properties", "for", "this", "query", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/QueryImpl.java#L149-L201
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
WebDavServiceImpl.session
protected Session session(String repoName, String wsName, List<String> lockTokens) throws Exception, NoSuchWorkspaceException { // To be cloud compliant we need now to ignore the provided repository name (more details in JCR-2138) ManageableRepository repo = repositoryService.getCurrentReposito...
java
protected Session session(String repoName, String wsName, List<String> lockTokens) throws Exception, NoSuchWorkspaceException { // To be cloud compliant we need now to ignore the provided repository name (more details in JCR-2138) ManageableRepository repo = repositoryService.getCurrentReposito...
[ "protected", "Session", "session", "(", "String", "repoName", ",", "String", "wsName", ",", "List", "<", "String", ">", "lockTokens", ")", "throws", "Exception", ",", "NoSuchWorkspaceException", "{", "// To be cloud compliant we need now to ignore the provided repository na...
Gives access to the current session. @param repoName repository name @param wsName workspace name @param lockTokens Lock tokens @return current session @throws Exception {@link Exception}
[ "Gives", "access", "to", "the", "current", "session", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java#L1322-L1362
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
WebDavServiceImpl.getRepositoryName
protected String getRepositoryName(String repoName) throws RepositoryException { // To be cloud compliant we need now to ignore the provided repository name (more details in JCR-2138) ManageableRepository repo = repositoryService.getCurrentRepository(); String currentRepositoryName = repo.getCo...
java
protected String getRepositoryName(String repoName) throws RepositoryException { // To be cloud compliant we need now to ignore the provided repository name (more details in JCR-2138) ManageableRepository repo = repositoryService.getCurrentRepository(); String currentRepositoryName = repo.getCo...
[ "protected", "String", "getRepositoryName", "(", "String", "repoName", ")", "throws", "RepositoryException", "{", "// To be cloud compliant we need now to ignore the provided repository name (more details in JCR-2138)\r", "ManageableRepository", "repo", "=", "repositoryService", ".", ...
Gives the name of the repository to access. @param repoName the name of the expected repository. @return the name of the repository to access.
[ "Gives", "the", "name", "of", "the", "repository", "to", "access", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java#L1370-L1384
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
WebDavServiceImpl.normalizePath
protected String normalizePath(String repoPath) { if (repoPath.length() > 0 && repoPath.endsWith("/")) { return repoPath.substring(0, repoPath.length() - 1); } return repoPath; }
java
protected String normalizePath(String repoPath) { if (repoPath.length() > 0 && repoPath.endsWith("/")) { return repoPath.substring(0, repoPath.length() - 1); } return repoPath; }
[ "protected", "String", "normalizePath", "(", "String", "repoPath", ")", "{", "if", "(", "repoPath", ".", "length", "(", ")", ">", "0", "&&", "repoPath", ".", "endsWith", "(", "\"/\"", ")", ")", "{", "return", "repoPath", ".", "substring", "(", "0", ","...
Normalizes path. @param repoPath repository path @return normalized path.
[ "Normalizes", "path", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java#L1403-L1411
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
WebDavServiceImpl.path
protected String path(String repoPath, boolean withIndex) { String path = repoPath.substring(workspaceName(repoPath).length()); if (path.length() > 0) { if (!withIndex) { return TextUtil.removeIndexFromPath(path); } return path; } ...
java
protected String path(String repoPath, boolean withIndex) { String path = repoPath.substring(workspaceName(repoPath).length()); if (path.length() > 0) { if (!withIndex) { return TextUtil.removeIndexFromPath(path); } return path; } ...
[ "protected", "String", "path", "(", "String", "repoPath", ",", "boolean", "withIndex", ")", "{", "String", "path", "=", "repoPath", ".", "substring", "(", "workspaceName", "(", "repoPath", ")", ".", "length", "(", ")", ")", ";", "if", "(", "path", ".", ...
Extracts path from repository path. @param repoPath repository path @param withIndex indicates whether the index must be removed or not @return path
[ "Extracts", "path", "from", "repository", "path", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java#L1431-L1445
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
WebDavServiceImpl.lockTokens
protected List<String> lockTokens(String lockTokenHeader, String ifHeader) { ArrayList<String> lockTokens = new ArrayList<String>(); if (lockTokenHeader != null) { if (lockTokenHeader.startsWith("<")) { lockTokenHeader = lockTokenHeader.substring(1, lockTokenH...
java
protected List<String> lockTokens(String lockTokenHeader, String ifHeader) { ArrayList<String> lockTokens = new ArrayList<String>(); if (lockTokenHeader != null) { if (lockTokenHeader.startsWith("<")) { lockTokenHeader = lockTokenHeader.substring(1, lockTokenH...
[ "protected", "List", "<", "String", ">", "lockTokens", "(", "String", "lockTokenHeader", ",", "String", "ifHeader", ")", "{", "ArrayList", "<", "String", ">", "lockTokens", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "if", "(", "lockTokenHe...
Creates the list of Lock tokens from Lock-Token and If headers. @param lockTokenHeader Lock-Token HTTP header @param ifHeader If HTTP header @return the list of lock tokens
[ "Creates", "the", "list", "of", "Lock", "tokens", "from", "Lock", "-", "Token", "and", "If", "headers", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java#L1454-L1485
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
WebDavServiceImpl.buildURI
private URI buildURI(String path) throws URISyntaxException { try { return new URI(path); } catch (URISyntaxException e) { return new URI(TextUtil.escape(path, '%', true)); } }
java
private URI buildURI(String path) throws URISyntaxException { try { return new URI(path); } catch (URISyntaxException e) { return new URI(TextUtil.escape(path, '%', true)); } }
[ "private", "URI", "buildURI", "(", "String", "path", ")", "throws", "URISyntaxException", "{", "try", "{", "return", "new", "URI", "(", "path", ")", ";", "}", "catch", "(", "URISyntaxException", "e", ")", "{", "return", "new", "URI", "(", "TextUtil", "."...
Build URI from string.
[ "Build", "URI", "from", "string", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java#L1490-L1500
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
WebDavServiceImpl.isAllowedPath
private boolean isAllowedPath(String workspaceName, String path) { if(pattern == null) return true; Matcher matcher= pattern.matcher(workspaceName+":"+path); if(!matcher.find()) { log.warn("Access not allowed to webdav resource {}",path); return false; ...
java
private boolean isAllowedPath(String workspaceName, String path) { if(pattern == null) return true; Matcher matcher= pattern.matcher(workspaceName+":"+path); if(!matcher.find()) { log.warn("Access not allowed to webdav resource {}",path); return false; ...
[ "private", "boolean", "isAllowedPath", "(", "String", "workspaceName", ",", "String", "path", ")", "{", "if", "(", "pattern", "==", "null", ")", "return", "true", ";", "Matcher", "matcher", "=", "pattern", ".", "matcher", "(", "workspaceName", "+", "\":\"", ...
Check resource access allowed @param workspaceName @param path @return true if access is allowed otherwise false
[ "Check", "resource", "access", "allowed" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java#L1508-L1519
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/creation/RepositoryCreationServiceImpl.java
RepositoryCreationServiceImpl.createRepositoryInternally
protected void createRepositoryInternally(String backupId, RepositoryEntry rEntry, String rToken, DBCreationProperties creationProps) throws RepositoryConfigurationException, RepositoryCreationException { if (rpcService != null) { String stringRepositoryEntry = null; try ...
java
protected void createRepositoryInternally(String backupId, RepositoryEntry rEntry, String rToken, DBCreationProperties creationProps) throws RepositoryConfigurationException, RepositoryCreationException { if (rpcService != null) { String stringRepositoryEntry = null; try ...
[ "protected", "void", "createRepositoryInternally", "(", "String", "backupId", ",", "RepositoryEntry", "rEntry", ",", "String", "rToken", ",", "DBCreationProperties", "creationProps", ")", "throws", "RepositoryConfigurationException", ",", "RepositoryCreationException", "{", ...
Create repository internally. serverUrl and connProps contain specific properties for db creation.
[ "Create", "repository", "internally", ".", "serverUrl", "and", "connProps", "contain", "specific", "properties", "for", "db", "creation", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/creation/RepositoryCreationServiceImpl.java#L350-L443
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/creation/RepositoryCreationServiceImpl.java
RepositoryCreationServiceImpl.removeRepositoryLocally
protected void removeRepositoryLocally(String repositoryName, boolean forceRemove) throws RepositoryCreationException { try { // extract list of all datasources ManageableRepository repositorty = repositoryService.getRepository(repositoryName); Set<String> datasources = e...
java
protected void removeRepositoryLocally(String repositoryName, boolean forceRemove) throws RepositoryCreationException { try { // extract list of all datasources ManageableRepository repositorty = repositoryService.getRepository(repositoryName); Set<String> datasources = e...
[ "protected", "void", "removeRepositoryLocally", "(", "String", "repositoryName", ",", "boolean", "forceRemove", ")", "throws", "RepositoryCreationException", "{", "try", "{", "// extract list of all datasources\r", "ManageableRepository", "repositorty", "=", "repositoryService"...
Remove repository locally. @param repositoryName the repository name @throws RepositoryCreationException
[ "Remove", "repository", "locally", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/creation/RepositoryCreationServiceImpl.java#L879-L937
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java
PropFindResponseEntity.traverseResources
private void traverseResources(Resource resource, int counter) throws XMLStreamException, RepositoryException, IllegalResourceTypeException, URISyntaxException, UnsupportedEncodingException { xmlStreamWriter.writeStartElement("DAV:", "response"); xmlStreamWriter.writeStartElement("DAV:", "h...
java
private void traverseResources(Resource resource, int counter) throws XMLStreamException, RepositoryException, IllegalResourceTypeException, URISyntaxException, UnsupportedEncodingException { xmlStreamWriter.writeStartElement("DAV:", "response"); xmlStreamWriter.writeStartElement("DAV:", "h...
[ "private", "void", "traverseResources", "(", "Resource", "resource", ",", "int", "counter", ")", "throws", "XMLStreamException", ",", "RepositoryException", ",", "IllegalResourceTypeException", ",", "URISyntaxException", ",", "UnsupportedEncodingException", "{", "xmlStreamW...
Traverses resources and collects the vales of required properties. @param resource resource to traverse @param counter the depth @throws XMLStreamException {@link XMLStreamException} @throws RepositoryException {@link RepositoryException} @throws IllegalResourceTypeException {@link IllegalResourceTypeException} @throw...
[ "Traverses", "resources", "and", "collects", "the", "vales", "of", "required", "properties", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java#L183-L222
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/WorkspaceQuotaManager.java
WorkspaceQuotaManager.calculateWorkspaceDataSize
private void calculateWorkspaceDataSize() { long dataSize; try { dataSize = getWorkspaceDataSizeDirectly(); } catch (QuotaManagerException e1) { throw new IllegalStateException("Can't calculate workspace data size", e1); } ChangesItem changesItem = n...
java
private void calculateWorkspaceDataSize() { long dataSize; try { dataSize = getWorkspaceDataSizeDirectly(); } catch (QuotaManagerException e1) { throw new IllegalStateException("Can't calculate workspace data size", e1); } ChangesItem changesItem = n...
[ "private", "void", "calculateWorkspaceDataSize", "(", ")", "{", "long", "dataSize", ";", "try", "{", "dataSize", "=", "getWorkspaceDataSizeDirectly", "(", ")", ";", "}", "catch", "(", "QuotaManagerException", "e1", ")", "{", "throw", "new", "IllegalStateException"...
Calculates and accumulates workspace data size.
[ "Calculates", "and", "accumulates", "workspace", "data", "size", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/WorkspaceQuotaManager.java#L519-L536
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/metadata/AddMetadataAction.java
AddMetadataAction.printWarning
private void printWarning(PropertyImpl property, Exception exception) throws RepositoryException { if (PropertyManager.isDevelopping()) { LOG.warn("Binary value reader error, content by path " + property.getPath() + ", property id " + property.getData().getIdentifier() + " : " + exce...
java
private void printWarning(PropertyImpl property, Exception exception) throws RepositoryException { if (PropertyManager.isDevelopping()) { LOG.warn("Binary value reader error, content by path " + property.getPath() + ", property id " + property.getData().getIdentifier() + " : " + exce...
[ "private", "void", "printWarning", "(", "PropertyImpl", "property", ",", "Exception", "exception", ")", "throws", "RepositoryException", "{", "if", "(", "PropertyManager", ".", "isDevelopping", "(", ")", ")", "{", "LOG", ".", "warn", "(", "\"Binary value reader er...
Print warning message on the console @param property property that has not been read @param exception the reason for which wasn't read property @throws RepositoryException
[ "Print", "warning", "message", "on", "the", "console" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/metadata/AddMetadataAction.java#L140-L152
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/metadata/AddMetadataAction.java
AddMetadataAction.setJCRProperties
private void setJCRProperties(NodeImpl parent, Properties props) throws Exception { if (!parent.isNodeType("dc:elementSet")) { parent.addMixin("dc:elementSet"); } ValueFactory vFactory = parent.getSession().getValueFactory(); LocationFactory lFactory = parent.getSession().getL...
java
private void setJCRProperties(NodeImpl parent, Properties props) throws Exception { if (!parent.isNodeType("dc:elementSet")) { parent.addMixin("dc:elementSet"); } ValueFactory vFactory = parent.getSession().getValueFactory(); LocationFactory lFactory = parent.getSession().getL...
[ "private", "void", "setJCRProperties", "(", "NodeImpl", "parent", ",", "Properties", "props", ")", "throws", "Exception", "{", "if", "(", "!", "parent", ".", "isNodeType", "(", "\"dc:elementSet\"", ")", ")", "{", "parent", ".", "addMixin", "(", "\"dc:elementSe...
Sets metainfo properties as JCR properties to node.
[ "Sets", "metainfo", "properties", "as", "JCR", "properties", "to", "node", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/metadata/AddMetadataAction.java#L157-L194
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializerHelper.java
DBInitializerHelper.prepareScripts
private static String prepareScripts(String initScriptPath, String itemTableSuffix, String valueTableSuffix, String refTableSuffix, boolean isolatedDB) throws IOException { String scripts = IOUtil.getStreamContentAsString(PrivilegedFileHelper.getResourceAsStream(initScriptPath)); if (isolatedDB) ...
java
private static String prepareScripts(String initScriptPath, String itemTableSuffix, String valueTableSuffix, String refTableSuffix, boolean isolatedDB) throws IOException { String scripts = IOUtil.getStreamContentAsString(PrivilegedFileHelper.getResourceAsStream(initScriptPath)); if (isolatedDB) ...
[ "private", "static", "String", "prepareScripts", "(", "String", "initScriptPath", ",", "String", "itemTableSuffix", ",", "String", "valueTableSuffix", ",", "String", "refTableSuffix", ",", "boolean", "isolatedDB", ")", "throws", "IOException", "{", "String", "scripts"...
Preparing SQL scripts for database initialization.
[ "Preparing", "SQL", "scripts", "for", "database", "initialization", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializerHelper.java#L97-L110
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializerHelper.java
DBInitializerHelper.scriptPath
public static String scriptPath(String dbDialect, boolean multiDb) { String suffix = multiDb ? "m" : "s"; String sqlPath = null; if (dbDialect.startsWith(DBConstants.DB_DIALECT_ORACLE)) { sqlPath = "/conf/storage/jcr-" + suffix + "jdbc.ora.sql"; } else if (dbDialect.star...
java
public static String scriptPath(String dbDialect, boolean multiDb) { String suffix = multiDb ? "m" : "s"; String sqlPath = null; if (dbDialect.startsWith(DBConstants.DB_DIALECT_ORACLE)) { sqlPath = "/conf/storage/jcr-" + suffix + "jdbc.ora.sql"; } else if (dbDialect.star...
[ "public", "static", "String", "scriptPath", "(", "String", "dbDialect", ",", "boolean", "multiDb", ")", "{", "String", "suffix", "=", "multiDb", "?", "\"m\"", ":", "\"s\"", ";", "String", "sqlPath", "=", "null", ";", "if", "(", "dbDialect", ".", "startsWit...
Returns path where SQL scripts for database initialization is stored.
[ "Returns", "path", "where", "SQL", "scripts", "for", "database", "initialization", "is", "stored", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializerHelper.java#L115-L190
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializerHelper.java
DBInitializerHelper.getRootNodeInitializeScript
public static String getRootNodeInitializeScript(String itemTableName, boolean multiDb) { String singeDbScript = "insert into " + itemTableName + "(ID, PARENT_ID, NAME, CONTAINER_NAME, VERSION, I_CLASS, I_INDEX, " + "N_ORDER_NUM) VALUES('" + Constants.ROOT_PARENT_UUID + "', '" + Constants....
java
public static String getRootNodeInitializeScript(String itemTableName, boolean multiDb) { String singeDbScript = "insert into " + itemTableName + "(ID, PARENT_ID, NAME, CONTAINER_NAME, VERSION, I_CLASS, I_INDEX, " + "N_ORDER_NUM) VALUES('" + Constants.ROOT_PARENT_UUID + "', '" + Constants....
[ "public", "static", "String", "getRootNodeInitializeScript", "(", "String", "itemTableName", ",", "boolean", "multiDb", ")", "{", "String", "singeDbScript", "=", "\"insert into \"", "+", "itemTableName", "+", "\"(ID, PARENT_ID, NAME, CONTAINER_NAME, VERSION, I_CLASS, I_INDEX, \...
Initialization script for root node.
[ "Initialization", "script", "for", "root", "node", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializerHelper.java#L206-L219
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializerHelper.java
DBInitializerHelper.getObjectScript
public static String getObjectScript(String objectName, boolean multiDb, String dialect, WorkspaceEntry wsEntry) throws RepositoryConfigurationException, IOException { String scripts = prepareScripts(wsEntry, dialect); String sql = null; for (String query : JDBCUtils.splitWithSQLDelimiter(sc...
java
public static String getObjectScript(String objectName, boolean multiDb, String dialect, WorkspaceEntry wsEntry) throws RepositoryConfigurationException, IOException { String scripts = prepareScripts(wsEntry, dialect); String sql = null; for (String query : JDBCUtils.splitWithSQLDelimiter(sc...
[ "public", "static", "String", "getObjectScript", "(", "String", "objectName", ",", "boolean", "multiDb", ",", "String", "dialect", ",", "WorkspaceEntry", "wsEntry", ")", "throws", "RepositoryConfigurationException", ",", "IOException", "{", "String", "scripts", "=", ...
Returns SQL script for create objects such as index, primary of foreign key.
[ "Returns", "SQL", "script", "for", "create", "objects", "such", "as", "index", "primary", "of", "foreign", "key", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializerHelper.java#L303-L330
train