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/quota/ChangesLog.java
ChangesLog.getNodeChangedSize
public long getNodeChangedSize(String nodePath) { long nodeDelta = 0; Iterator<ChangesItem> changes = iterator(); while (changes.hasNext()) { nodeDelta += changes.next().getNodeChangedSize(nodePath); } return nodeDelta; }
java
public long getNodeChangedSize(String nodePath) { long nodeDelta = 0; Iterator<ChangesItem> changes = iterator(); while (changes.hasNext()) { nodeDelta += changes.next().getNodeChangedSize(nodePath); } return nodeDelta; }
[ "public", "long", "getNodeChangedSize", "(", "String", "nodePath", ")", "{", "long", "nodeDelta", "=", "0", ";", "Iterator", "<", "ChangesItem", ">", "changes", "=", "iterator", "(", ")", ";", "while", "(", "changes", ".", "hasNext", "(", ")", ")", "{", ...
Return changed size for particular node accumulated during some period.
[ "Return", "changed", "size", "for", "particular", "node", "accumulated", "during", "some", "period", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ChangesLog.java#L54-L65
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeImpl.java
NodeTypeImpl.checkValueConstraints
private boolean checkValueConstraints(int requiredType, String[] constraints, Value value) { ValueConstraintsMatcher constrMatcher = new ValueConstraintsMatcher(constraints, locationFactory, dataManager, nodeTypeDataManager); try { return constrMatcher.match(((BaseValue)va...
java
private boolean checkValueConstraints(int requiredType, String[] constraints, Value value) { ValueConstraintsMatcher constrMatcher = new ValueConstraintsMatcher(constraints, locationFactory, dataManager, nodeTypeDataManager); try { return constrMatcher.match(((BaseValue)va...
[ "private", "boolean", "checkValueConstraints", "(", "int", "requiredType", ",", "String", "[", "]", "constraints", ",", "Value", "value", ")", "{", "ValueConstraintsMatcher", "constrMatcher", "=", "new", "ValueConstraintsMatcher", "(", "constraints", ",", "locationFac...
Check value constrains. @param requiredType int @param constraints - string constrains. @param value - value to check. @return result of check.
[ "Check", "value", "constrains", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeImpl.java#L723-L736
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.createMembershipType
private MembershipType createMembershipType(Session session, MembershipTypeImpl mt, boolean broadcast) throws Exception { Node storageTypesNode = utils.getMembershipTypeStorageNode(session); Node typeNode = storageTypesNode.addNode(mt.getName().equals(MembershipTypeHandler.ANY_MEMBERSHIP_TYPE) ...
java
private MembershipType createMembershipType(Session session, MembershipTypeImpl mt, boolean broadcast) throws Exception { Node storageTypesNode = utils.getMembershipTypeStorageNode(session); Node typeNode = storageTypesNode.addNode(mt.getName().equals(MembershipTypeHandler.ANY_MEMBERSHIP_TYPE) ...
[ "private", "MembershipType", "createMembershipType", "(", "Session", "session", ",", "MembershipTypeImpl", "mt", ",", "boolean", "broadcast", ")", "throws", "Exception", "{", "Node", "storageTypesNode", "=", "utils", ".", "getMembershipTypeStorageNode", "(", "session", ...
Persists new membership type object.
[ "Persists", "new", "membership", "type", "object", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L104-L129
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.findMembershipType
private MembershipType findMembershipType(Session session, String name) throws Exception { Node membershipTypeNode; try { membershipTypeNode = utils.getMembershipTypeNode(session, name); } catch (PathNotFoundException e) { return null; } MembershipTy...
java
private MembershipType findMembershipType(Session session, String name) throws Exception { Node membershipTypeNode; try { membershipTypeNode = utils.getMembershipTypeNode(session, name); } catch (PathNotFoundException e) { return null; } MembershipTy...
[ "private", "MembershipType", "findMembershipType", "(", "Session", "session", ",", "String", "name", ")", "throws", "Exception", "{", "Node", "membershipTypeNode", ";", "try", "{", "membershipTypeNode", "=", "utils", ".", "getMembershipTypeNode", "(", "session", ","...
Find membership type.
[ "Find", "membership", "type", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L164-L180
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.removeMembershipType
private MembershipType removeMembershipType(Session session, String name, boolean broadcast) throws RepositoryException, Exception { Node membershipTypeNode = utils.getMembershipTypeNode(session, name); MembershipType type = readMembershipType(membershipTypeNode); if (broadcast) { ...
java
private MembershipType removeMembershipType(Session session, String name, boolean broadcast) throws RepositoryException, Exception { Node membershipTypeNode = utils.getMembershipTypeNode(session, name); MembershipType type = readMembershipType(membershipTypeNode); if (broadcast) { ...
[ "private", "MembershipType", "removeMembershipType", "(", "Session", "session", ",", "String", "name", ",", "boolean", "broadcast", ")", "throws", "RepositoryException", ",", "Exception", "{", "Node", "membershipTypeNode", "=", "utils", ".", "getMembershipTypeNode", "...
Removing membership type and related membership entities.
[ "Removing", "membership", "type", "and", "related", "membership", "entities", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L227-L251
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.removeMemberships
private void removeMemberships(Node membershipTypeNode) throws Exception { PropertyIterator refTypes = membershipTypeNode.getReferences(); while (refTypes.hasNext()) { Property refTypeProp = refTypes.nextProperty(); Node refTypeNode = refTypeProp.getParent(); Node refUse...
java
private void removeMemberships(Node membershipTypeNode) throws Exception { PropertyIterator refTypes = membershipTypeNode.getReferences(); while (refTypes.hasNext()) { Property refTypeProp = refTypes.nextProperty(); Node refTypeNode = refTypeProp.getParent(); Node refUse...
[ "private", "void", "removeMemberships", "(", "Node", "membershipTypeNode", ")", "throws", "Exception", "{", "PropertyIterator", "refTypes", "=", "membershipTypeNode", ".", "getReferences", "(", ")", ";", "while", "(", "refTypes", ".", "hasNext", "(", ")", ")", "...
Removes related membership entity.
[ "Removes", "related", "membership", "entity", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L256-L268
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.migrateMembershipType
void migrateMembershipType(Node oldMembershipTypeNode) throws Exception { MembershipType membershipType = readMembershipType(oldMembershipTypeNode); if (findMembershipType(membershipType.getName()) != null) { removeMembershipType(membershipType.getName(), false); } createMemb...
java
void migrateMembershipType(Node oldMembershipTypeNode) throws Exception { MembershipType membershipType = readMembershipType(oldMembershipTypeNode); if (findMembershipType(membershipType.getName()) != null) { removeMembershipType(membershipType.getName(), false); } createMemb...
[ "void", "migrateMembershipType", "(", "Node", "oldMembershipTypeNode", ")", "throws", "Exception", "{", "MembershipType", "membershipType", "=", "readMembershipType", "(", "oldMembershipTypeNode", ")", ";", "if", "(", "findMembershipType", "(", "membershipType", ".", "g...
Method for membership type migration. @param oldMembershipTypeNode the node where membershipType properties are stored (from old structure) @throws Exception
[ "Method", "for", "membership", "type", "migration", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L292-L302
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.saveMembershipType
private MembershipType saveMembershipType(Session session, MembershipTypeImpl mType, boolean broadcast) throws Exception { Node mtNode = getOrCreateMembershipTypeNode(session, mType); boolean isNew = mtNode.isNew(); if (broadcast) { preSave(mType, isNew); } Strin...
java
private MembershipType saveMembershipType(Session session, MembershipTypeImpl mType, boolean broadcast) throws Exception { Node mtNode = getOrCreateMembershipTypeNode(session, mType); boolean isNew = mtNode.isNew(); if (broadcast) { preSave(mType, isNew); } Strin...
[ "private", "MembershipType", "saveMembershipType", "(", "Session", "session", ",", "MembershipTypeImpl", "mType", ",", "boolean", "broadcast", ")", "throws", "Exception", "{", "Node", "mtNode", "=", "getOrCreateMembershipTypeNode", "(", "session", ",", "mType", ")", ...
Persists new membership type entity.
[ "Persists", "new", "membership", "type", "entity", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L307-L346
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.getOrCreateMembershipTypeNode
private Node getOrCreateMembershipTypeNode(Session session, MembershipTypeImpl mType) throws Exception { try { return mType.getInternalId() != null ? session.getNodeByUUID(mType.getInternalId()) : utils .getMembershipTypeNode(session, mType.getName()); } catch (ItemNotFou...
java
private Node getOrCreateMembershipTypeNode(Session session, MembershipTypeImpl mType) throws Exception { try { return mType.getInternalId() != null ? session.getNodeByUUID(mType.getInternalId()) : utils .getMembershipTypeNode(session, mType.getName()); } catch (ItemNotFou...
[ "private", "Node", "getOrCreateMembershipTypeNode", "(", "Session", "session", ",", "MembershipTypeImpl", "mType", ")", "throws", "Exception", "{", "try", "{", "return", "mType", ".", "getInternalId", "(", ")", "!=", "null", "?", "session", ".", "getNodeByUUID", ...
Creates and returns membership type node. If node already exists it will be returned otherwise the new one will be created.
[ "Creates", "and", "returns", "membership", "type", "node", ".", "If", "node", "already", "exists", "it", "will", "be", "returned", "otherwise", "the", "new", "one", "will", "be", "created", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L352-L367
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.createNewMembershipTypeNode
private Node createNewMembershipTypeNode(Session session, MembershipTypeImpl mType) throws Exception { Node storageTypesNode = utils.getMembershipTypeStorageNode(session); return storageTypesNode.addNode(mType.getName()); }
java
private Node createNewMembershipTypeNode(Session session, MembershipTypeImpl mType) throws Exception { Node storageTypesNode = utils.getMembershipTypeStorageNode(session); return storageTypesNode.addNode(mType.getName()); }
[ "private", "Node", "createNewMembershipTypeNode", "(", "Session", "session", ",", "MembershipTypeImpl", "mType", ")", "throws", "Exception", "{", "Node", "storageTypesNode", "=", "utils", ".", "getMembershipTypeStorageNode", "(", "session", ")", ";", "return", "storag...
Creates and returns new membership type node.
[ "Creates", "and", "returns", "new", "membership", "type", "node", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L372-L376
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.readMembershipType
private MembershipType readMembershipType(Node node) throws Exception { MembershipTypeImpl mt = new MembershipTypeImpl(); mt.setName(node.getName().equals(JCROrganizationServiceImpl.JOS_MEMBERSHIP_TYPE_ANY) ? ANY_MEMBERSHIP_TYPE : node .getName()); mt.setInternalId(node.getUUID()); m...
java
private MembershipType readMembershipType(Node node) throws Exception { MembershipTypeImpl mt = new MembershipTypeImpl(); mt.setName(node.getName().equals(JCROrganizationServiceImpl.JOS_MEMBERSHIP_TYPE_ANY) ? ANY_MEMBERSHIP_TYPE : node .getName()); mt.setInternalId(node.getUUID()); m...
[ "private", "MembershipType", "readMembershipType", "(", "Node", "node", ")", "throws", "Exception", "{", "MembershipTypeImpl", "mt", "=", "new", "MembershipTypeImpl", "(", ")", ";", "mt", ".", "setName", "(", "node", ".", "getName", "(", ")", ".", "equals", ...
Reads membership type from the node. @param node the node where membership type properties are stored
[ "Reads", "membership", "type", "from", "the", "node", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L384-L395
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.writeMembershipType
private void writeMembershipType(MembershipType membershipType, Node mtNode) throws Exception { if (!mtNode.isNodeType("exo:datetime")) { mtNode.addMixin("exo:datetime"); } mtNode.setProperty(MembershipTypeProperties.JOS_DESCRIPTION, membershipType.getDescription()); }
java
private void writeMembershipType(MembershipType membershipType, Node mtNode) throws Exception { if (!mtNode.isNodeType("exo:datetime")) { mtNode.addMixin("exo:datetime"); } mtNode.setProperty(MembershipTypeProperties.JOS_DESCRIPTION, membershipType.getDescription()); }
[ "private", "void", "writeMembershipType", "(", "MembershipType", "membershipType", ",", "Node", "mtNode", ")", "throws", "Exception", "{", "if", "(", "!", "mtNode", ".", "isNodeType", "(", "\"exo:datetime\"", ")", ")", "{", "mtNode", ".", "addMixin", "(", "\"e...
Writes membership type properties to the node. @param membershipType the membership type to store @param mtNode the node where membership type properties will be stored
[ "Writes", "membership", "type", "properties", "to", "the", "node", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L405-L411
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.getFromCache
private MembershipType getFromCache(String name) { return (MembershipType)cache.get(name, CacheType.MEMBERSHIPTYPE); }
java
private MembershipType getFromCache(String name) { return (MembershipType)cache.get(name, CacheType.MEMBERSHIPTYPE); }
[ "private", "MembershipType", "getFromCache", "(", "String", "name", ")", "{", "return", "(", "MembershipType", ")", "cache", ".", "get", "(", "name", ",", "CacheType", ".", "MEMBERSHIPTYPE", ")", ";", "}" ]
Gets membership type from cache.
[ "Gets", "membership", "type", "from", "cache", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L416-L419
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.removeAllRelatedFromCache
private void removeAllRelatedFromCache(String name) { cache.remove(CacheHandler.MEMBERSHIPTYPE_PREFIX + name, CacheType.MEMBERSHIP); }
java
private void removeAllRelatedFromCache(String name) { cache.remove(CacheHandler.MEMBERSHIPTYPE_PREFIX + name, CacheType.MEMBERSHIP); }
[ "private", "void", "removeAllRelatedFromCache", "(", "String", "name", ")", "{", "cache", ".", "remove", "(", "CacheHandler", ".", "MEMBERSHIPTYPE_PREFIX", "+", "name", ",", "CacheType", ".", "MEMBERSHIP", ")", ";", "}" ]
Removes all related memberships from cache.
[ "Removes", "all", "related", "memberships", "from", "cache", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L432-L435
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.moveMembershipsInCache
private void moveMembershipsInCache(String oldType, String newType) { cache.move(CacheHandler.MEMBERSHIPTYPE_PREFIX + oldType, CacheHandler.MEMBERSHIPTYPE_PREFIX + newType, CacheType.MEMBERSHIP); }
java
private void moveMembershipsInCache(String oldType, String newType) { cache.move(CacheHandler.MEMBERSHIPTYPE_PREFIX + oldType, CacheHandler.MEMBERSHIPTYPE_PREFIX + newType, CacheType.MEMBERSHIP); }
[ "private", "void", "moveMembershipsInCache", "(", "String", "oldType", ",", "String", "newType", ")", "{", "cache", ".", "move", "(", "CacheHandler", ".", "MEMBERSHIPTYPE_PREFIX", "+", "oldType", ",", "CacheHandler", ".", "MEMBERSHIPTYPE_PREFIX", "+", "newType", "...
Moves memberships in cache from old key to new one.
[ "Moves", "memberships", "in", "cache", "from", "old", "key", "to", "new", "one", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L440-L444
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.putInCache
private void putInCache(MembershipType mt) { cache.put(mt.getName(), mt, CacheType.MEMBERSHIPTYPE); }
java
private void putInCache(MembershipType mt) { cache.put(mt.getName(), mt, CacheType.MEMBERSHIPTYPE); }
[ "private", "void", "putInCache", "(", "MembershipType", "mt", ")", "{", "cache", ".", "put", "(", "mt", ".", "getName", "(", ")", ",", "mt", ",", "CacheType", ".", "MEMBERSHIPTYPE", ")", ";", "}" ]
Puts membership type in cache.
[ "Puts", "membership", "type", "in", "cache", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L449-L452
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.preSave
private void preSave(MembershipType type, boolean isNew) throws Exception { for (MembershipTypeEventListener listener : listeners) { listener.preSave(type, isNew); } }
java
private void preSave(MembershipType type, boolean isNew) throws Exception { for (MembershipTypeEventListener listener : listeners) { listener.preSave(type, isNew); } }
[ "private", "void", "preSave", "(", "MembershipType", "type", ",", "boolean", "isNew", ")", "throws", "Exception", "{", "for", "(", "MembershipTypeEventListener", "listener", ":", "listeners", ")", "{", "listener", ".", "preSave", "(", "type", ",", "isNew", ")"...
Notifying listeners before membership type creation. @param type the membership which is used in create operation @param isNew true, if we have a deal with new membership type, otherwise it is false which mean update operation is in progress @throws Exception if any listener failed to handle the event
[ "Notifying", "listeners", "before", "membership", "type", "creation", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L465-L471
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.postSave
private void postSave(MembershipType type, boolean isNew) throws Exception { for (MembershipTypeEventListener listener : listeners) { listener.postSave(type, isNew); } }
java
private void postSave(MembershipType type, boolean isNew) throws Exception { for (MembershipTypeEventListener listener : listeners) { listener.postSave(type, isNew); } }
[ "private", "void", "postSave", "(", "MembershipType", "type", ",", "boolean", "isNew", ")", "throws", "Exception", "{", "for", "(", "MembershipTypeEventListener", "listener", ":", "listeners", ")", "{", "listener", ".", "postSave", "(", "type", ",", "isNew", "...
Notifying listeners after membership type creation. @param type the membership which is used in create operation @param isNew true, if we have a deal with new membership type, otherwise it is false which mean update operation is in progress @throws Exception if any listener failed to handle the event
[ "Notifying", "listeners", "after", "membership", "type", "creation", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L484-L490
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.preDelete
private void preDelete(MembershipType type) throws Exception { for (MembershipTypeEventListener listener : listeners) { listener.preDelete(type); } }
java
private void preDelete(MembershipType type) throws Exception { for (MembershipTypeEventListener listener : listeners) { listener.preDelete(type); } }
[ "private", "void", "preDelete", "(", "MembershipType", "type", ")", "throws", "Exception", "{", "for", "(", "MembershipTypeEventListener", "listener", ":", "listeners", ")", "{", "listener", ".", "preDelete", "(", "type", ")", ";", "}", "}" ]
Notifying listeners before membership type deletion. @param type the membership which is used in delete operation @throws Exception if any listener failed to handle the event
[ "Notifying", "listeners", "before", "membership", "type", "deletion", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L500-L506
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java
MembershipTypeHandlerImpl.postDelete
private void postDelete(MembershipType type) throws Exception { for (MembershipTypeEventListener listener : listeners) { listener.postDelete(type); } }
java
private void postDelete(MembershipType type) throws Exception { for (MembershipTypeEventListener listener : listeners) { listener.postDelete(type); } }
[ "private", "void", "postDelete", "(", "MembershipType", "type", ")", "throws", "Exception", "{", "for", "(", "MembershipTypeEventListener", "listener", ":", "listeners", ")", "{", "listener", ".", "postDelete", "(", "type", ")", ";", "}", "}" ]
Notifying listeners after membership type deletion. @param type the membership which is used in delete operation @throws Exception if any listener failed to handle the event
[ "Notifying", "listeners", "after", "membership", "type", "deletion", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/MembershipTypeHandlerImpl.java#L516-L522
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/ACLWriter.java
ACLWriter.write
public void write(ObjectWriter out, AccessControlList acl) throws IOException { // write id out.writeInt(SerializationConstants.ACCESS_CONTROL_LIST); // Writing owner String owner = acl.getOwner(); if (owner != null) { out.writeByte(SerializationConstants.NOT_NU...
java
public void write(ObjectWriter out, AccessControlList acl) throws IOException { // write id out.writeInt(SerializationConstants.ACCESS_CONTROL_LIST); // Writing owner String owner = acl.getOwner(); if (owner != null) { out.writeByte(SerializationConstants.NOT_NU...
[ "public", "void", "write", "(", "ObjectWriter", "out", ",", "AccessControlList", "acl", ")", "throws", "IOException", "{", "// write id\r", "out", ".", "writeInt", "(", "SerializationConstants", ".", "ACCESS_CONTROL_LIST", ")", ";", "// Writing owner\r", "String", "...
Write AccessControlList data. @param out The ObjectWriter @param acl The AccessControlList object @throws IOException If an I/O error has occurred.
[ "Write", "AccessControlList", "data", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/ACLWriter.java#L49-L77
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java
GetCommand.validateRange
private boolean validateRange(Range range, long contentLength) { long start = range.getStart(); long end = range.getEnd(); // range set as bytes:-100 // take 100 bytes from end if (start < 0 && end == -1) { if ((-1 * start) >= contentLength) { ...
java
private boolean validateRange(Range range, long contentLength) { long start = range.getStart(); long end = range.getEnd(); // range set as bytes:-100 // take 100 bytes from end if (start < 0 && end == -1) { if ((-1 * start) >= contentLength) { ...
[ "private", "boolean", "validateRange", "(", "Range", "range", ",", "long", "contentLength", ")", "{", "long", "start", "=", "range", ".", "getStart", "(", ")", ";", "long", "end", "=", "range", ".", "getEnd", "(", ")", ";", "// range set as bytes:-100\r", ...
Checks is the range is valid. @param range range @param contentLength coontent length @return true if the range is valid else false
[ "Checks", "is", "the", "range", "is", "valid", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java#L287-L325
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java
GetCommand.generateCacheControl
private String generateCacheControl(Map<MediaType, String> cacheControlMap, String contentType) { ArrayList<MediaType> mediaTypesList = new ArrayList<MediaType>(cacheControlMap.keySet()); Collections.sort(mediaTypesList, MediaTypeHelper.MEDIA_TYPE_COMPARATOR); String cacheControlValue = "no-c...
java
private String generateCacheControl(Map<MediaType, String> cacheControlMap, String contentType) { ArrayList<MediaType> mediaTypesList = new ArrayList<MediaType>(cacheControlMap.keySet()); Collections.sort(mediaTypesList, MediaTypeHelper.MEDIA_TYPE_COMPARATOR); String cacheControlValue = "no-c...
[ "private", "String", "generateCacheControl", "(", "Map", "<", "MediaType", ",", "String", ">", "cacheControlMap", ",", "String", "contentType", ")", "{", "ArrayList", "<", "MediaType", ">", "mediaTypesList", "=", "new", "ArrayList", "<", "MediaType", ">", "(", ...
Generates the value of Cache-Control header according to the content type. @param contentType content type @return Cache-Control value
[ "Generates", "the", "value", "of", "Cache", "-", "Control", "header", "according", "to", "the", "content", "type", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java#L333-L359
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/RepositoryImpl.java
RepositoryImpl.internalRemoveWorkspace
public void internalRemoveWorkspace(final String workspaceName) throws RepositoryException { SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION); final WorkspaceContainer workspaceContainer = repositoryContainer.getWorkspaceContainer(workspaceName); try ...
java
public void internalRemoveWorkspace(final String workspaceName) throws RepositoryException { SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION); final WorkspaceContainer workspaceContainer = repositoryContainer.getWorkspaceContainer(workspaceName); try ...
[ "public", "void", "internalRemoveWorkspace", "(", "final", "String", "workspaceName", ")", "throws", "RepositoryException", "{", "SecurityHelper", ".", "validateSecurityPermission", "(", "JCRRuntimePermissions", ".", "MANAGE_REPOSITORY_PERMISSION", ")", ";", "final", "Works...
Internal Remove Workspace. @param workspaceName workspace name @throws RepositoryException error of remove
[ "Internal", "Remove", "Workspace", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/RepositoryImpl.java#L543-L578
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/RepositoryImpl.java
RepositoryImpl.internalLogin
SessionImpl internalLogin(ConversationState state, String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException { if (workspaceName == null) { workspaceName = config.getDefaultWorkspaceName(); if (workspaceName == null) { throw n...
java
SessionImpl internalLogin(ConversationState state, String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException { if (workspaceName == null) { workspaceName = config.getDefaultWorkspaceName(); if (workspaceName == null) { throw n...
[ "SessionImpl", "internalLogin", "(", "ConversationState", "state", ",", "String", "workspaceName", ")", "throws", "LoginException", ",", "NoSuchWorkspaceException", ",", "RepositoryException", "{", "if", "(", "workspaceName", "==", "null", ")", "{", "workspaceName", "...
Internal login. @param state ConversationState @param workspaceName workspace name @return SessionImpl @throws LoginException error of logic @throws NoSuchWorkspaceException if no workspace found with name @throws RepositoryException Repository error
[ "Internal", "login", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/RepositoryImpl.java#L684-L705
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/ItemStateWriter.java
ItemStateWriter.write
public void write(ObjectWriter out, ItemState itemState) throws IOException { // write id out.writeInt(SerializationConstants.ITEM_STATE); out.writeInt(itemState.getState()); out.writeBoolean(itemState.isPersisted()); out.writeBoolean(itemState.isEventFire()); if (itemS...
java
public void write(ObjectWriter out, ItemState itemState) throws IOException { // write id out.writeInt(SerializationConstants.ITEM_STATE); out.writeInt(itemState.getState()); out.writeBoolean(itemState.isPersisted()); out.writeBoolean(itemState.isEventFire()); if (itemS...
[ "public", "void", "write", "(", "ObjectWriter", "out", ",", "ItemState", "itemState", ")", "throws", "IOException", "{", "// write id\r", "out", ".", "writeInt", "(", "SerializationConstants", ".", "ITEM_STATE", ")", ";", "out", ".", "writeInt", "(", "itemState"...
Write item state into file. @param out ObjectWriter @param itemState ItemState @throws IOException if any Exception is occurred
[ "Write", "item", "state", "into", "file", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/ItemStateWriter.java#L53-L89
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPathEntry.java
QPathEntry.getAsString
public String getAsString(boolean showIndex) { if (showIndex) { if (cachedToStringShowIndex != null) { return cachedToStringShowIndex; } } else { if (cachedToString != null) { return cachedToString; ...
java
public String getAsString(boolean showIndex) { if (showIndex) { if (cachedToStringShowIndex != null) { return cachedToStringShowIndex; } } else { if (cachedToString != null) { return cachedToString; ...
[ "public", "String", "getAsString", "(", "boolean", "showIndex", ")", "{", "if", "(", "showIndex", ")", "{", "if", "(", "cachedToStringShowIndex", "!=", "null", ")", "{", "return", "cachedToStringShowIndex", ";", "}", "}", "else", "{", "if", "(", "cachedToStr...
Return entry textual representation. @return - if showIndex=false it's a string without index
[ "Return", "entry", "textual", "representation", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPathEntry.java#L180-L220
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeDataManagerImpl.java
NodeTypeDataManagerImpl.registerListOfNodeTypes
private List<NodeTypeData> registerListOfNodeTypes(final List<NodeTypeData> nodeTypes, final int alreadyExistsBehaviour) throws RepositoryException { // validate nodeTypeDataValidator.validateNodeType(nodeTypes); nodeTypeRepository.registerNodeType(nodeTypes, this, accessControlPolicy,...
java
private List<NodeTypeData> registerListOfNodeTypes(final List<NodeTypeData> nodeTypes, final int alreadyExistsBehaviour) throws RepositoryException { // validate nodeTypeDataValidator.validateNodeType(nodeTypes); nodeTypeRepository.registerNodeType(nodeTypes, this, accessControlPolicy,...
[ "private", "List", "<", "NodeTypeData", ">", "registerListOfNodeTypes", "(", "final", "List", "<", "NodeTypeData", ">", "nodeTypes", ",", "final", "int", "alreadyExistsBehaviour", ")", "throws", "RepositoryException", "{", "// validate\r", "nodeTypeDataValidator", ".", ...
Registers the provided node types
[ "Registers", "the", "provided", "node", "types" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeDataManagerImpl.java#L842-L874
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/RangeQuery.java
RangeQuery.rewrite
public Query rewrite(IndexReader reader) throws IOException { if (transform == TRANSFORM_NONE) { Query stdRangeQueryImpl = new TermRangeQuery(lowerTerm.field(), lowerTerm.text(), upperTerm.text(), inclusive, inclusive); try { stdRangeQuery = stdRangeQuer...
java
public Query rewrite(IndexReader reader) throws IOException { if (transform == TRANSFORM_NONE) { Query stdRangeQueryImpl = new TermRangeQuery(lowerTerm.field(), lowerTerm.text(), upperTerm.text(), inclusive, inclusive); try { stdRangeQuery = stdRangeQuer...
[ "public", "Query", "rewrite", "(", "IndexReader", "reader", ")", "throws", "IOException", "{", "if", "(", "transform", "==", "TRANSFORM_NONE", ")", "{", "Query", "stdRangeQueryImpl", "=", "new", "TermRangeQuery", "(", "lowerTerm", ".", "field", "(", ")", ",", ...
Tries to rewrite this query into a standard lucene RangeQuery. This rewrite might fail with a TooManyClauses exception. If that happens, we use our own implementation. @param reader the index reader. @return the rewritten query or this query if rewriting is not possible. @throws IOException if an error occurs.
[ "Tries", "to", "rewrite", "this", "query", "into", "a", "standard", "lucene", "RangeQuery", ".", "This", "rewrite", "might", "fail", "with", "a", "TooManyClauses", "exception", ".", "If", "that", "happens", "we", "use", "our", "own", "implementation", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/RangeQuery.java#L145-L168
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/PrivilegedISPNCacheHelper.java
PrivilegedISPNCacheHelper.start
public static void start(final Cache<Serializable, Object> cache) { PrivilegedAction<Object> action = new PrivilegedAction<Object>() { public Object run() { cache.start(); return null; } }; SecurityHelper.doPrivilegedAction(action); }
java
public static void start(final Cache<Serializable, Object> cache) { PrivilegedAction<Object> action = new PrivilegedAction<Object>() { public Object run() { cache.start(); return null; } }; SecurityHelper.doPrivilegedAction(action); }
[ "public", "static", "void", "start", "(", "final", "Cache", "<", "Serializable", ",", "Object", ">", "cache", ")", "{", "PrivilegedAction", "<", "Object", ">", "action", "=", "new", "PrivilegedAction", "<", "Object", ">", "(", ")", "{", "public", "Object",...
Start Infinispan cache in privileged mode. @param cache
[ "Start", "Infinispan", "cache", "in", "privileged", "mode", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/PrivilegedISPNCacheHelper.java#L41-L52
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/PrivilegedISPNCacheHelper.java
PrivilegedISPNCacheHelper.put
public static Object put(final Cache<Serializable, Object> cache, final Serializable key, final Object value, final long lifespan, final TimeUnit unit) { PrivilegedAction<Object> action = new PrivilegedAction<Object>() { public Object run() { return cache.put(key, valu...
java
public static Object put(final Cache<Serializable, Object> cache, final Serializable key, final Object value, final long lifespan, final TimeUnit unit) { PrivilegedAction<Object> action = new PrivilegedAction<Object>() { public Object run() { return cache.put(key, valu...
[ "public", "static", "Object", "put", "(", "final", "Cache", "<", "Serializable", ",", "Object", ">", "cache", ",", "final", "Serializable", "key", ",", "final", "Object", "value", ",", "final", "long", "lifespan", ",", "final", "TimeUnit", "unit", ")", "{"...
Put in Infinispan cache in privileged mode. @param cache
[ "Put", "in", "Infinispan", "cache", "in", "privileged", "mode", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/PrivilegedISPNCacheHelper.java#L111-L122
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/LockCommand.java
LockCommand.lock
public Response lock(Session session, String path, HierarchicalProperty body, Depth depth, String timeout) { boolean bodyIsEmpty = (body == null); String lockToken; //To force read only mode when open a document by user with only read permission if(isReadOnly(session, path)) {...
java
public Response lock(Session session, String path, HierarchicalProperty body, Depth depth, String timeout) { boolean bodyIsEmpty = (body == null); String lockToken; //To force read only mode when open a document by user with only read permission if(isReadOnly(session, path)) {...
[ "public", "Response", "lock", "(", "Session", "session", ",", "String", "path", ",", "HierarchicalProperty", "body", ",", "Depth", "depth", ",", "String", "timeout", ")", "{", "boolean", "bodyIsEmpty", "=", "(", "body", "==", "null", ")", ";", "String", "l...
Webdav Lock comand implementation. @param session current session @param path resource path @param body request body @param depth lock depth @param timeout lock timeout @return the instance of javax.ws.rs.core.Response
[ "Webdav", "Lock", "comand", "implementation", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/LockCommand.java#L90-L169
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/LockCommand.java
LockCommand.body
private StreamingOutput body(WebDavNamespaceContext nsContext, LockRequestEntity input, Depth depth, String lockToken, String lockOwner, String timeout) { return new LockResultResponseEntity(nsContext, lockToken, lockOwner, timeout); }
java
private StreamingOutput body(WebDavNamespaceContext nsContext, LockRequestEntity input, Depth depth, String lockToken, String lockOwner, String timeout) { return new LockResultResponseEntity(nsContext, lockToken, lockOwner, timeout); }
[ "private", "StreamingOutput", "body", "(", "WebDavNamespaceContext", "nsContext", ",", "LockRequestEntity", "input", ",", "Depth", "depth", ",", "String", "lockToken", ",", "String", "lockOwner", ",", "String", "timeout", ")", "{", "return", "new", "LockResultRespon...
Writes response body into the stream. @param nsContext name space context @param input request body @param depth lock depth @param lockToken lock token key @param lockOwner loco owner @param timeout lock timeout @return response body
[ "Writes", "response", "body", "into", "the", "stream", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/LockCommand.java#L182-L186
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/LockCommand.java
LockCommand.isReadOnly
private boolean isReadOnly(Session session, String path) { try { session.checkPermission(path, PermissionType.SET_PROPERTY); return false; } catch (AccessControlException e) { return true; } catch (RepositoryException e) { ...
java
private boolean isReadOnly(Session session, String path) { try { session.checkPermission(path, PermissionType.SET_PROPERTY); return false; } catch (AccessControlException e) { return true; } catch (RepositoryException e) { ...
[ "private", "boolean", "isReadOnly", "(", "Session", "session", ",", "String", "path", ")", "{", "try", "{", "session", ".", "checkPermission", "(", "path", ",", "PermissionType", ".", "SET_PROPERTY", ")", ";", "return", "false", ";", "}", "catch", "(", "Ac...
Check node permission @param session current jcr user session @param path node path @return true if node is read only otherwise false
[ "Check", "node", "permission" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/LockCommand.java#L269-L284
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/QueryNode.java
QueryNode.dump
public String dump() throws RepositoryException { StringBuilder tmp = new StringBuilder(); QueryTreeDump.dump(this, tmp); return tmp.toString(); }
java
public String dump() throws RepositoryException { StringBuilder tmp = new StringBuilder(); QueryTreeDump.dump(this, tmp); return tmp.toString(); }
[ "public", "String", "dump", "(", ")", "throws", "RepositoryException", "{", "StringBuilder", "tmp", "=", "new", "StringBuilder", "(", ")", ";", "QueryTreeDump", ".", "dump", "(", "this", ",", "tmp", ")", ";", "return", "tmp", ".", "toString", "(", ")", "...
Dumps this QueryNode and its child nodes to a String. @return the query tree as a String. @throws RepositoryException
[ "Dumps", "this", "QueryNode", "and", "its", "child", "nodes", "to", "a", "String", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/QueryNode.java#L99-L103
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
SearchManager.createQuery
public Query createQuery(SessionImpl session, SessionDataManager sessionDataManager, Node node) throws InvalidQueryException, RepositoryException { AbstractQueryImpl query = createQueryInstance(); query.init(session, sessionDataManager, handler, node); return query; }
java
public Query createQuery(SessionImpl session, SessionDataManager sessionDataManager, Node node) throws InvalidQueryException, RepositoryException { AbstractQueryImpl query = createQueryInstance(); query.init(session, sessionDataManager, handler, node); return query; }
[ "public", "Query", "createQuery", "(", "SessionImpl", "session", ",", "SessionDataManager", "sessionDataManager", ",", "Node", "node", ")", "throws", "InvalidQueryException", ",", "RepositoryException", "{", "AbstractQueryImpl", "query", "=", "createQueryInstance", "(", ...
Creates a query object from a node that can be executed on the workspace. @param session the session of the user executing the query. @param sessionDataManager the item manager of the user executing the query. Needed to return <code>Node</code> instances in the result set. @param node a node of type nt:query. @return ...
[ "Creates", "a", "query", "object", "from", "a", "node", "that", "can", "be", "executed", "on", "the", "workspace", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java#L366-L372
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
SearchManager.createQuery
public Query createQuery(SessionImpl session, SessionDataManager sessionDataManager, String statement, String language) throws InvalidQueryException, RepositoryException { AbstractQueryImpl query = createQueryInstance(); query.init(session, sessionDataManager, handler, statement, language); ...
java
public Query createQuery(SessionImpl session, SessionDataManager sessionDataManager, String statement, String language) throws InvalidQueryException, RepositoryException { AbstractQueryImpl query = createQueryInstance(); query.init(session, sessionDataManager, handler, statement, language); ...
[ "public", "Query", "createQuery", "(", "SessionImpl", "session", ",", "SessionDataManager", "sessionDataManager", ",", "String", "statement", ",", "String", "language", ")", "throws", "InvalidQueryException", ",", "RepositoryException", "{", "AbstractQueryImpl", "query", ...
Creates a query object that can be executed on the workspace. @param session the session of the user executing the query. @param sessionDataManager the item manager of the user executing the query. Needed to return <code>Node</code> instances in the result set. @param statement the actual query statement. @param langu...
[ "Creates", "a", "query", "object", "that", "can", "be", "executed", "on", "the", "workspace", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java#L393-L399
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
SearchManager.checkIndex
public void checkIndex(final InspectionReport report, final boolean isSystem) throws RepositoryException, IOException { if (isSuspended.get()) { try { SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Object>() { ...
java
public void checkIndex(final InspectionReport report, final boolean isSystem) throws RepositoryException, IOException { if (isSuspended.get()) { try { SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Object>() { ...
[ "public", "void", "checkIndex", "(", "final", "InspectionReport", "report", ",", "final", "boolean", "isSystem", ")", "throws", "RepositoryException", ",", "IOException", "{", "if", "(", "isSuspended", ".", "get", "(", ")", ")", "{", "try", "{", "SecurityHelpe...
Check index consistency. Iterator goes through index documents and check, does each document have according jcr-node. If index is suspended then it will be temporary resumed, while check is running and suspended afterwards.
[ "Check", "index", "consistency", ".", "Iterator", "goes", "through", "index", "documents", "and", "check", "does", "each", "document", "have", "according", "jcr", "-", "node", ".", "If", "index", "is", "suspended", "then", "it", "will", "be", "temporary", "r...
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java#L406-L474
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
SearchManager.getNodesByUri
public Set<String> getNodesByUri(final String uri) throws RepositoryException { Set<String> result; final int defaultClauseCount = BooleanQuery.getMaxClauseCount(); try { // final LocationFactory locationFactory = new // LocationFactory(this); final ValueF...
java
public Set<String> getNodesByUri(final String uri) throws RepositoryException { Set<String> result; final int defaultClauseCount = BooleanQuery.getMaxClauseCount(); try { // final LocationFactory locationFactory = new // LocationFactory(this); final ValueF...
[ "public", "Set", "<", "String", ">", "getNodesByUri", "(", "final", "String", "uri", ")", "throws", "RepositoryException", "{", "Set", "<", "String", ">", "result", ";", "final", "int", "defaultClauseCount", "=", "BooleanQuery", ".", "getMaxClauseCount", "(", ...
Return set of uuid of nodes. Contains in names prefixes maped to the given uri @param uri @return @throws RepositoryException
[ "Return", "set", "of", "uuid", "of", "nodes", ".", "Contains", "in", "names", "prefixes", "maped", "to", "the", "given", "uri" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java#L540-L596
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
SearchManager.getIndexDirParam
protected String getIndexDirParam() throws RepositoryConfigurationException { String dir = config.getParameterValue(QueryHandlerParams.PARAM_INDEX_DIR, null); if (dir == null) { LOG.warn(QueryHandlerParams.PARAM_INDEX_DIR + " parameter not found. Using outdated parameter name " ...
java
protected String getIndexDirParam() throws RepositoryConfigurationException { String dir = config.getParameterValue(QueryHandlerParams.PARAM_INDEX_DIR, null); if (dir == null) { LOG.warn(QueryHandlerParams.PARAM_INDEX_DIR + " parameter not found. Using outdated parameter name " ...
[ "protected", "String", "getIndexDirParam", "(", ")", "throws", "RepositoryConfigurationException", "{", "String", "dir", "=", "config", ".", "getParameterValue", "(", "QueryHandlerParams", ".", "PARAM_INDEX_DIR", ",", "null", ")", ";", "if", "(", "dir", "==", "nul...
^ Returns "index-dir" parameter from configuration.
[ "^", "Returns", "index", "-", "dir", "parameter", "from", "configuration", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java#L857-L867
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
SearchManager.initializeChangesFilter
@SuppressWarnings("unchecked") protected IndexerChangesFilter initializeChangesFilter() throws RepositoryException, RepositoryConfigurationException { IndexerChangesFilter newChangesFilter = null; Class<? extends IndexerChangesFilter> changesFilterClass = DefaultChangesFilter.class; ...
java
@SuppressWarnings("unchecked") protected IndexerChangesFilter initializeChangesFilter() throws RepositoryException, RepositoryConfigurationException { IndexerChangesFilter newChangesFilter = null; Class<? extends IndexerChangesFilter> changesFilterClass = DefaultChangesFilter.class; ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "IndexerChangesFilter", "initializeChangesFilter", "(", ")", "throws", "RepositoryException", ",", "RepositoryConfigurationException", "{", "IndexerChangesFilter", "newChangesFilter", "=", "null", ";", "Class", ...
Initialize changes filter. @throws RepositoryException @throws RepositoryConfigurationException @throws SecurityException
[ "Initialize", "changes", "filter", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java#L891-L946
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
SearchManager.initializeQueryHandler
protected void initializeQueryHandler() throws RepositoryException, RepositoryConfigurationException { // initialize query handler String className = config.getType(); if (className == null) { throw new RepositoryConfigurationException("Content hanler configuration fail")...
java
protected void initializeQueryHandler() throws RepositoryException, RepositoryConfigurationException { // initialize query handler String className = config.getType(); if (className == null) { throw new RepositoryConfigurationException("Content hanler configuration fail")...
[ "protected", "void", "initializeQueryHandler", "(", ")", "throws", "RepositoryException", ",", "RepositoryConfigurationException", "{", "// initialize query handler\r", "String", "className", "=", "config", ".", "getType", "(", ")", ";", "if", "(", "className", "==", ...
Initializes the query handler. @throws RepositoryException if the query handler cannot be initialized. @throws RepositoryConfigurationException
[ "Initializes", "the", "query", "handler", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java#L955-L1019
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
SearchManager.setOnline
public void setOnline(boolean isOnline, boolean allowQuery, boolean dropStaleIndexes) throws IOException { handler.setOnline(isOnline, allowQuery, dropStaleIndexes); }
java
public void setOnline(boolean isOnline, boolean allowQuery, boolean dropStaleIndexes) throws IOException { handler.setOnline(isOnline, allowQuery, dropStaleIndexes); }
[ "public", "void", "setOnline", "(", "boolean", "isOnline", ",", "boolean", "allowQuery", ",", "boolean", "dropStaleIndexes", ")", "throws", "IOException", "{", "handler", ".", "setOnline", "(", "isOnline", ",", "allowQuery", ",", "dropStaleIndexes", ")", ";", "}...
Switches index into corresponding ONLINE or OFFLINE mode. Offline mode means that new indexing data is collected but index is guaranteed to be unmodified during offline state. Passing the allowQuery flag, can allow or deny performing queries on index during offline mode. AllowQuery is not used when setting index back o...
[ "Switches", "index", "into", "corresponding", "ONLINE", "or", "OFFLINE", "mode", ".", "Offline", "mode", "means", "that", "new", "indexing", "data", "is", "collected", "but", "index", "is", "guaranteed", "to", "be", "unmodified", "during", "offline", "state", ...
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java#L1201-L1204
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
SearchManager.reindexWorkspace
public CompletableFuture<Boolean> reindexWorkspace(final boolean dropExisting, int nThreads) throws IllegalStateException { // checks if (handler == null || handler.getIndexerIoModeHandler() == null || changesFilter == null) { throw new IllegalStateException("Index might have not been...
java
public CompletableFuture<Boolean> reindexWorkspace(final boolean dropExisting, int nThreads) throws IllegalStateException { // checks if (handler == null || handler.getIndexerIoModeHandler() == null || changesFilter == null) { throw new IllegalStateException("Index might have not been...
[ "public", "CompletableFuture", "<", "Boolean", ">", "reindexWorkspace", "(", "final", "boolean", "dropExisting", ",", "int", "nThreads", ")", "throws", "IllegalStateException", "{", "// checks\r", "if", "(", "handler", "==", "null", "||", "handler", ".", "getIndex...
Perform hot reindexing of the workspace @param dropExisting use the same index directory (if "true") and all queries will throw an exception while task is running. Otherwise (if "false") Server can continue working as expected while index is recreated (the new index is created under a new index folder). @param nThread...
[ "Perform", "hot", "reindexing", "of", "the", "workspace" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java#L1366-L1395
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
SearchManager.cleanIndexDirectory
private void cleanIndexDirectory(String path) throws IOException { SecurityHelper.doPrivilegedIOExceptionAction((PrivilegedExceptionAction<Void>) () -> { File newIndexFolder = new File(path); if(newIndexFolder.exists()) { DirectoryHelper.removeDirectory(newIndexFold...
java
private void cleanIndexDirectory(String path) throws IOException { SecurityHelper.doPrivilegedIOExceptionAction((PrivilegedExceptionAction<Void>) () -> { File newIndexFolder = new File(path); if(newIndexFolder.exists()) { DirectoryHelper.removeDirectory(newIndexFold...
[ "private", "void", "cleanIndexDirectory", "(", "String", "path", ")", "throws", "IOException", "{", "SecurityHelper", ".", "doPrivilegedIOExceptionAction", "(", "(", "PrivilegedExceptionAction", "<", "Void", ">", ")", "(", ")", "->", "{", "File", "newIndexFolder", ...
remove index directory if exist @param path index directory path @throws IOException
[ "remove", "index", "directory", "if", "exist" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java#L1846-L1856
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializer.java
DBInitializer.postInit
protected void postInit(Connection connection) throws SQLException { String select = "select * from " + DBInitializerHelper.getItemTableName(containerConfig) + " where ID='" + Constants.ROOT_PARENT_UUID + "' and PARENT_ID='" + Constants.ROOT_PARENT_UUID + "'"; if (!connection.create...
java
protected void postInit(Connection connection) throws SQLException { String select = "select * from " + DBInitializerHelper.getItemTableName(containerConfig) + " where ID='" + Constants.ROOT_PARENT_UUID + "' and PARENT_ID='" + Constants.ROOT_PARENT_UUID + "'"; if (!connection.create...
[ "protected", "void", "postInit", "(", "Connection", "connection", ")", "throws", "SQLException", "{", "String", "select", "=", "\"select * from \"", "+", "DBInitializerHelper", ".", "getItemTableName", "(", "containerConfig", ")", "+", "\" where ID='\"", "+", "Constan...
Init root node parent record.
[ "Init", "root", "node", "parent", "record", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializer.java#L411-L422
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChangesHolder.java
ChangesHolder.getIndexParameter
private static Field.Index getIndexParameter(int flags) { if ((flags & INDEXED_FLAG) == 0) { return Field.Index.NO; } else if ((flags & TOKENIZED_FLAG) > 0) { return Field.Index.ANALYZED; } else { return Field.Index.NOT_ANALYZED; } }
java
private static Field.Index getIndexParameter(int flags) { if ((flags & INDEXED_FLAG) == 0) { return Field.Index.NO; } else if ((flags & TOKENIZED_FLAG) > 0) { return Field.Index.ANALYZED; } else { return Field.Index.NOT_ANALYZED; } }
[ "private", "static", "Field", ".", "Index", "getIndexParameter", "(", "int", "flags", ")", "{", "if", "(", "(", "flags", "&", "INDEXED_FLAG", ")", "==", "0", ")", "{", "return", "Field", ".", "Index", ".", "NO", ";", "}", "else", "if", "(", "(", "f...
Returns the index parameter extracted from the flags. @param flags the flags of the Lucene field. @return the index parameter corresponding to the given flags.
[ "Returns", "the", "index", "parameter", "extracted", "from", "the", "flags", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChangesHolder.java#L200-L214
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChangesHolder.java
ChangesHolder.getStoreParameter
private static Field.Store getStoreParameter(int flags) { if ((flags & STORED_FLAG) > 0) { return Field.Store.YES; } else { return Field.Store.NO; } }
java
private static Field.Store getStoreParameter(int flags) { if ((flags & STORED_FLAG) > 0) { return Field.Store.YES; } else { return Field.Store.NO; } }
[ "private", "static", "Field", ".", "Store", "getStoreParameter", "(", "int", "flags", ")", "{", "if", "(", "(", "flags", "&", "STORED_FLAG", ")", ">", "0", ")", "{", "return", "Field", ".", "Store", ".", "YES", ";", "}", "else", "{", "return", "Field...
Returns the store parameter extracted from the flags. @param flags the flags of the Lucene field. @return the store parameter corresponding to the given flags.
[ "Returns", "the", "store", "parameter", "extracted", "from", "the", "flags", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChangesHolder.java#L222-L232
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChangesHolder.java
ChangesHolder.getTermVectorParameter
private static Field.TermVector getTermVectorParameter(int flags) { if (((flags & STORE_POSITION_WITH_TERM_VECTOR_FLAG) > 0) && ((flags & STORE_OFFSET_WITH_TERM_VECTOR_FLAG) > 0)) { return Field.TermVector.WITH_POSITIONS_OFFSETS; } else if ((flags & STORE_POSITION_WITH_TERM_VECTOR_FL...
java
private static Field.TermVector getTermVectorParameter(int flags) { if (((flags & STORE_POSITION_WITH_TERM_VECTOR_FLAG) > 0) && ((flags & STORE_OFFSET_WITH_TERM_VECTOR_FLAG) > 0)) { return Field.TermVector.WITH_POSITIONS_OFFSETS; } else if ((flags & STORE_POSITION_WITH_TERM_VECTOR_FL...
[ "private", "static", "Field", ".", "TermVector", "getTermVectorParameter", "(", "int", "flags", ")", "{", "if", "(", "(", "(", "flags", "&", "STORE_POSITION_WITH_TERM_VECTOR_FLAG", ")", ">", "0", ")", "&&", "(", "(", "flags", "&", "STORE_OFFSET_WITH_TERM_VECTOR_...
Returns the term vector parameter extracted from the flags. @param flags the flags of the Lucene field. @return the term vector parameter corresponding to the given flags.
[ "Returns", "the", "term", "vector", "parameter", "extracted", "from", "the", "flags", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChangesHolder.java#L240-L262
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/AdditionalNamespaceResolver.java
AdditionalNamespaceResolver.addNamespace
private void addNamespace(String prefix, String uri) { prefixToURI.put(prefix, uri); uriToPrefix.put(uri, prefix); }
java
private void addNamespace(String prefix, String uri) { prefixToURI.put(prefix, uri); uriToPrefix.put(uri, prefix); }
[ "private", "void", "addNamespace", "(", "String", "prefix", ",", "String", "uri", ")", "{", "prefixToURI", ".", "put", "(", "prefix", ",", "uri", ")", ";", "uriToPrefix", ".", "put", "(", "uri", ",", "prefix", ")", ";", "}" ]
Adds the given namespace declaration to this resolver. @param prefix namespace prefix @param uri namespace URI
[ "Adds", "the", "given", "namespace", "declaration", "to", "this", "resolver", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/AdditionalNamespaceResolver.java#L79-L82
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/VersionControlCommand.java
VersionControlCommand.versionControl
public Response versionControl(Session session, String path) { try { Node node = (Node)session.getItem(path); if (!node.isNodeType("mix:versionable")) { node.addMixin("mix:versionable"); session.save(); } return Response.ok(...
java
public Response versionControl(Session session, String path) { try { Node node = (Node)session.getItem(path); if (!node.isNodeType("mix:versionable")) { node.addMixin("mix:versionable"); session.save(); } return Response.ok(...
[ "public", "Response", "versionControl", "(", "Session", "session", ",", "String", "path", ")", "{", "try", "{", "Node", "node", "=", "(", "Node", ")", "session", ".", "getItem", "(", "path", ")", ";", "if", "(", "!", "node", ".", "isNodeType", "(", "...
Webdav Version-Control method implementation. @param session current session @param path resource path @return the instance of javax.ws.rs.core.Response
[ "Webdav", "Version", "-", "Control", "method", "implementation", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/VersionControlCommand.java#L53-L82
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java
LinkGenerator.generateLinkContent
public byte[] generateLinkContent() throws IOException { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); // LINK HEADER for (int i = 0; i < linkHeader.length; i++) { byte curByteValue = (byte)linkHeader[i]; outStream.write(curByteValue); } // LINK...
java
public byte[] generateLinkContent() throws IOException { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); // LINK HEADER for (int i = 0; i < linkHeader.length; i++) { byte curByteValue = (byte)linkHeader[i]; outStream.write(curByteValue); } // LINK...
[ "public", "byte", "[", "]", "generateLinkContent", "(", ")", "throws", "IOException", "{", "ByteArrayOutputStream", "outStream", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "// LINK HEADER", "for", "(", "int", "i", "=", "0", ";", "i", "<", "linkHeader"...
Generates the content of link. @return link content @throws IOException {@link IOException}
[ "Generates", "the", "content", "of", "link", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java#L110-L132
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java
LinkGenerator.getLinkContent
private byte[] getLinkContent() throws IOException { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); byte[] firstItem = getFirstItem(); writeInt(firstItem.length + 2, outStream); writeBytes(firstItem, outStream); byte[] lastItem = getLastItem(); writeInt(lastItem....
java
private byte[] getLinkContent() throws IOException { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); byte[] firstItem = getFirstItem(); writeInt(firstItem.length + 2, outStream); writeBytes(firstItem, outStream); byte[] lastItem = getLastItem(); writeInt(lastItem....
[ "private", "byte", "[", "]", "getLinkContent", "(", ")", "throws", "IOException", "{", "ByteArrayOutputStream", "outStream", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "byte", "[", "]", "firstItem", "=", "getFirstItem", "(", ")", ";", "writeInt", "(",...
Gets the content of the link. @return link content @throws IOException {@link IOException}
[ "Gets", "the", "content", "of", "the", "link", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java#L140-L187
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java
LinkGenerator.getFirstItem
private byte[] getFirstItem() throws IOException { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); int[] firstItem = {0x1F, 0x50, 0xE0, 0x4F, 0xD0, 0x20, 0xEA, 0x3A, 0x69, 0x10, 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D,}; writeInts(firstItem, outStream); retur...
java
private byte[] getFirstItem() throws IOException { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); int[] firstItem = {0x1F, 0x50, 0xE0, 0x4F, 0xD0, 0x20, 0xEA, 0x3A, 0x69, 0x10, 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D,}; writeInts(firstItem, outStream); retur...
[ "private", "byte", "[", "]", "getFirstItem", "(", ")", "throws", "IOException", "{", "ByteArrayOutputStream", "outStream", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "int", "[", "]", "firstItem", "=", "{", "0x1F", ",", "0x50", ",", "0xE0", ",", "0...
Returns the first item. @return first item @throws IOException {@link IOException}
[ "Returns", "the", "first", "item", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java#L195-L205
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java
LinkGenerator.getLastItem
private byte[] getLastItem() throws IOException { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); int[] lastItem = {0x2E, 0x80, 0x00, 0xDF, 0xEA, 0xBD, 0x65, 0xC2, 0xD0, 0x11, 0xBC, 0xED, 0x00, 0xA0, 0xC9, 0x0A, 0xB5, 0x0F}; writeInts(lastItem, outStream); return ou...
java
private byte[] getLastItem() throws IOException { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); int[] lastItem = {0x2E, 0x80, 0x00, 0xDF, 0xEA, 0xBD, 0x65, 0xC2, 0xD0, 0x11, 0xBC, 0xED, 0x00, 0xA0, 0xC9, 0x0A, 0xB5, 0x0F}; writeInts(lastItem, outStream); return ou...
[ "private", "byte", "[", "]", "getLastItem", "(", ")", "throws", "IOException", "{", "ByteArrayOutputStream", "outStream", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "int", "[", "]", "lastItem", "=", "{", "0x2E", ",", "0x80", ",", "0x00", ",", "0xD...
Returns the last item. @return last item @throws IOException {@link IOException}
[ "Returns", "the", "last", "item", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java#L213-L223
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java
LinkGenerator.getRootValue
private byte[] getRootValue(String rootName) throws IOException { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); simpleWriteString(rootName, outStream); int[] rootVal = {0x20, 0x00, 0x3D, 0x04, 0x30, 0x04, 0x20, 0x00}; writeInts(rootVal, outStream); simpleWriteString(h...
java
private byte[] getRootValue(String rootName) throws IOException { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); simpleWriteString(rootName, outStream); int[] rootVal = {0x20, 0x00, 0x3D, 0x04, 0x30, 0x04, 0x20, 0x00}; writeInts(rootVal, outStream); simpleWriteString(h...
[ "private", "byte", "[", "]", "getRootValue", "(", "String", "rootName", ")", "throws", "IOException", "{", "ByteArrayOutputStream", "outStream", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "simpleWriteString", "(", "rootName", ",", "outStream", ")", ";", ...
Returns the root value. @param rootName root item name. @return root item value @throws IOException {@link IOException}
[ "Returns", "the", "root", "value", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java#L279-L290
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java
LinkGenerator.writeZeroString
private void writeZeroString(String outString, OutputStream outStream) throws IOException { simpleWriteString(outString, outStream); outStream.write(0); outStream.write(0); }
java
private void writeZeroString(String outString, OutputStream outStream) throws IOException { simpleWriteString(outString, outStream); outStream.write(0); outStream.write(0); }
[ "private", "void", "writeZeroString", "(", "String", "outString", ",", "OutputStream", "outStream", ")", "throws", "IOException", "{", "simpleWriteString", "(", "outString", ",", "outStream", ")", ";", "outStream", ".", "write", "(", "0", ")", ";", "outStream", ...
Writes zero-string into stream. @param outString string @param outStream stream @throws IOException {@link IOException}
[ "Writes", "zero", "-", "string", "into", "stream", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java#L350-L355
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java
LinkGenerator.writeInt
private void writeInt(int intValue, OutputStream outStream) throws IOException { outStream.write(intValue & 0xFF); outStream.write((intValue >> 8) & 0xFF); }
java
private void writeInt(int intValue, OutputStream outStream) throws IOException { outStream.write(intValue & 0xFF); outStream.write((intValue >> 8) & 0xFF); }
[ "private", "void", "writeInt", "(", "int", "intValue", ",", "OutputStream", "outStream", ")", "throws", "IOException", "{", "outStream", ".", "write", "(", "intValue", "&", "0xFF", ")", ";", "outStream", ".", "write", "(", "(", "intValue", ">>", "8", ")", ...
Writes int into stream. @param intValue int value @param outStream stream @throws IOException {@link IOException}
[ "Writes", "int", "into", "stream", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java#L371-L375
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java
LinkGenerator.writeInts
private void writeInts(int[] bytes, OutputStream outStream) throws IOException { for (int i = 0; i < bytes.length; i++) { byte curByte = (byte)bytes[i]; outStream.write(curByte); } }
java
private void writeInts(int[] bytes, OutputStream outStream) throws IOException { for (int i = 0; i < bytes.length; i++) { byte curByte = (byte)bytes[i]; outStream.write(curByte); } }
[ "private", "void", "writeInts", "(", "int", "[", "]", "bytes", ",", "OutputStream", "outStream", ")", "throws", "IOException", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "bytes", ".", "length", ";", "i", "++", ")", "{", "byte", "curByte", ...
Writes int array into stream. @param bytes int array @param outStream stream @throws IOException {@link IOException}
[ "Writes", "int", "array", "into", "stream", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java#L384-L391
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/VolatileIndex.java
VolatileIndex.commitPending
private void commitPending() throws IOException { if (pending.isEmpty()) { return; } super.addDocuments((Document[])pending.values().toArray(new Document[pending.size()])); pending.clear(); aggregateIndexes.clear(); }
java
private void commitPending() throws IOException { if (pending.isEmpty()) { return; } super.addDocuments((Document[])pending.values().toArray(new Document[pending.size()])); pending.clear(); aggregateIndexes.clear(); }
[ "private", "void", "commitPending", "(", ")", "throws", "IOException", "{", "if", "(", "pending", ".", "isEmpty", "(", ")", ")", "{", "return", ";", "}", "super", ".", "addDocuments", "(", "(", "Document", "[", "]", ")", "pending", ".", "values", "(", ...
Commits pending documents to the index. @throws IOException if committing pending documents fails.
[ "Commits", "pending", "documents", "to", "the", "index", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/VolatileIndex.java#L214-L223
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/WildcardQuery.java
WildcardQuery.rewrite
@Override public Query rewrite(IndexReader reader) throws IOException { @SuppressWarnings("serial") Query stdWildcardQuery = new MultiTermQuery() { @Override protected FilteredTermEnum getEnum(IndexReader reader) throws IOException { return new WildcardTerm...
java
@Override public Query rewrite(IndexReader reader) throws IOException { @SuppressWarnings("serial") Query stdWildcardQuery = new MultiTermQuery() { @Override protected FilteredTermEnum getEnum(IndexReader reader) throws IOException { return new WildcardTerm...
[ "@", "Override", "public", "Query", "rewrite", "(", "IndexReader", "reader", ")", "throws", "IOException", "{", "@", "SuppressWarnings", "(", "\"serial\"", ")", "Query", "stdWildcardQuery", "=", "new", "MultiTermQuery", "(", ")", "{", "@", "Override", "protected...
Either rewrites this query to a lucene MultiTermQuery or in case of a TooManyClauses exception to a custom jackrabbit query implementation that uses a BitSet to collect all hits. @param reader the index reader to use for the search. @return the rewritten query. @throws IOException if an error occurs while reading from...
[ "Either", "rewrites", "this", "query", "to", "a", "lucene", "MultiTermQuery", "or", "in", "case", "of", "a", "TooManyClauses", "exception", "to", "a", "custom", "jackrabbit", "query", "implementation", "that", "uses", "a", "BitSet", "to", "collect", "all", "hi...
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/WildcardQuery.java#L138-L172
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/ExportImportFactory.java
ExportImportFactory.getExportVisitor
public BaseXmlExporter getExportVisitor(XmlMapping type, OutputStream stream, boolean skipBinary, boolean noRecurse, boolean exportChildVersionHistory, ItemDataConsumer dataManager, NamespaceRegistry namespaceRegistry, ValueFactoryImpl systemValueFactory) throws NamespaceException, RepositoryException, IOEx...
java
public BaseXmlExporter getExportVisitor(XmlMapping type, OutputStream stream, boolean skipBinary, boolean noRecurse, boolean exportChildVersionHistory, ItemDataConsumer dataManager, NamespaceRegistry namespaceRegistry, ValueFactoryImpl systemValueFactory) throws NamespaceException, RepositoryException, IOEx...
[ "public", "BaseXmlExporter", "getExportVisitor", "(", "XmlMapping", "type", ",", "OutputStream", "stream", ",", "boolean", "skipBinary", ",", "boolean", "noRecurse", ",", "boolean", "exportChildVersionHistory", ",", "ItemDataConsumer", "dataManager", ",", "NamespaceRegist...
Create export visitor for given type of view.\ @param type - 6.4 XML Mappings @param stream - output result stream @param skipBinary- If skipBinary is true then any properties of PropertyType.BINARY will be serialized as if they are empty. @param noRecurse- if noRecurse is false, the whole subtree are serialized @para...
[ "Create", "export", "visitor", "for", "given", "type", "of", "view", ".", "\\" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/ExportImportFactory.java#L137-L170
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/ValueConstraintsMatcher.java
ValueConstraintsMatcher.parsePathMatcher
protected JCRPathMatcher parsePathMatcher(LocationFactory locFactory, String path) throws RepositoryException { JCRPath knownPath = null; boolean forDescendants = false; boolean forAncestors = false; if (path.equals("*") || path.equals(".*")) { // any forDescendants ...
java
protected JCRPathMatcher parsePathMatcher(LocationFactory locFactory, String path) throws RepositoryException { JCRPath knownPath = null; boolean forDescendants = false; boolean forAncestors = false; if (path.equals("*") || path.equals(".*")) { // any forDescendants ...
[ "protected", "JCRPathMatcher", "parsePathMatcher", "(", "LocationFactory", "locFactory", ",", "String", "path", ")", "throws", "RepositoryException", "{", "JCRPath", "knownPath", "=", "null", ";", "boolean", "forDescendants", "=", "false", ";", "boolean", "forAncestor...
Parses JCR path matcher from string. @param path @return @throws RepositoryException
[ "Parses", "JCR", "path", "matcher", "from", "string", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/ValueConstraintsMatcher.java#L405-L440
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
NodeImpl.checkedOut
public boolean checkedOut() throws UnsupportedRepositoryOperationException, RepositoryException { // this will also check if item is valid NodeData vancestor = getVersionableAncestor(); if (vancestor != null) { PropertyData isCheckedOut = (PropertyData)dataManager.getItem...
java
public boolean checkedOut() throws UnsupportedRepositoryOperationException, RepositoryException { // this will also check if item is valid NodeData vancestor = getVersionableAncestor(); if (vancestor != null) { PropertyData isCheckedOut = (PropertyData)dataManager.getItem...
[ "public", "boolean", "checkedOut", "(", ")", "throws", "UnsupportedRepositoryOperationException", ",", "RepositoryException", "{", "// this will also check if item is valid", "NodeData", "vancestor", "=", "getVersionableAncestor", "(", ")", ";", "if", "(", "vancestor", "!="...
Tell if this node or its nearest versionable ancestor is checked-out. @return boolean @throws UnsupportedRepositoryOperationException if Versionable operations is not supported @throws RepositoryException if error occurs
[ "Tell", "if", "this", "node", "or", "its", "nearest", "versionable", "ancestor", "is", "checked", "-", "out", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java#L433-L447
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
NodeImpl.doAddMixin
private void doAddMixin(NodeTypeData type) throws NoSuchNodeTypeException, ConstraintViolationException, VersionException, LockException, RepositoryException { // Add both to mixinNodeTypes and to jcr:mixinTypes property // Prepare mixin values InternalQName[] mixinTypes = nodeData().getMixi...
java
private void doAddMixin(NodeTypeData type) throws NoSuchNodeTypeException, ConstraintViolationException, VersionException, LockException, RepositoryException { // Add both to mixinNodeTypes and to jcr:mixinTypes property // Prepare mixin values InternalQName[] mixinTypes = nodeData().getMixi...
[ "private", "void", "doAddMixin", "(", "NodeTypeData", "type", ")", "throws", "NoSuchNodeTypeException", ",", "ConstraintViolationException", ",", "VersionException", ",", "LockException", ",", "RepositoryException", "{", "// Add both to mixinNodeTypes and to jcr:mixinTypes proper...
Internal method to add mixin Nodetype to the Node. @param type NodeTypeData @throws NoSuchNodeTypeException if requested Nodetype is not found @throws ConstraintViolationException if add will brkoes any constrainst @throws VersionException if this Node (or its ancestor) is checked-in. @throws LockException if this Nod...
[ "Internal", "method", "to", "add", "mixin", "Nodetype", "to", "the", "Node", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java#L613-L688
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
NodeImpl.getCorrespondingNodeData
protected NodeData getCorrespondingNodeData(SessionImpl corrSession) throws ItemNotFoundException, AccessDeniedException, RepositoryException { final QPath myPath = nodeData().getQPath(); final SessionDataManager corrDataManager = corrSession.getTransientNodesManager(); if (this.isNodeType(C...
java
protected NodeData getCorrespondingNodeData(SessionImpl corrSession) throws ItemNotFoundException, AccessDeniedException, RepositoryException { final QPath myPath = nodeData().getQPath(); final SessionDataManager corrDataManager = corrSession.getTransientNodesManager(); if (this.isNodeType(C...
[ "protected", "NodeData", "getCorrespondingNodeData", "(", "SessionImpl", "corrSession", ")", "throws", "ItemNotFoundException", ",", "AccessDeniedException", ",", "RepositoryException", "{", "final", "QPath", "myPath", "=", "nodeData", "(", ")", ".", "getQPath", "(", ...
Return Node corresponding to this Node. @param corrSession session on corresponding Workspace @return NodeData corresponding Node @throws ItemNotFoundException if corresponding Node not found @throws AccessDeniedException if read impossible due to permisions @throws RepositoryException if any other error occurs
[ "Return", "Node", "corresponding", "to", "this", "Node", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java#L793-L841
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
NodeImpl.getMixinTypeNames
public String[] getMixinTypeNames() throws RepositoryException { NodeType[] mixinTypes = getMixinNodeTypes(); String[] mtNames = new String[mixinTypes.length]; for (int i = 0; i < mtNames.length; i++) { mtNames[i] = mixinTypes[i].getName(); } return mtNames; }
java
public String[] getMixinTypeNames() throws RepositoryException { NodeType[] mixinTypes = getMixinNodeTypes(); String[] mtNames = new String[mixinTypes.length]; for (int i = 0; i < mtNames.length; i++) { mtNames[i] = mixinTypes[i].getName(); } return mtNames; }
[ "public", "String", "[", "]", "getMixinTypeNames", "(", ")", "throws", "RepositoryException", "{", "NodeType", "[", "]", "mixinTypes", "=", "getMixinNodeTypes", "(", ")", ";", "String", "[", "]", "mtNames", "=", "new", "String", "[", "mixinTypes", ".", "leng...
Return mixin Nodetype names. @return String[] @throws RepositoryException if error occurs
[ "Return", "mixin", "Nodetype", "names", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java#L973-L983
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
NodeImpl.initDefinition
private void initDefinition(NodeData parent) throws RepositoryException, ConstraintViolationException { if (this.isRoot()) { // root - no parent this.definition = new NodeDefinitionData(null, null, true, true, OnParentVersionAction.ABORT, true, new InternalQNa...
java
private void initDefinition(NodeData parent) throws RepositoryException, ConstraintViolationException { if (this.isRoot()) { // root - no parent this.definition = new NodeDefinitionData(null, null, true, true, OnParentVersionAction.ABORT, true, new InternalQNa...
[ "private", "void", "initDefinition", "(", "NodeData", "parent", ")", "throws", "RepositoryException", ",", "ConstraintViolationException", "{", "if", "(", "this", ".", "isRoot", "(", ")", ")", "{", "// root - no parent", "this", ".", "definition", "=", "new", "N...
Init NodeDefinition. @param parent NodeData @throws RepositoryException if error occurs @throws ConstraintViolationException if definition not found
[ "Init", "NodeDefinition", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java#L1636-L1660
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
NodeImpl.versionHistory
public VersionHistoryImpl versionHistory(boolean pool) throws UnsupportedRepositoryOperationException, RepositoryException { if (!this.isNodeType(Constants.MIX_VERSIONABLE)) { throw new UnsupportedRepositoryOperationException("Node is not mix:versionable " + getPath()); } Prop...
java
public VersionHistoryImpl versionHistory(boolean pool) throws UnsupportedRepositoryOperationException, RepositoryException { if (!this.isNodeType(Constants.MIX_VERSIONABLE)) { throw new UnsupportedRepositoryOperationException("Node is not mix:versionable " + getPath()); } Prop...
[ "public", "VersionHistoryImpl", "versionHistory", "(", "boolean", "pool", ")", "throws", "UnsupportedRepositoryOperationException", ",", "RepositoryException", "{", "if", "(", "!", "this", ".", "isNodeType", "(", "Constants", ".", "MIX_VERSIONABLE", ")", ")", "{", "...
For internal use. Doesn't check the InvalidItemStateException and may return unpooled VersionHistory object. @param pool boolean, true if result should be pooled in Session @return VersionHistoryImpl @throws UnsupportedRepositoryOperationException if versions is nopt supported @throws RepositoryException if error occu...
[ "For", "internal", "use", ".", "Doesn", "t", "check", "the", "InvalidItemStateException", "and", "may", "return", "unpooled", "VersionHistory", "object", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java#L2600-L2618
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
NodeImpl.childPropertiesData
private List<PropertyData> childPropertiesData() throws RepositoryException, AccessDeniedException { List<PropertyData> storedProps = new ArrayList<PropertyData>(dataManager.getChildPropertiesData(nodeData())); Collections.sort(storedProps, new PropertiesDataOrderComparator<PropertyData>()); retu...
java
private List<PropertyData> childPropertiesData() throws RepositoryException, AccessDeniedException { List<PropertyData> storedProps = new ArrayList<PropertyData>(dataManager.getChildPropertiesData(nodeData())); Collections.sort(storedProps, new PropertiesDataOrderComparator<PropertyData>()); retu...
[ "private", "List", "<", "PropertyData", ">", "childPropertiesData", "(", ")", "throws", "RepositoryException", ",", "AccessDeniedException", "{", "List", "<", "PropertyData", ">", "storedProps", "=", "new", "ArrayList", "<", "PropertyData", ">", "(", "dataManager", ...
Return child Properties list. @return List of child Properties @throws RepositoryException if error occurs @throws AccessDeniedException if Nodes cannot be listed due to permissions on this Node
[ "Return", "child", "Properties", "list", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java#L2925-L2932
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
NodeImpl.childNodesData
private List<NodeData> childNodesData() throws RepositoryException, AccessDeniedException { List<NodeData> storedNodes = new ArrayList<NodeData>(dataManager.getChildNodesData(nodeData())); Collections.sort(storedNodes, new NodeDataOrderComparator()); return storedNodes; }
java
private List<NodeData> childNodesData() throws RepositoryException, AccessDeniedException { List<NodeData> storedNodes = new ArrayList<NodeData>(dataManager.getChildNodesData(nodeData())); Collections.sort(storedNodes, new NodeDataOrderComparator()); return storedNodes; }
[ "private", "List", "<", "NodeData", ">", "childNodesData", "(", ")", "throws", "RepositoryException", ",", "AccessDeniedException", "{", "List", "<", "NodeData", ">", "storedNodes", "=", "new", "ArrayList", "<", "NodeData", ">", "(", "dataManager", ".", "getChil...
Return child Nodes list. @return List of child Nodes @throws RepositoryException if error occurs @throws AccessDeniedException if Nodes cannot be listed due to permissions on this Node
[ "Return", "child", "Nodes", "list", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java#L2943-L2948
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
NodeImpl.getNextChildIndex
private int getNextChildIndex(InternalQName nameToAdd, InternalQName primaryTypeName, NodeData parentNode, NodeDefinitionData def) throws RepositoryException, ItemExistsException { boolean allowSns = def.isAllowsSameNameSiblings(); int ind = 1; boolean hasSibling = dataManager.hasItemData(p...
java
private int getNextChildIndex(InternalQName nameToAdd, InternalQName primaryTypeName, NodeData parentNode, NodeDefinitionData def) throws RepositoryException, ItemExistsException { boolean allowSns = def.isAllowsSameNameSiblings(); int ind = 1; boolean hasSibling = dataManager.hasItemData(p...
[ "private", "int", "getNextChildIndex", "(", "InternalQName", "nameToAdd", ",", "InternalQName", "primaryTypeName", ",", "NodeData", "parentNode", ",", "NodeDefinitionData", "def", ")", "throws", "RepositoryException", ",", "ItemExistsException", "{", "boolean", "allowSns"...
Calculates next child node index. Is used existed node definition, if no - get one based on node name and node type.
[ "Calculates", "next", "child", "node", "index", ".", "Is", "used", "existed", "node", "definition", "if", "no", "-", "get", "one", "based", "on", "node", "name", "and", "node", "type", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java#L3025-L3048
train
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/JCRUserListAccess.java
JCRUserListAccess.accept
protected boolean accept(Node node) { try { return status == UserStatus.ANY || status.matches(node.canAddMixin(JCROrganizationServiceImpl.JOS_DISABLED)); } catch (RepositoryException e) { if (LOG.isDebugEnabled()) { String path = "unknown"; ...
java
protected boolean accept(Node node) { try { return status == UserStatus.ANY || status.matches(node.canAddMixin(JCROrganizationServiceImpl.JOS_DISABLED)); } catch (RepositoryException e) { if (LOG.isDebugEnabled()) { String path = "unknown"; ...
[ "protected", "boolean", "accept", "(", "Node", "node", ")", "{", "try", "{", "return", "status", "==", "UserStatus", ".", "ANY", "||", "status", ".", "matches", "(", "node", ".", "canAddMixin", "(", "JCROrganizationServiceImpl", ".", "JOS_DISABLED", ")", ")"...
Tests whether or not the specified node should be included in the node list. @param node The node to be tested @return <code>true</code> if and only if <code>node</code> should be included
[ "Tests", "whether", "or", "not", "the", "specified", "node", "should", "be", "included", "in", "the", "node", "list", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/JCRUserListAccess.java#L201-L225
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/order/OrderMember.java
OrderMember.getPositionSegment
public String getPositionSegment() { HierarchicalProperty position = member.getChild(new QName("DAV:", "position")); return position.getChild(0).getChild(new QName("DAV:", "segment")).getValue(); }
java
public String getPositionSegment() { HierarchicalProperty position = member.getChild(new QName("DAV:", "position")); return position.getChild(0).getChild(new QName("DAV:", "segment")).getValue(); }
[ "public", "String", "getPositionSegment", "(", ")", "{", "HierarchicalProperty", "position", "=", "member", ".", "getChild", "(", "new", "QName", "(", "\"DAV:\"", ",", "\"position\"", ")", ")", ";", "return", "position", ".", "getChild", "(", "0", ")", ".", ...
Position segment getter. @return position segment.
[ "Position", "segment", "getter", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/order/OrderMember.java#L87-L91
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/CopyCommand.java
CopyCommand.copy
public Response copy(Session destSession, String sourcePath, String destPath) { try { Workspace workspace = destSession.getWorkspace(); workspace.copy(sourcePath, destPath); // If the source resource was successfully moved // to a pre-existing destination reso...
java
public Response copy(Session destSession, String sourcePath, String destPath) { try { Workspace workspace = destSession.getWorkspace(); workspace.copy(sourcePath, destPath); // If the source resource was successfully moved // to a pre-existing destination reso...
[ "public", "Response", "copy", "(", "Session", "destSession", ",", "String", "sourcePath", ",", "String", "destPath", ")", "{", "try", "{", "Workspace", "workspace", "=", "destSession", ".", "getWorkspace", "(", ")", ";", "workspace", ".", "copy", "(", "sourc...
Webdav COPY method implementation for the same workspace. @param destSession destination session @param sourcePath source file path @param destPath destination file path @return the instance of javax.ws.rs.core.Response
[ "Webdav", "COPY", "method", "implementation", "for", "the", "same", "workspace", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/CopyCommand.java#L95-L143
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/RSyncJob.java
RSyncJob.execute
public void execute() throws IOException { // Future todo: Use JNI and librsync library? Runtime run = Runtime.getRuntime(); try { String command ; if(excludeDir != null && !excludeDir.isEmpty()) { command= "rsync -rv --delete --exclude "+ excludeDir + "...
java
public void execute() throws IOException { // Future todo: Use JNI and librsync library? Runtime run = Runtime.getRuntime(); try { String command ; if(excludeDir != null && !excludeDir.isEmpty()) { command= "rsync -rv --delete --exclude "+ excludeDir + "...
[ "public", "void", "execute", "(", ")", "throws", "IOException", "{", "// Future todo: Use JNI and librsync library?", "Runtime", "run", "=", "Runtime", ".", "getRuntime", "(", ")", ";", "try", "{", "String", "command", ";", "if", "(", "excludeDir", "!=", "null",...
Executes RSYNC synchronization job @throws IOException
[ "Executes", "RSYNC", "synchronization", "job" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/RSyncJob.java#L76-L160
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java
SystemViewImporter.parseValues
private List<ValueData> parseValues() throws RepositoryException { List<ValueData> values = new ArrayList<ValueData>(propertyInfo.getValuesSize()); List<String> stringValues = new ArrayList<String>(); for (int k = 0; k < propertyInfo.getValuesSize(); k++) { if (propertyInfo.getType(...
java
private List<ValueData> parseValues() throws RepositoryException { List<ValueData> values = new ArrayList<ValueData>(propertyInfo.getValuesSize()); List<String> stringValues = new ArrayList<String>(); for (int k = 0; k < propertyInfo.getValuesSize(); k++) { if (propertyInfo.getType(...
[ "private", "List", "<", "ValueData", ">", "parseValues", "(", ")", "throws", "RepositoryException", "{", "List", "<", "ValueData", ">", "values", "=", "new", "ArrayList", "<", "ValueData", ">", "(", "propertyInfo", ".", "getValuesSize", "(", ")", ")", ";", ...
Returns the list of ValueData for current property @return @throws RepositoryException
[ "Returns", "the", "list", "of", "ValueData", "for", "current", "property" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java#L655-L702
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java
SystemViewImporter.getAttribute
protected String getAttribute(Map<String, String> attributes, InternalQName name) throws RepositoryException { JCRName jname = locationFactory.createJCRName(name); return attributes.get(jname.getAsString()); }
java
protected String getAttribute(Map<String, String> attributes, InternalQName name) throws RepositoryException { JCRName jname = locationFactory.createJCRName(name); return attributes.get(jname.getAsString()); }
[ "protected", "String", "getAttribute", "(", "Map", "<", "String", ",", "String", ">", "attributes", ",", "InternalQName", "name", ")", "throws", "RepositoryException", "{", "JCRName", "jname", "=", "locationFactory", ".", "createJCRName", "(", "name", ")", ";", ...
Returns the value of the named XML attribute. @param attributes set of XML attributes @param name attribute name @return attribute value, or <code>null</code> if the named attribute is not found @throws RepositoryException
[ "Returns", "the", "value", "of", "the", "named", "XML", "attribute", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java#L714-L718
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/AbstractRepositorySuspender.java
AbstractRepositorySuspender.suspendRepository
protected void suspendRepository() throws RepositoryException { SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION); repository.setState(ManageableRepository.SUSPENDED); }
java
protected void suspendRepository() throws RepositoryException { SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION); repository.setState(ManageableRepository.SUSPENDED); }
[ "protected", "void", "suspendRepository", "(", ")", "throws", "RepositoryException", "{", "SecurityHelper", ".", "validateSecurityPermission", "(", "JCRRuntimePermissions", ".", "MANAGE_REPOSITORY_PERMISSION", ")", ";", "repository", ".", "setState", "(", "ManageableReposit...
Suspend repository which means that allow only read operations. All writing threads will wait until resume operations invoked.
[ "Suspend", "repository", "which", "means", "that", "allow", "only", "read", "operations", ".", "All", "writing", "threads", "will", "wait", "until", "resume", "operations", "invoked", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/AbstractRepositorySuspender.java#L51-L56
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/AbstractRepositorySuspender.java
AbstractRepositorySuspender.resumeRepository
protected void resumeRepository() throws RepositoryException { // Need privileges to manage repository. SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION); repository.setState(ManageableRepository.ONLINE); }
java
protected void resumeRepository() throws RepositoryException { // Need privileges to manage repository. SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION); repository.setState(ManageableRepository.ONLINE); }
[ "protected", "void", "resumeRepository", "(", ")", "throws", "RepositoryException", "{", "// Need privileges to manage repository.\r", "SecurityHelper", ".", "validateSecurityPermission", "(", "JCRRuntimePermissions", ".", "MANAGE_REPOSITORY_PERMISSION", ")", ";", "repository", ...
Resume repository. All previously suspended threads continue working.
[ "Resume", "repository", ".", "All", "previously", "suspended", "threads", "continue", "working", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/AbstractRepositorySuspender.java#L61-L67
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/Util.java
Util.getLength
public static long getLength(ValueData value, int propType) { if (propType == PropertyType.BINARY) { return value.getLength(); } else if (propType == PropertyType.NAME || propType == PropertyType.PATH) { return -1; } else { return value.toStr...
java
public static long getLength(ValueData value, int propType) { if (propType == PropertyType.BINARY) { return value.getLength(); } else if (propType == PropertyType.NAME || propType == PropertyType.PATH) { return -1; } else { return value.toStr...
[ "public", "static", "long", "getLength", "(", "ValueData", "value", ",", "int", "propType", ")", "{", "if", "(", "propType", "==", "PropertyType", ".", "BINARY", ")", "{", "return", "value", ".", "getLength", "(", ")", ";", "}", "else", "if", "(", "pro...
Returns length of the internal value. @param value a value. @param propType @return the length of the internal value or <code>-1</code> if the length cannot be determined.
[ "Returns", "length", "of", "the", "internal", "value", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/Util.java#L286-L300
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryService.java
RegistryService.recreateEntry
@Override public void recreateEntry(final SessionProvider sessionProvider, final String groupPath, final RegistryEntry entry) throws RepositoryException { final String entryRelPath = EXO_REGISTRY + "/" + groupPath + "/" + entry.getName(); final String parentFullPath = "/" + EXO_REGISTRY + "/" +...
java
@Override public void recreateEntry(final SessionProvider sessionProvider, final String groupPath, final RegistryEntry entry) throws RepositoryException { final String entryRelPath = EXO_REGISTRY + "/" + groupPath + "/" + entry.getName(); final String parentFullPath = "/" + EXO_REGISTRY + "/" +...
[ "@", "Override", "public", "void", "recreateEntry", "(", "final", "SessionProvider", "sessionProvider", ",", "final", "String", "groupPath", ",", "final", "RegistryEntry", "entry", ")", "throws", "RepositoryException", "{", "final", "String", "entryRelPath", "=", "E...
Re-creates an entry in the group. @param sessionProvider the session provider @throws RepositoryException
[ "Re", "-", "creates", "an", "entry", "in", "the", "group", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryService.java#L239-L275
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryService.java
RegistryService.initRegistryEntry
public void initRegistryEntry(String groupName, String entryName) throws RepositoryException, RepositoryConfigurationException { String relPath = EXO_REGISTRY + "/" + groupName + "/" + entryName; for (RepositoryEntry repConfiguration : repConfigurations()) { String repName = repConf...
java
public void initRegistryEntry(String groupName, String entryName) throws RepositoryException, RepositoryConfigurationException { String relPath = EXO_REGISTRY + "/" + groupName + "/" + entryName; for (RepositoryEntry repConfiguration : repConfigurations()) { String repName = repConf...
[ "public", "void", "initRegistryEntry", "(", "String", "groupName", ",", "String", "entryName", ")", "throws", "RepositoryException", ",", "RepositoryConfigurationException", "{", "String", "relPath", "=", "EXO_REGISTRY", "+", "\"/\"", "+", "groupName", "+", "\"/\"", ...
Initializes the registry entry @param groupName the group entry name @param entryName the entry name @throws RepositoryConfigurationException if a configuration issue occurs @throws RepositoryException if any error occurs
[ "Initializes", "the", "registry", "entry" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryService.java#L588-L609
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryService.java
RegistryService.getForceXMLConfigurationValue
public boolean getForceXMLConfigurationValue(InitParams initParams) { ValueParam valueParam = initParams.getValueParam("force-xml-configuration"); return (valueParam != null ? Boolean.valueOf(valueParam.getValue()) : false); }
java
public boolean getForceXMLConfigurationValue(InitParams initParams) { ValueParam valueParam = initParams.getValueParam("force-xml-configuration"); return (valueParam != null ? Boolean.valueOf(valueParam.getValue()) : false); }
[ "public", "boolean", "getForceXMLConfigurationValue", "(", "InitParams", "initParams", ")", "{", "ValueParam", "valueParam", "=", "initParams", ".", "getValueParam", "(", "\"force-xml-configuration\"", ")", ";", "return", "(", "valueParam", "!=", "null", "?", "Boolean...
Get value of force-xml-configuration param. @param initParams The InitParams @return force-xml-configuration value if present and false in other case
[ "Get", "value", "of", "force", "-", "xml", "-", "configuration", "param", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryService.java#L626-L630
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryService.java
RegistryService.checkGroup
private void checkGroup(final SessionProvider sessionProvider, final String groupPath) throws RepositoryException { String[] groupNames = groupPath.split("/"); String prefix = "/" + EXO_REGISTRY; Session session = session(sessionProvider, repositoryService.getCurrentRepository()); for (String...
java
private void checkGroup(final SessionProvider sessionProvider, final String groupPath) throws RepositoryException { String[] groupNames = groupPath.split("/"); String prefix = "/" + EXO_REGISTRY; Session session = session(sessionProvider, repositoryService.getCurrentRepository()); for (String...
[ "private", "void", "checkGroup", "(", "final", "SessionProvider", "sessionProvider", ",", "final", "String", "groupPath", ")", "throws", "RepositoryException", "{", "String", "[", "]", "groupNames", "=", "groupPath", ".", "split", "(", "\"/\"", ")", ";", "String...
check if group exists and creates one if necessary @param sessionProvider @param groupPath @throws RepositoryException
[ "check", "if", "group", "exists", "and", "creates", "one", "if", "necessary" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryService.java#L647-L669
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemAutocreator.java
ItemAutocreator.makeAutoCreatedItems
private PlainChangesLog makeAutoCreatedItems(final NodeData parent, final InternalQName nodeTypeName, final ItemDataConsumer targetDataManager, final String owner, boolean addedAutoCreatedNodes) throws RepositoryException { final PlainChangesLogImpl changes = new PlainChangesLogImpl(); final ...
java
private PlainChangesLog makeAutoCreatedItems(final NodeData parent, final InternalQName nodeTypeName, final ItemDataConsumer targetDataManager, final String owner, boolean addedAutoCreatedNodes) throws RepositoryException { final PlainChangesLogImpl changes = new PlainChangesLogImpl(); final ...
[ "private", "PlainChangesLog", "makeAutoCreatedItems", "(", "final", "NodeData", "parent", ",", "final", "InternalQName", "nodeTypeName", ",", "final", "ItemDataConsumer", "targetDataManager", ",", "final", "String", "owner", ",", "boolean", "addedAutoCreatedNodes", ")", ...
Prepares changes log
[ "Prepares", "changes", "log" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemAutocreator.java#L96-L116
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/RestRepositoryService.java
RestRepositoryService.getRepositoryServiceConfiguration
@GET @Produces(MediaType.APPLICATION_JSON) @RolesAllowed("administrators") @Path("/repository-service-configuration") public Response getRepositoryServiceConfiguration() { RepositoryServiceConfiguration configuration = repositoryService.getConfig(); RepositoryServiceConf conf = new R...
java
@GET @Produces(MediaType.APPLICATION_JSON) @RolesAllowed("administrators") @Path("/repository-service-configuration") public Response getRepositoryServiceConfiguration() { RepositoryServiceConfiguration configuration = repositoryService.getConfig(); RepositoryServiceConf conf = new R...
[ "@", "GET", "@", "Produces", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "RolesAllowed", "(", "\"administrators\"", ")", "@", "Path", "(", "\"/repository-service-configuration\"", ")", "public", "Response", "getRepositoryServiceConfiguration", "(", ")", "{", ...
Gives the repository service configuration which is composed of the configuration of all the repositories and workspaces @return Response return the Response with RepositoryServiceConf @response {code:json} {"repositoryEntry": the configuration of the repository } {code} @LevelAPI Experimental
[ "Gives", "the", "repository", "service", "configuration", "which", "is", "composed", "of", "the", "configuration", "of", "all", "the", "repositories", "and", "workspaces" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/RestRepositoryService.java#L184-L195
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/RestRepositoryService.java
RestRepositoryService.getDefaultWorkspaceConfig
@GET @Produces(MediaType.APPLICATION_JSON) @RolesAllowed("administrators") @Path("/default-ws-config/{repositoryName}") public Response getDefaultWorkspaceConfig(@PathParam("repositoryName") String repositoryName) { String errorMessage = new String(); Status status; try { ...
java
@GET @Produces(MediaType.APPLICATION_JSON) @RolesAllowed("administrators") @Path("/default-ws-config/{repositoryName}") public Response getDefaultWorkspaceConfig(@PathParam("repositoryName") String repositoryName) { String errorMessage = new String(); Status status; try { ...
[ "@", "GET", "@", "Produces", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "RolesAllowed", "(", "\"administrators\"", ")", "@", "Path", "(", "\"/default-ws-config/{repositoryName}\"", ")", "public", "Response", "getDefaultWorkspaceConfig", "(", "@", "PathParam"...
Gives the configuration of the default workspace of the given repository @param repositoryName the name of the repository @return Response return the Response with WorkspaceEntry @response {code:json} {"workspaceEntry" : the configuration of the default workspace } {code} @LevelAPI Experimental
[ "Gives", "the", "configuration", "of", "the", "default", "workspace", "of", "the", "given", "repository" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/RestRepositoryService.java#L208-L255
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/RestRepositoryService.java
RestRepositoryService.getRepositoryNames
@GET @Produces(MediaType.APPLICATION_JSON) @RolesAllowed("administrators") @Path("/repositories") public Response getRepositoryNames() { List<String> repositories = new ArrayList<String>(); for (RepositoryEntry rEntry : repositoryService.getConfig().getRepositoryConfigurations()) { ...
java
@GET @Produces(MediaType.APPLICATION_JSON) @RolesAllowed("administrators") @Path("/repositories") public Response getRepositoryNames() { List<String> repositories = new ArrayList<String>(); for (RepositoryEntry rEntry : repositoryService.getConfig().getRepositoryConfigurations()) { ...
[ "@", "GET", "@", "Produces", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "RolesAllowed", "(", "\"administrators\"", ")", "@", "Path", "(", "\"/repositories\"", ")", "public", "Response", "getRepositoryNames", "(", ")", "{", "List", "<", "String", ">",...
Gives the name of all the existing repositories. @return Response return the Response with list of repository names @response {code:json} {"names" : the name of all the existing repositories } {code} @LevelAPI Experimental
[ "Gives", "the", "name", "of", "all", "the", "existing", "repositories", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/RestRepositoryService.java#L519-L533
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/RestRepositoryService.java
RestRepositoryService.getWorkspaceNames
@GET @Produces(MediaType.APPLICATION_JSON) @RolesAllowed("administrators") @Path("/workspaces/{repositoryName}") public Response getWorkspaceNames(@PathParam("repositoryName") String repositoryName) { String errorMessage = new String(); Status status; try { List<String> ...
java
@GET @Produces(MediaType.APPLICATION_JSON) @RolesAllowed("administrators") @Path("/workspaces/{repositoryName}") public Response getWorkspaceNames(@PathParam("repositoryName") String repositoryName) { String errorMessage = new String(); Status status; try { List<String> ...
[ "@", "GET", "@", "Produces", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "RolesAllowed", "(", "\"administrators\"", ")", "@", "Path", "(", "\"/workspaces/{repositoryName}\"", ")", "public", "Response", "getWorkspaceNames", "(", "@", "PathParam", "(", "\"r...
Gives the name of all the existing workspaces for a given repository. @param repositoryName the name of the repository @return Response return the Response with list of workspace names @response {code:json} {"names" : the name of all the existing workspaces for a given repository } {code} @LevelAPI Experimental
[ "Gives", "the", "name", "of", "all", "the", "existing", "workspaces", "for", "a", "given", "repository", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/RestRepositoryService.java#L546-L588
train
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/RestRepositoryService.java
RestRepositoryService.updateWorkspaceConfiguration
@POST @Consumes(MediaType.APPLICATION_JSON) @RolesAllowed("administrators") @Path("/update-workspace-config/{repositoryName}/{workspaceName}") public Response updateWorkspaceConfiguration(@PathParam("repositoryName") String repositoryName, @PathParam("workspaceName") String workspaceName, WorkspaceEnt...
java
@POST @Consumes(MediaType.APPLICATION_JSON) @RolesAllowed("administrators") @Path("/update-workspace-config/{repositoryName}/{workspaceName}") public Response updateWorkspaceConfiguration(@PathParam("repositoryName") String repositoryName, @PathParam("workspaceName") String workspaceName, WorkspaceEnt...
[ "@", "POST", "@", "Consumes", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "RolesAllowed", "(", "\"administrators\"", ")", "@", "Path", "(", "\"/update-workspace-config/{repositoryName}/{workspaceName}\"", ")", "public", "Response", "updateWorkspaceConfiguration", ...
Updates the configuration of a given workspace. @param repositoryName the name of the repository @param workspaceName the name of the workspace @param workspaceEntry the configuration of the workspace @request {code:json} {"workspaceEntry" : the configuration of the workspace} {code} @return Response return the Respon...
[ "Updates", "the", "configuration", "of", "a", "given", "workspace", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/RestRepositoryService.java#L603-L612
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/proppatch/PropPatchResponseEntity.java
PropPatchResponseEntity.setProperty
private String setProperty(Node node, HierarchicalProperty property) { String propertyName = WebDavNamespaceContext.createName(property.getName()); if (READ_ONLY_PROPS.contains(property.getName())) { return WebDavConst.getStatusDescription(HTTPStatus.CONFLICT); } t...
java
private String setProperty(Node node, HierarchicalProperty property) { String propertyName = WebDavNamespaceContext.createName(property.getName()); if (READ_ONLY_PROPS.contains(property.getName())) { return WebDavConst.getStatusDescription(HTTPStatus.CONFLICT); } t...
[ "private", "String", "setProperty", "(", "Node", "node", ",", "HierarchicalProperty", "property", ")", "{", "String", "propertyName", "=", "WebDavNamespaceContext", ".", "createName", "(", "property", ".", "getName", "(", ")", ")", ";", "if", "(", "READ_ONLY_PRO...
Sets changes the property value. @param node node @param property property to set. @return status
[ "Sets", "changes", "the", "property", "value", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/proppatch/PropPatchResponseEntity.java#L337-L409
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/proppatch/PropPatchResponseEntity.java
PropPatchResponseEntity.removeProperty
private String removeProperty(Node node, HierarchicalProperty property) { try { node.getProperty(property.getStringName()).remove(); node.save(); return WebDavConst.getStatusDescription(HTTPStatus.OK); } catch (AccessDeniedException e) { r...
java
private String removeProperty(Node node, HierarchicalProperty property) { try { node.getProperty(property.getStringName()).remove(); node.save(); return WebDavConst.getStatusDescription(HTTPStatus.OK); } catch (AccessDeniedException e) { r...
[ "private", "String", "removeProperty", "(", "Node", "node", ",", "HierarchicalProperty", "property", ")", "{", "try", "{", "node", ".", "getProperty", "(", "property", ".", "getStringName", "(", ")", ")", ".", "remove", "(", ")", ";", "node", ".", "save", ...
Removes the property. @param node node @param property property @return status
[ "Removes", "the", "property", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/proppatch/PropPatchResponseEntity.java#L418-L444
train
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/HeadCommand.java
HeadCommand.head
public Response head(Session session, String path, String baseURI) { try { Node node = (Node)session.getItem(path); WebDavNamespaceContext nsContext = new WebDavNamespaceContext(session); URI uri = new URI(TextUtil.escape(baseURI + node.getPath(), '%', true)); ...
java
public Response head(Session session, String path, String baseURI) { try { Node node = (Node)session.getItem(path); WebDavNamespaceContext nsContext = new WebDavNamespaceContext(session); URI uri = new URI(TextUtil.escape(baseURI + node.getPath(), '%', true)); ...
[ "public", "Response", "head", "(", "Session", "session", ",", "String", "path", ",", "String", "baseURI", ")", "{", "try", "{", "Node", "node", "=", "(", "Node", ")", "session", ".", "getItem", "(", "path", ")", ";", "WebDavNamespaceContext", "nsContext", ...
Webdav Head method implementation. @param session current session @param path resouce path @param baseURI base uri @return the instance of javax.ws.rs.core.Response
[ "Webdav", "Head", "method", "implementation", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/HeadCommand.java#L62-L94
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java
PlainChangesLogImpl.remove
public void remove(ItemState item) { if (item.isNode()) { remove(item.getData().getQPath()); } else { removeProperty(item, -1); } }
java
public void remove(ItemState item) { if (item.isNode()) { remove(item.getData().getQPath()); } else { removeProperty(item, -1); } }
[ "public", "void", "remove", "(", "ItemState", "item", ")", "{", "if", "(", "item", ".", "isNode", "(", ")", ")", "{", "remove", "(", "item", ".", "getData", "(", ")", ".", "getQPath", "(", ")", ")", ";", "}", "else", "{", "removeProperty", "(", "...
Removes the property or node and all descendants from the log @param item item
[ "Removes", "the", "property", "or", "node", "and", "all", "descendants", "from", "the", "log" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java#L364-L374
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java
PlainChangesLogImpl.remove
public void remove(QPath rootPath) { for (int i = items.size() - 1; i >= 0; i--) { ItemState item = items.get(i); QPath qPath = item.getData().getQPath(); if (qPath.isDescendantOf(rootPath) || item.getAncestorToSave().isDescendantOf(rootPath) || item.getAncestorToS...
java
public void remove(QPath rootPath) { for (int i = items.size() - 1; i >= 0; i--) { ItemState item = items.get(i); QPath qPath = item.getData().getQPath(); if (qPath.isDescendantOf(rootPath) || item.getAncestorToSave().isDescendantOf(rootPath) || item.getAncestorToS...
[ "public", "void", "remove", "(", "QPath", "rootPath", ")", "{", "for", "(", "int", "i", "=", "items", ".", "size", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "ItemState", "item", "=", "items", ".", "get", "(", "i", ")"...
Removes the item at the rootPath and all descendants from the log @param rootPath path
[ "Removes", "the", "item", "at", "the", "rootPath", "and", "all", "descendants", "from", "the", "log" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java#L482-L503
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java
PlainChangesLogImpl.removeNode
private void removeNode(ItemState item, int indexItem) { items.remove(indexItem); index.remove(item.getData().getIdentifier()); index.remove(item.getData().getQPath()); index.remove(new ParentIDQPathBasedKey(item)); index.remove(new IDStateBasedKey(item.getData().getIdentifier(), item....
java
private void removeNode(ItemState item, int indexItem) { items.remove(indexItem); index.remove(item.getData().getIdentifier()); index.remove(item.getData().getQPath()); index.remove(new ParentIDQPathBasedKey(item)); index.remove(new IDStateBasedKey(item.getData().getIdentifier(), item....
[ "private", "void", "removeNode", "(", "ItemState", "item", ",", "int", "indexItem", ")", "{", "items", ".", "remove", "(", "indexItem", ")", ";", "index", ".", "remove", "(", "item", ".", "getData", "(", ")", ".", "getIdentifier", "(", ")", ")", ";", ...
Removes the node from the log @param item ItemState
[ "Removes", "the", "node", "from", "the", "log" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java#L511-L572
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java
PlainChangesLogImpl.removeProperty
private void removeProperty(ItemState item, int indexItem) { if (indexItem == -1) { items.remove(item); } else { items.remove(indexItem); } index.remove(item.getData().getIdentifier()); index.remove(item.getData().getQPath()); index.remove(new P...
java
private void removeProperty(ItemState item, int indexItem) { if (indexItem == -1) { items.remove(item); } else { items.remove(indexItem); } index.remove(item.getData().getIdentifier()); index.remove(item.getData().getQPath()); index.remove(new P...
[ "private", "void", "removeProperty", "(", "ItemState", "item", ",", "int", "indexItem", ")", "{", "if", "(", "indexItem", "==", "-", "1", ")", "{", "items", ".", "remove", "(", "item", ")", ";", "}", "else", "{", "items", ".", "remove", "(", "indexIt...
Removes the property from the log @param item ItemState
[ "Removes", "the", "property", "from", "the", "log" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java#L580-L616
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java
PlainChangesLogImpl.getLastChildrenStates
public Collection<ItemState> getLastChildrenStates(ItemData rootData, boolean forNodes) { Map<String, ItemState> children = forNodes ? lastChildNodeStates.get(rootData.getIdentifier()) : lastChildPropertyStates.get(rootData .getIdentifier()); return children == null ? new ArrayList<...
java
public Collection<ItemState> getLastChildrenStates(ItemData rootData, boolean forNodes) { Map<String, ItemState> children = forNodes ? lastChildNodeStates.get(rootData.getIdentifier()) : lastChildPropertyStates.get(rootData .getIdentifier()); return children == null ? new ArrayList<...
[ "public", "Collection", "<", "ItemState", ">", "getLastChildrenStates", "(", "ItemData", "rootData", ",", "boolean", "forNodes", ")", "{", "Map", "<", "String", ",", "ItemState", ">", "children", "=", "forNodes", "?", "lastChildNodeStates", ".", "get", "(", "r...
Collect last in ChangesLog order item child changes. @param rootData - a item root of the changes scan @param forNodes retrieves nodes' ItemStates is true, or properties' otherwise @return child items states
[ "Collect", "last", "in", "ChangesLog", "order", "item", "child", "changes", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java#L627-L634
train
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java
PlainChangesLogImpl.getLastState
public ItemState getLastState(ItemData item, boolean forNode) { Map<String, ItemState> children = forNode ? lastChildNodeStates.get(item.getParentIdentifier()) : lastChildPropertyStates.get(item .getParentIdentifier()); return children == null ? null : children.get(item.getIdentifie...
java
public ItemState getLastState(ItemData item, boolean forNode) { Map<String, ItemState> children = forNode ? lastChildNodeStates.get(item.getParentIdentifier()) : lastChildPropertyStates.get(item .getParentIdentifier()); return children == null ? null : children.get(item.getIdentifie...
[ "public", "ItemState", "getLastState", "(", "ItemData", "item", ",", "boolean", "forNode", ")", "{", "Map", "<", "String", ",", "ItemState", ">", "children", "=", "forNode", "?", "lastChildNodeStates", ".", "get", "(", "item", ".", "getParentIdentifier", "(", ...
Return the last item state from ChangesLog. @param item an item data the last state which need to be taken @param forNode retrieves nodes' ItemStates is true, or properties' otherwise @return the last item state
[ "Return", "the", "last", "item", "state", "from", "ChangesLog", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java#L645-L652
train