@Override public Value getDescriptorValue(final String key) { return this.delegate.getDescriptorValue(key); }
/** * Tests that the required repository descriptors are available. */ public void testRequiredDescriptors() { Repository rep = session.getRepository(); for (Iterator<String> it = requiredDescriptorKeys.iterator(); it.hasNext();) { String descName = it.next(); assertTrue(descName + " is a standard descriptor", rep.isStandardDescriptor(descName)); if (rep.isSingleValueDescriptor(descName)) { Value val = rep.getDescriptorValue(descName); assertNotNull("Required descriptor is missing: " + descName, val); } else { Value[] vals = rep.getDescriptorValues(descName); assertNotNull("Required descriptor is missing: " + descName, vals); } } }
@Override public Value getDescriptorValue( String key ) { return repository.getDescriptorValue(key); }
public Value getDescriptorValue(String key) { return wrapped.getDescriptorValue(key); }
@Override public Value getDescriptorValue(String key) { return delegate.getDescriptorValue(key); }
public Value getDescriptorValue(String key) { return delegatee.getDescriptorValue(key); }
public Value getDescriptorValue(String key) { return repository.getDescriptorValue(key); }
public Value getDescriptorValue(String key) { return repository.getDescriptorValue(key); }
@Override public Value getDescriptorValue(String key) { Repository repo = getRepository(); if (repo != null) { return repo.getDescriptorValue(key); } logger.error("getDescriptorValue: Repository not available"); return null; }
public Value getDescriptorValue(String key) { Repository curRepository = getCurrentThreadRepository(); if (curRepository != null) { return curRepository.getDescriptorValue(key); } return null; }
public Value getDescriptorValue(String key) { try { return getRepository().getDescriptorValue(key); } catch (RepositoryException e) { log.error("RepositoryException: ",e); } return null; }
/** * Returns the value of the descriptor with the given key from the proxied * repository. Returns <code>null</code> if the descriptor does not exist * or if the proxied repository can not be accessed. * * @param key descriptor key * @return descriptor value, or <code>null</code> */ public Value getDescriptorValue(String key) { try { return getRepository().getDescriptorValue(key); } catch (RepositoryException e) { return null; } }
/** * Returns the value of the descriptor with the given key from the proxied * repository. Returns <code>null</code> if the descriptor does not exist * or if the proxied repository can not be accessed. * * @param key descriptor key * @return descriptor value, or <code>null</code> */ public Value getDescriptorValue(String key) { try { return getRepository().getDescriptorValue(key); } catch (RepositoryException e) { return null; } }
/** * Returns the value of the descriptor with the given key from the proxied * repository. Returns <code>null</code> if the descriptor does not exist * or if the proxied repository can not be accessed. * * @param key descriptor key * @return descriptor value, or <code>null</code> */ public Value getDescriptorValue(String key) { try { return getRepository().getDescriptorValue(key); } catch (RepositoryException e) { return null; } }
/** * Returns the value of the descriptor with the given key from the proxied * repository. Returns <code>null</code> if the descriptor does not exist * or if the proxied repository can not be accessed. * * @param key descriptor key * @return descriptor value, or <code>null</code> */ public Value getDescriptorValue(String key) { try { return factory.getRepository().getDescriptorValue(key); } catch (RepositoryException e) { return null; } }
public Value getDescriptorValue(String key) { if (jcrDelegateeRepository != null) { return jcrDelegateeRepository.getDescriptorValue(key); } if (hippoRepository != null) { ClassLoader currentClassloader = switchToRepositoryClassloader(); try { return hippoRepository.getRepository().getDescriptorValue(key); } finally { if (currentClassloader != null) { Thread.currentThread().setContextClassLoader(currentClassloader); } } } return null; }
/** {@inheritDoc} */ public Value getDescriptorValue(String key) throws RemoteException { try { return SerialValueFactory.makeSerialValue(repository.getDescriptorValue(key)); } catch (RepositoryException ex) { throw new RemoteException(ex.getMessage(), ex); } }
@Override protected void setUp() throws Exception { super.setUp(); if (!getHelper().getRepository().getDescriptorValue(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED).getBoolean()) { throw new NotExecutableException("node and property with same name is not supported"); } n = testRootNode.addNode(sameName); p = testRootNode.setProperty(sameName, "value"); superuser.save(); }
@Override public ContentHandler getImportContentHandler( String parentAbsPath, int uuidBehavior ) throws PathNotFoundException, ConstraintViolationException, VersionException, LockException, AccessDeniedException, RepositoryException { CheckArg.isNotNull(parentAbsPath, "parentAbsPath"); session.checkLive(); // Create a new session, since we don't want to mess with the current session and because we'll save right // when finished reading the document ... JcrSession session = this.session.spawnSession(false); boolean saveWhenFinished = true; // Find the parent path ... AbstractJcrNode parent = session.getNode(parentAbsPath); if (!parent.isCheckedOut()) { throw new VersionException(JcrI18n.nodeIsCheckedIn.text(parent.getPath())); } Repository repo = getSession().getRepository(); boolean retainLifecycleInfo = repo.getDescriptorValue(Repository.OPTION_LIFECYCLE_SUPPORTED).getBoolean(); boolean retainRetentionInfo = repo.getDescriptorValue(Repository.OPTION_RETENTION_SUPPORTED).getBoolean(); return new JcrContentHandler(session, parent, uuidBehavior, saveWhenFinished, retainRetentionInfo, retainLifecycleInfo, null); }
@Test public void testCopyLockedNode() throws Exception { assumeTrue(getRepository().getDescriptorValue(Repository.OPTION_LOCKING_SUPPORTED).getBoolean()); Session session = getAdminSession(); Node toCopy = session.getNode(TEST_PATH + "/source/node"); toCopy.addMixin(JcrConstants.MIX_LOCKABLE); session.save(); session.getWorkspace().getLockManager().lock(toCopy.getPath(), true, true, Long.MAX_VALUE, "my"); assertTrue(toCopy.isLocked()); assertTrue(toCopy.hasProperty(JcrConstants.JCR_LOCKISDEEP)); assertTrue(toCopy.hasProperty(JcrConstants.JCR_LOCKOWNER)); session.getWorkspace().copy(TEST_PATH + "/source/node", TEST_PATH + "/target/copied"); assertTrue(testNode.hasNode("source/node")); assertTrue(testNode.hasNode("target/copied")); Node copy = testNode.getNode("target/copied"); assertTrue(copy.isNodeType(JcrConstants.MIX_LOCKABLE)); assertFalse(copy.isLocked()); assertFalse(copy.hasProperty(JcrConstants.JCR_LOCKISDEEP)); assertFalse(copy.hasProperty(JcrConstants.JCR_LOCKOWNER)); } }