code
stringlengths
73
34.1k
label
stringclasses
1 value
public QPath getRemainder() { if (matchPos + matchLength >= pathLength) { return null; } else { try { throw new RepositoryException("Not implemented"); //return path.subPath(matchPos + matchLength, pathLength); } catch...
java
private void calculateDocFilter() throws IOException { PerQueryCache cache = PerQueryCache.getInstance(); @SuppressWarnings("unchecked") Map<String, BitSet> readerCache = (Map<String, BitSet>)cache.get(MatchAllScorer.class, reader); if (readerCache == null) { re...
java
public String[] getSynonyms(String word) { String[] synonyms = table.get(word); if (synonyms == null) return EMPTY; String[] copy = new String[synonyms.length]; // copy for guaranteed immutability System.arraycopy(synonyms, 0, copy, 0, synonyms.length); return copy; }
java
public static void writePropStats(XMLStreamWriter xmlStreamWriter, Map<String, Set<HierarchicalProperty>> propStatuses) throws XMLStreamException { for (Map.Entry<String, Set<HierarchicalProperty>> stat : propStatuses.entrySet()) { xmlStreamWriter.writeStartElement("DAV:", "propstat")...
java
public static void writeProperty(XMLStreamWriter xmlStreamWriter, HierarchicalProperty prop) throws XMLStreamException { String uri = prop.getName().getNamespaceURI(); String prefix = xmlStreamWriter.getNamespaceContext().getPrefix(uri); if (prefix == null) { prefix ...
java
public static void writeAttributes(XMLStreamWriter xmlStreamWriter, HierarchicalProperty property) throws XMLStreamException { Map<String, String> attributes = property.getAttributes(); Iterator<String> keyIter = attributes.keySet().iterator(); while (keyIter.hasNext()) { ...
java
private String getRealm(String sUrl) throws IOException, ModuleException { AuthorizationHandler ah = AuthorizationInfo.getAuthHandler(); try { URL url = new URL(sUrl); HTTPConnection connection = new HTTPConnection(url); connection.removeModule(CookieModule.cla...
java
public static String getChecksum(InputStream in, String algo) throws NoSuchAlgorithmException, IOException { MessageDigest md = MessageDigest.getInstance(algo); DigestInputStream digestInputStream = new DigestInputStream(in, md); digestInputSt...
java
private static String generateString(byte[] bytes) { StringBuffer sb = new StringBuffer(); for (byte b : bytes) { int v = b & 0xFF; sb.append((char) HEX.charAt(v >> 4)); sb.append((char) HEX.charAt(v & 0x0f)); } return sb.toString(); }
java
public static void cleanWorkspaceData(WorkspaceEntry wsEntry) throws DBCleanException { SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION); Connection jdbcConn = getConnection(wsEntry); String dialect = resolveDialect(jdbcConn, wsEntry); boole...
java
public static void cleanRepositoryData(RepositoryEntry rEntry) throws DBCleanException { SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION); WorkspaceEntry wsEntry = rEntry.getWorkspaceEntries().get(0); boolean multiDB = getMultiDbParameter(wsEntry...
java
public static DBCleanerTool getRepositoryDBCleaner(Connection jdbcConn, RepositoryEntry rEntry) throws DBCleanException { SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION); WorkspaceEntry wsEntry = rEntry.getWorkspaceEntries().get(0); boole...
java
public static DBCleanerTool getWorkspaceDBCleaner(Connection jdbcConn, WorkspaceEntry wsEntry) throws DBCleanException { SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION); String dialect = resolveDialect(jdbcConn, wsEntry); boolean autoCommit = dial...
java
private static Connection getConnection(WorkspaceEntry wsEntry) throws DBCleanException { String dsName = getSourceNameParameter(wsEntry); DataSource ds; try { ds = (DataSource)new InitialContext().lookup(dsName); } catch (NamingException e) { t...
java
private String hash(String dataId) { try { MessageDigest digest = MessageDigest.getInstance(hashAlgorithm); digest.update(dataId.getBytes("UTF-8")); return new BigInteger(1, digest.digest()).toString(32); } catch (NumberFormatException e) { throw new ...
java
private QPathEntry parsePatternQPathEntry(String namePattern, SessionImpl session) throws RepositoryException { int colonIndex = namePattern.indexOf(':'); int bracketIndex = namePattern.lastIndexOf('['); String namespaceURI; String localName; int index = getDefaultIndex(); ...
java
protected void accumulatePersistedNodesChanges(Map<String, Long> calculatedChangedNodesSize) throws QuotaManagerException { for (Entry<String, Long> entry : calculatedChangedNodesSize.entrySet()) { String nodePath = entry.getKey(); long delta = entry.getValue(); try ...
java
protected void accumulatePersistedWorkspaceChanges(long delta) throws QuotaManagerException { long dataSize = 0; try { dataSize = quotaPersister.getWorkspaceDataSize(rName, wsName); } catch (UnknownDataSizeException e) { if (LOG.isTraceEnabled()) { ...
java
protected void accumulatePersistedRepositoryChanges(long delta) { long dataSize = 0; try { dataSize = quotaPersister.getRepositoryDataSize(rName); } catch (UnknownDataSizeException e) { if (LOG.isTraceEnabled()) { LOG.trace(e.getMessage(), e)...
java
private void accumulatePersistedGlobalChanges(long delta) { long dataSize = 0; try { dataSize = quotaPersister.getGlobalDataSize(); } catch (UnknownDataSizeException e) { if (LOG.isTraceEnabled()) { LOG.trace(e.getMessage(), e); } ...
java
protected NodeImpl parent(final boolean pool) throws RepositoryException { NodeImpl parent = (NodeImpl)dataManager.getItemByIdentifier(getParentIdentifier(), pool); if (parent == null) { throw new ItemNotFoundException("FATAL: Parent is null for " + getPath() + " parent UUID: " ...
java
public NodeData parentData() throws RepositoryException { checkValid(); NodeData parent = (NodeData)dataManager.getItemData(getData().getParentIdentifier()); if (parent == null) { throw new ItemNotFoundException("FATAL: Parent is null for " + getPath() + " parent UUID: " ...
java
public JCRPath getLocation() throws RepositoryException { if (this.location == null) { this.location = session.getLocationFactory().createJCRPath(qpath); } return this.location; }
java
public String getType() { if (input == null) { return "allprop"; } if (input.getChild(PropertyConstants.DAV_ALLPROP_INCLUDE) != null) { return "include"; } QName name = input.getChild(0).getName(); if (name.getNamespaceURI().equals("D...
java
public R run(A... arg) throws E { final TransactionManager tm = getTransactionManager(); Transaction tx = null; try { if (tm != null) { try { tx = tm.suspend(); } catch (SystemException e) { ...
java
protected R execute(A... arg) throws E { if (arg == null || arg.length == 0) { return execute((A)null); } return execute(arg[0]); }
java
public NodeRepresentation getNodeRepresentation(Node node, String mediaTypeHint) throws RepositoryException { NodeRepresentationFactory factory = factory(node); if (factory != null) return factory.createNodeRepresentation(node, mediaTypeHint); else return new DocumentViewNodeRepr...
java
public void spoolDone() { final CountDownLatch sl = this.spoolLatch.get(); this.spoolLatch.set(null); sl.countDown(); }
java
public ItemData getItemData(NodeData parent, QPathEntry[] relPathEntries, ItemType itemType) throws RepositoryException { ItemData item = parent; for (int i = 0; i < relPathEntries.length; i++) { if (i == relPathEntries.length - 1) { item = getItemData(parent, re...
java
public ItemData getItemData(String identifier,boolean checkChangesLogOnly) throws RepositoryException { ItemData data = null; // 1. Try in transient changes ItemState state = changesLog.getItemState(identifier); if (state == null) { // 2. Try from txdatamanager data = ...
java
public ItemImpl getItem(NodeData parent, QPathEntry name, boolean pool, ItemType itemType) throws RepositoryException { return getItem(parent, name, pool, itemType, true); }
java
public ItemImpl getItem(NodeData parent, QPathEntry name, boolean pool, ItemType itemType, boolean apiRead, boolean createNullItemData) throws RepositoryException { long start = 0; if (LOG.isDebugEnabled()) { start = System.currentTimeMillis(); LOG.debug("getItem(" + p...
java
public ItemImpl getItem(NodeData parent, QPathEntry[] relPath, boolean pool, ItemType itemType) throws RepositoryException { long start = 0; if (LOG.isDebugEnabled()) { start = System.currentTimeMillis(); StringBuilder debugPath = new StringBuilder(); for (QPathEntr...
java
public ItemImpl getItem(QPath path, boolean pool) throws RepositoryException { long start = 0; if (LOG.isDebugEnabled()) { start = System.currentTimeMillis(); LOG.debug("getItem(" + path.getAsString() + " ) >>>>>"); } ItemImpl item = null; try { r...
java
protected ItemImpl readItem(ItemData itemData, boolean pool) throws RepositoryException { return readItem(itemData, null, pool, true); }
java
protected ItemImpl readItem(ItemData itemData, NodeData parent, boolean pool, boolean apiRead) throws RepositoryException { if (!apiRead) { // Need privileges SecurityManager security = System.getSecurityManager(); if (security != null) { security.che...
java
public ItemImpl getItemByIdentifier(String identifier, boolean pool) throws RepositoryException { return getItemByIdentifier(identifier, pool, true); }
java
public ItemImpl getItemByIdentifier(String identifier, boolean pool, boolean apiRead) throws RepositoryException { long start = 0; if (LOG.isDebugEnabled()) { start = System.currentTimeMillis(); LOG.debug("getItemByIdentifier(" + identifier + " ) >>>>>"); } ItemImpl i...
java
public AccessControlList getACL(QPath path) throws RepositoryException { long start = 0; if (LOG.isDebugEnabled()) { start = System.currentTimeMillis(); LOG.debug("getACL(" + path.getAsString() + " ) >>>>>"); } try { NodeData parent = (NodeData)getItemD...
java
protected List<ItemState> reindexSameNameSiblings(NodeData cause, ItemDataConsumer dataManager) throws RepositoryException { List<ItemState> changes = new ArrayList<ItemState>(); NodeData parentNodeData = (NodeData)dataManager.getItemData(cause.getParentIdentifier()); NodeData nextSibling =...
java
public List<PropertyData> getReferencesData(String identifier, boolean skipVersionStorage) throws RepositoryException { List<PropertyData> persisted = transactionableManager.getReferencesData(identifier, skipVersionStorage); List<PropertyData> sessionTransient = new ArrayList<PropertyData>(); ...
java
private void validate(QPath path) throws RepositoryException, AccessDeniedException, ReferentialIntegrityException { List<ItemState> changes = changesLog.getAllStates(); for (ItemState itemState : changes) { if (itemState.isInternallyCreated()) { // skip internally c...
java
private void validateAccessPermissions(ItemState changedItem) throws RepositoryException, AccessDeniedException { if (changedItem.isAddedAutoCreatedNodes()) { validateAddNodePermission(changedItem); } else if (changedItem.isDeleted()) { validateRemoveAccessPermission(c...
java
private void validateMandatoryItem(ItemState changedItem) throws ConstraintViolationException, AccessDeniedException { if (changedItem.getData().isNode() && (changedItem.isAdded() || changedItem.isMixinChanged()) && !changesLog.getItemState(changedItem.getData().getQPath()).isDeleted()) { ...
java
void rollback(ItemData item) throws InvalidItemStateException, RepositoryException { // remove from changes log (Session pending changes) PlainChangesLog slog = changesLog.pushLog(item.getQPath()); SessionChangesLog changes = new SessionChangesLog(slog.getAllStates(), session); for (Iterator...
java
protected List<? extends ItemData> mergeList(ItemData rootData, DataManager dataManager, boolean deep, int action) throws RepositoryException { // 1 get all transient descendants List<ItemState> transientDescendants = new ArrayList<ItemState>(); traverseTransientDescendants(rootData, action,...
java
private void traverseStoredDescendants(ItemData parent, DataManager dataManager, int action, Map<String, ItemData> ret, boolean listOnly, Collection<ItemState> transientDescendants) throws RepositoryException { if (parent.isNode() && !isNew(parent.getIdentifier())) { if (action != M...
java
private List<? extends ItemData> getStoredDescendants(ItemData parent, DataManager dataManager, int action) throws RepositoryException { if (parent.isNode()) { List<ItemData> childItems = null; List<NodeData> childNodes = dataManager.getChildNodesData((NodeData)parent); ...
java
private void traverseTransientDescendants(ItemData parent, int action, List<ItemState> ret) throws RepositoryException { if (parent.isNode()) { if (action != MERGE_PROPS) { Collection<ItemState> childNodes = changesLog.getLastChildrenStates(parent, true); ...
java
private void reloadDescendants(QPath parentOld, QPath parent) throws RepositoryException { List<ItemImpl> items = itemsPool.getDescendats(parentOld); for (ItemImpl item : items) { ItemData oldItemData = item.getData(); ItemData newItemData = updatePath(parentOld, parent, oldItem...
java
private ItemData updatePathIfNeeded(ItemData data) throws IllegalPathException { if (data == null || changesLog.getAllPathsChanged() == null) return data; List<ItemState> states = changesLog.getAllPathsChanged(); for (int i = 0, length = states.size(); i < length; i++) { Ite...
java
private ItemData updatePath(QPath parentOld, QPath parent, ItemData oldItemData) throws IllegalPathException { int relativeDegree = oldItemData.getQPath().getDepth() - parentOld.getDepth(); QPath newQPath = QPath.makeChildPath(parent, oldItemData.getQPath().getRelPath(relativeDegree)); ItemData ne...
java
private static Statistics getStatistics(Class<?> target, String signature) { initIfNeeded(); Statistics statistics = MAPPING.get(signature); if (statistics == null) { synchronized (JCRAPIAspect.class) { Class<?> interfaceClass = findInterface(target); ...
java
private static void initIfNeeded() { if (!INITIALIZED) { synchronized (JCRAPIAspect.class) { if (!INITIALIZED) { ExoContainer container = ExoContainerContext.getTopContainer(); JCRAPIAspectConfig config = null; if (con...
java
public static DBCleaningScripts prepareScripts(String dialect, WorkspaceEntry wsEntry) throws DBCleanException { if (dialect.startsWith(DialectConstants.DB_DIALECT_MYSQL)) { return new MySQLCleaningScipts(dialect, wsEntry); } else if (dialect.startsWith(DialectConstants.DB_DIALECT_DB...
java
private void triggerRSyncSynchronization() { // Call RSync to retrieve actual index from coordinator if (modeHandler.getMode() == IndexerIoMode.READ_ONLY) { EmbeddedCacheManager cacheManager = cache.getCacheManager(); if (cacheManager.getCoordinator() instanceof JGroupsAddress ...
java
public static SessionProvider createAnonimProvider() { Identity id = new Identity(IdentityConstants.ANONIM, new HashSet<MembershipEntry>()); return new SessionProvider(new ConversationState(id)); }
java
public synchronized Session getSession(String workspaceName, ManageableRepository repository) throws LoginException, NoSuchWorkspaceException, RepositoryException { if (closed) { throw new IllegalStateException("Session provider already closed"); } if (workspaceName == null) ...
java
private String key(ManageableRepository repository, String workspaceName) { String repositoryName = repository.getConfiguration().getName(); return repositoryName + workspaceName; }
java
public static String extractCommonAncestor(String pattern, String absPath) { pattern = normalizePath(pattern); absPath = normalizePath(absPath); String[] patterEntries = pattern.split("/"); String[] pathEntries = absPath.split("/"); StringBuilder ancestor = new StringBuilder(); ...
java
protected void doUpdateIndex(Set<String> removedNodes, Set<String> addedNodes, Set<String> parentRemovedNodes, Set<String> parentAddedNodes) { ChangesHolder changes = searchManager.getChanges(removedNodes, addedNodes); ChangesHolder parentChanges = parentSearchManager.getChanges(parentRemovedNodes,...
java
private int forceCloseSession(String repositoryName, String workspaceName) throws RepositoryException, RepositoryConfigurationException { ManageableRepository mr = repositoryService.getRepository(repositoryName); WorkspaceContainerFacade wc = mr.getWorkspaceContainer(workspaceName); SessionR...
java
public List<String> readList() throws IOException { InputStream in = PrivilegedFileHelper.fileInputStream(logFile); try { List<String> list = new ArrayList<String>(); BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String line; whil...
java
public void addJobEntry(BackupJob job) { // jobEntries try { JobEntryInfo info = new JobEntryInfo(); info.setDate(Calendar.getInstance()); info.setType(job.getType()); info.setState(job.getState()); info.setURL(job.getStorageURL()); ...
java
public Collection<JobEntryInfo> getJobEntryStates() { HashMap<Integer, JobEntryInfo> infos = new HashMap<Integer, JobEntryInfo>(); for (JobEntryInfo jobEntry : jobEntries) { infos.put(jobEntry.getID(), jobEntry); } return infos.values(); }
java
public Response mkCol(Session session, String path, String nodeType, List<String> mixinTypes, List<String> tokens) { Node node; try { nullResourceLocks.checkLock(session, path, tokens); node = session.getRootNode().addNode(TextUtil.relativizePath(path), nodeType); ...
java
private void addMixins(Node node, List<String> mixinTypes) { for (int i = 0; i < mixinTypes.size(); i++) { String curMixinType = mixinTypes.get(i); try { node.addMixin(curMixinType); } catch (Exception exc) { log.err...
java
public Response unLock(Session session, String path, List<String> tokens) { try { try { Node node = (Node)session.getItem(path); if (node.isLocked()) { node.unlock(); session.save(); } ...
java
public static HierarchicalProperty lockDiscovery(String token, String lockOwner, String timeOut) { HierarchicalProperty lockDiscovery = new HierarchicalProperty(new QName("DAV:", "lockdiscovery")); HierarchicalProperty activeLock = lockDiscovery.addChild(new HierarchicalProperty(new QName(...
java
protected HierarchicalProperty supportedLock() { HierarchicalProperty supportedLock = new HierarchicalProperty(new QName("DAV:", "supportedlock")); HierarchicalProperty lockEntry = new HierarchicalProperty(new QName("DAV:", "lockentry")); supportedLock.addChild(lockEntry); Hierarchic...
java
protected HierarchicalProperty supportedMethodSet() { HierarchicalProperty supportedMethodProp = new HierarchicalProperty(SUPPORTEDMETHODSET); supportedMethodProp.addChild(new HierarchicalProperty(new QName("DAV:", "supported-method"))).setAttribute( "name", "PROPFIND"); supportedMe...
java
private void updateVersion(Node fileNode, InputStream inputStream, String autoVersion, List<String> mixins) throws RepositoryException { if (!fileNode.isCheckedOut()) { fileNode.checkout(); fileNode.getSession().save(); } if (CHECKOUT.equals(autoVersion)) ...
java
void put(String uuid, CachingIndexReader reader, int n) { LRUMap cacheSegment = docNumbers[getSegmentIndex(uuid.charAt(0))]; //UUID key = UUID.fromString(uuid); String key = uuid; synchronized (cacheSegment) { Entry e = (Entry)cacheSegment.get(key); if (e != null) ...
java
public Value createValue(JCRName value) throws RepositoryException { if (value == null) return null; try { return new NameValue(value.getInternalName(), locationFactory); } catch (IOException e) { throw new RepositoryException("Cannot create NAME Value f...
java
public Value createValue(JCRPath value) throws RepositoryException { if (value == null) return null; try { return new PathValue(value.getInternalPath(), locationFactory); } catch (IOException e) { throw new RepositoryException("Cannot create PATH Value f...
java
public Value createValue(Identifier value) { if (value == null) return null; try { return new ReferenceValue(value); } catch (IOException e) { LOG.warn("Cannot create REFERENCE Value from Identifier " + value, e); return null; } }
java
public Value loadValue(ValueData data, int type) throws RepositoryException { try { switch (type) { case PropertyType.STRING : return new StringValue(data); case PropertyType.BINARY : return new BinaryValue(data, spoolConfig); ...
java
protected Connection openConnection() throws SQLException { return SecurityHelper.doPrivilegedSQLExceptionAction(new PrivilegedExceptionAction<Connection>() { public Connection run() throws SQLException { return ds.getConnection(); } }); }
java
public String getUrlParams() { StringBuffer osParams = new StringBuffer(); for (Iterator i = this.entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry)i.next(); if (entry.getValue() != null) osParams.append("&" + encodeConfig(entry.getKey().toString()) ...
java
public String addLock(Session session, String path) throws LockException { String repoPath = session.getRepository().hashCode() + "/" + session.getWorkspace().getName() + "/" + path; if (!nullResourceLocks.containsKey(repoPath)) { String newLockToken = IdGenerator.generate(); ...
java
public void removeLock(Session session, String path) { String repoPath = session.getRepository().hashCode() + "/" + session.getWorkspace().getName() + "/" + path; String token = nullResourceLocks.get(repoPath); session.removeLockToken(token); nullResourceLocks.remove(repoPath); }
java
public boolean isLocked(Session session, String path) { String repoPath = session.getRepository().hashCode() + "/" + session.getWorkspace().getName() + "/" + path; if (nullResourceLocks.get(repoPath) != null) { return true; } return false; }
java
public void checkLock(Session session, String path, List<String> tokens) throws LockException { String repoPath = session.getRepository().hashCode() + "/" + session.getWorkspace().getName() + "/" + path; String currentToken = nullResourceLocks.get(repoPath); if (currentToken == null) ...
java
private Object getObject(Class cl, byte[] data) throws Exception { JsonHandler jsonHandler = new JsonDefaultHandler(); JsonParser jsonParser = new JsonParserImpl(); InputStream inputStream = new ByteArrayInputStream(data); jsonParser.parse(inputStream, jsonHandler); JsonValue json...
java
public Response propPatch(Session session, String path, HierarchicalProperty body, List<String> tokens, String baseURI) { try { lockHolder.checkLock(session, path, tokens); Node node = (Node)session.getItem(path); WebDavNamespaceContext nsContext = new WebDav...
java
public List<HierarchicalProperty> setList(HierarchicalProperty request) { HierarchicalProperty set = request.getChild(new QName("DAV:", "set")); HierarchicalProperty prop = set.getChild(new QName("DAV:", "prop")); List<HierarchicalProperty> setList = prop.getChildren(); return setList; ...
java
public List<HierarchicalProperty> removeList(HierarchicalProperty request) { HierarchicalProperty remove = request.getChild(new QName("DAV:", "remove")); HierarchicalProperty prop = remove.getChild(new QName("DAV:", "prop")); List<HierarchicalProperty> removeList = prop.getChildren(); re...
java
public Response orderPatch(Session session, String path, HierarchicalProperty body, String baseURI) { try { Node node = (Node)session.getItem(path); List<OrderMember> members = getMembers(body); WebDavNamespaceContext nsContext = new WebDavNamespaceContext(session); ...
java
protected List<OrderMember> getMembers(HierarchicalProperty body) { ArrayList<OrderMember> members = new ArrayList<OrderMember>(); List<HierarchicalProperty> childs = body.getChildren(); for (int i = 0; i < childs.size(); i++) { OrderMember member = new OrderMember(childs.get(i...
java
protected boolean doOrder(Node parentNode, List<OrderMember> members) { boolean success = true; for (int i = 0; i < members.size(); i++) { OrderMember member = members.get(i); int status = HTTPStatus.OK; try { parentNode.getSession().refr...
java
private InputStream spoolInputStream(ObjectReader in, long contentLen) throws IOException { byte[] buffer = new byte[0]; byte[] tmpBuff; long readLen = 0; File sf = null; OutputStream sfout = null; try { while (true) { int needToRead = contentL...
java
protected TransientItemData copyItemDataDelete(final ItemData item) throws RepositoryException { if (item == null) { return null; } // make a copy if (item.isNode()) { final NodeData node = (NodeData)item; // the node ACL can't be are null as ACL mana...
java
protected List<ValueData> copyValues(PropertyData property) throws RepositoryException { List<ValueData> src = property.getValues(); List<ValueData> copy = new ArrayList<ValueData>(src.size()); try { for (ValueData vd : src) { copy.add(ValueDataUtil.creat...
java
public NodeTypeData build() { if (nodeDefinitionDataBuilders.size() > 0) { childNodeDefinitions = new NodeDefinitionData[nodeDefinitionDataBuilders.size()]; for (int i = 0; i < childNodeDefinitions.length; i++) { childNodeDefinitions[i] = nodeDefinitionDataBuilders....
java
public static void createVersion(Node nodeVersioning) throws Exception { if(!nodeVersioning.isNodeType(NT_FILE)) { if(log.isDebugEnabled()){ log.debug("Version history is not impact with non-nt:file documents, there'is not any version created."); } return; } if(!nodeVersioning.is...
java
private static void removeRedundant(Node nodeVersioning) throws Exception{ VersionHistory versionHistory = nodeVersioning.getVersionHistory(); String baseVersion = nodeVersioning.getBaseVersion().getName(); String rootVersion = nodeVersioning.getVersionHistory().getRootVersion().getName(); VersionIterat...
java
protected List<PropertyData> getChildProps(String parentId, boolean withValue) { return getChildProps.run(parentId, withValue); }
java
protected ItemData putItem(ItemData item) { if (item.isNode()) { return putNode((NodeData)item, ModifyChildOption.MODIFY); } else { return putProperty((PropertyData)item, ModifyChildOption.MODIFY); } }
java
protected ItemData putNode(NodeData node, ModifyChildOption modifyListsOfChild) { if (node.getParentIdentifier() != null) { if (modifyListsOfChild == ModifyChildOption.NOT_MODIFY) { cache.putIfAbsent(new CacheQPath(getOwnerId(), node.getParentIdentifier(), node.getQPat...
java
protected void putNullItem(NullItemData item) { boolean inTransaction = cache.isTransactionActive(); try { if (!inTransaction) { cache.beginTransaction(); } cache.setLocal(true); if (!item.getIdentifier().equals(NullItemData.NULL_...
java