code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public long getNodeChangedSize(String nodePath)
{
long nodeDelta = 0;
Iterator<ChangesItem> changes = iterator();
while (changes.hasNext())
{
nodeDelta += changes.next().getNodeChangedSize(nodePath);
}
return nodeDelta;
} | java |
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 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 findMembershipType(Session session, String name) throws Exception
{
Node membershipTypeNode;
try
{
membershipTypeNode = utils.getMembershipTypeNode(session, name);
}
catch (PathNotFoundException e)
{
return null;
}
MembershipTy... | 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)
{
... | 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... | java |
void migrateMembershipType(Node oldMembershipTypeNode) throws Exception
{
MembershipType membershipType = readMembershipType(oldMembershipTypeNode);
if (findMembershipType(membershipType.getName()) != null)
{
removeMembershipType(membershipType.getName(), false);
}
createMemb... | 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... | 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... | java |
private Node createNewMembershipTypeNode(Session session, MembershipTypeImpl mType) throws Exception
{
Node storageTypesNode = utils.getMembershipTypeStorageNode(session);
return storageTypesNode.addNode(mType.getName());
} | 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... | 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());
} | java |
private MembershipType getFromCache(String name)
{
return (MembershipType)cache.get(name, CacheType.MEMBERSHIPTYPE);
} | java |
private void removeAllRelatedFromCache(String name)
{
cache.remove(CacheHandler.MEMBERSHIPTYPE_PREFIX + name, CacheType.MEMBERSHIP);
} | java |
private void moveMembershipsInCache(String oldType, String newType)
{
cache.move(CacheHandler.MEMBERSHIPTYPE_PREFIX + oldType, CacheHandler.MEMBERSHIPTYPE_PREFIX + newType,
CacheType.MEMBERSHIP);
} | java |
private void putInCache(MembershipType mt)
{
cache.put(mt.getName(), mt, CacheType.MEMBERSHIPTYPE);
} | java |
private void preSave(MembershipType type, boolean isNew) throws Exception
{
for (MembershipTypeEventListener listener : listeners)
{
listener.preSave(type, isNew);
}
} | java |
private void postSave(MembershipType type, boolean isNew) throws Exception
{
for (MembershipTypeEventListener listener : listeners)
{
listener.postSave(type, isNew);
}
} | java |
private void preDelete(MembershipType type) throws Exception
{
for (MembershipTypeEventListener listener : listeners)
{
listener.preDelete(type);
}
} | java |
private void postDelete(MembershipType type) throws Exception
{
for (MembershipTypeEventListener listener : listeners)
{
listener.postDelete(type);
}
} | 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... | 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)
{
... | 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... | java |
public void internalRemoveWorkspace(final String workspaceName) throws RepositoryException
{
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
final WorkspaceContainer workspaceContainer = repositoryContainer.getWorkspaceContainer(workspaceName);
try
... | java |
SessionImpl internalLogin(ConversationState state, String workspaceName) throws LoginException,
NoSuchWorkspaceException, RepositoryException
{
if (workspaceName == null)
{
workspaceName = config.getDefaultWorkspaceName();
if (workspaceName == null)
{
throw n... | 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... | java |
public String getAsString(boolean showIndex)
{
if (showIndex)
{
if (cachedToStringShowIndex != null)
{
return cachedToStringShowIndex;
}
}
else
{
if (cachedToString != null)
{
return cachedToString;
... | java |
private List<NodeTypeData> registerListOfNodeTypes(final List<NodeTypeData> nodeTypes, final int alreadyExistsBehaviour)
throws RepositoryException
{
// validate
nodeTypeDataValidator.validateNodeType(nodeTypes);
nodeTypeRepository.registerNodeType(nodeTypes, this, accessControlPolicy,... | 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... | 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);
} | 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... | 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))
{... | java |
private StreamingOutput body(WebDavNamespaceContext nsContext, LockRequestEntity input, Depth depth,
String lockToken, String lockOwner, String timeout)
{
return new LockResultResponseEntity(nsContext, lockToken, lockOwner, timeout);
} | 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)
{
... | java |
public String dump() throws RepositoryException {
StringBuilder tmp = new StringBuilder();
QueryTreeDump.dump(this, tmp);
return tmp.toString();
} | java |
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, String statement,
String language) throws InvalidQueryException, RepositoryException
{
AbstractQueryImpl query = createQueryInstance();
query.init(session, sessionDataManager, handler, statement, language);
... | java |
public void checkIndex(final InspectionReport report, final boolean isSystem) throws RepositoryException,
IOException
{
if (isSuspended.get())
{
try
{
SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Object>()
{
... | 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... | 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 "
... | java |
@SuppressWarnings("unchecked")
protected IndexerChangesFilter initializeChangesFilter() throws RepositoryException,
RepositoryConfigurationException
{
IndexerChangesFilter newChangesFilter = null;
Class<? extends IndexerChangesFilter> changesFilterClass = DefaultChangesFilter.class;
... | java |
protected void initializeQueryHandler() throws RepositoryException, RepositoryConfigurationException
{
// initialize query handler
String className = config.getType();
if (className == null)
{
throw new RepositoryConfigurationException("Content hanler configuration fail")... | java |
public void setOnline(boolean isOnline, boolean allowQuery, boolean dropStaleIndexes) throws IOException
{
handler.setOnline(isOnline, allowQuery, dropStaleIndexes);
} | 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... | java |
private void cleanIndexDirectory(String path) throws IOException
{
SecurityHelper.doPrivilegedIOExceptionAction((PrivilegedExceptionAction<Void>) () -> {
File newIndexFolder = new File(path);
if(newIndexFolder.exists())
{
DirectoryHelper.removeDirectory(newIndexFold... | 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... | 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;
}
} | java |
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.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 void addNamespace(String prefix, String uri) {
prefixToURI.put(prefix, uri);
uriToPrefix.put(uri, prefix);
} | 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(... | 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... | 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.... | 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... | 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... | 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... | java |
private void writeZeroString(String outString, OutputStream outStream) throws IOException
{
simpleWriteString(outString, outStream);
outStream.write(0);
outStream.write(0);
} | java |
private void writeInt(int intValue, OutputStream outStream) throws IOException
{
outStream.write(intValue & 0xFF);
outStream.write((intValue >> 8) & 0xFF);
} | 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);
}
} | java |
private void commitPending() throws IOException
{
if (pending.isEmpty())
{
return;
}
super.addDocuments((Document[])pending.values().toArray(new Document[pending.size()]));
pending.clear();
aggregateIndexes.clear();
} | 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... | java |
public BaseXmlExporter getExportVisitor(XmlMapping type, OutputStream stream, boolean skipBinary, boolean noRecurse,
boolean exportChildVersionHistory, ItemDataConsumer dataManager, NamespaceRegistry namespaceRegistry,
ValueFactoryImpl systemValueFactory) throws NamespaceException, RepositoryException, IOEx... | 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 ... | 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... | 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... | java |
protected NodeData getCorrespondingNodeData(SessionImpl corrSession) throws ItemNotFoundException,
AccessDeniedException, RepositoryException
{
final QPath myPath = nodeData().getQPath();
final SessionDataManager corrDataManager = corrSession.getTransientNodesManager();
if (this.isNodeType(C... | 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;
} | 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... | 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... | java |
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<NodeData> childNodesData() throws RepositoryException, AccessDeniedException
{
List<NodeData> storedNodes = new ArrayList<NodeData>(dataManager.getChildNodesData(nodeData()));
Collections.sort(storedNodes, new NodeDataOrderComparator());
return storedNodes;
} | 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... | 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";
... | java |
public String getPositionSegment()
{
HierarchicalProperty position = member.getChild(new QName("DAV:", "position"));
return position.getChild(0).getChild(new QName("DAV:", "segment")).getValue();
} | 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... | 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 + "... | 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(... | java |
protected String getAttribute(Map<String, String> attributes, InternalQName name) throws RepositoryException
{
JCRName jname = locationFactory.createJCRName(name);
return attributes.get(jname.getAsString());
} | java |
protected void suspendRepository() throws RepositoryException
{
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
repository.setState(ManageableRepository.SUSPENDED);
} | java |
protected void resumeRepository() throws RepositoryException
{
// Need privileges to manage repository.
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
repository.setState(ManageableRepository.ONLINE);
} | 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... | 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 + "/" +... | java |
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 boolean getForceXMLConfigurationValue(InitParams initParams)
{
ValueParam valueParam = initParams.getValueParam("force-xml-configuration");
return (valueParam != null ? Boolean.valueOf(valueParam.getValue()) : false);
} | 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... | 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 ... | java |
@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("/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("/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("/workspaces/{repositoryName}")
public Response getWorkspaceNames(@PathParam("repositoryName") String repositoryName)
{
String errorMessage = new String();
Status status;
try
{
List<String> ... | 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... | 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... | 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... | 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));
... | java |
public void remove(ItemState item)
{
if (item.isNode())
{
remove(item.getData().getQPath());
}
else
{
removeProperty(item, -1);
}
} | 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... | 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.... | 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... | 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<... | 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... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.