Codota Logo
Property.save
Code IndexAdd Codota to your IDE (free)

How to use
save
method
in
javax.jcr.Property

Best Java code snippets using javax.jcr.Property.save (Showing top 9 results out of 315)

  • Common ways to obtain Property
private void myMethod () {
Property p =
  • Codota IconNode node;String name;String value;node.setProperty(name, value)
  • Codota IconNode node;String relPath;node.getProperty(relPath)
  • Codota IconPropertyIterator iter;iter.nextProperty()
  • Smart code suggestions by Codota
}
origin: info.magnolia/magnolia-core

@Override
public void save() throws AccessDeniedException, ItemExistsException, ConstraintViolationException, InvalidItemStateException, ReferentialIntegrityException, VersionException, LockException, NoSuchNodeTypeException, RepositoryException {
  getWrappedProperty().save();
}
origin: info.magnolia/magnolia-core

@Override
public void save() throws RepositoryException {
  if (isExist()) {
    getJCRProperty().save();
  }
}
origin: apache/jackrabbit

public void testSetValue() throws RepositoryException {
  Property p = (Property) readOnlySession.getItem(testPropertyPath);
  try {
    p.setValue("otherValue");
    p.save();
    fail("A read only session must not be allowed to modify a property value");
  } catch (AccessDeniedException e) {
    // success
  }
}
origin: apache/jackrabbit-oak

@Test
public void saveOnChangedProperty() throws RepositoryException {
  // Property on root
  prop0.setValue("changed");
  prop0.save();
  // Property on child node
  prop1.setValue("changed");
  prop1.save();
}
origin: apache/jackrabbit

/**
 * Test the restore of a OnParentVersion-COMPUTE property
 *
 * @throws javax.jcr.RepositoryException
 */
public void testRestoreProp() throws RepositoryException {
  Node propParent = p.getParent();
  propParent.checkout();
  Version v = propParent.checkin();
  propParent.checkout();
  p.setValue(newPropValue);
  p.save();
  propParent.restore(v, false);
  assertEquals("On restore of a OnParentVersion-COMPUTE property P, the current P in the workspace will be left unchanged.", p.getString(), newPropValue);
}
origin: apache/jackrabbit

/**
 * Test the restore of a OnParentVersion-INITIALIZE property
 *
 * @throws javax.jcr.RepositoryException
 */
public void testRestoreProp() throws RepositoryException {
  Node propParent = p.getParent();
  propParent.checkout();
  Version v = propParent.checkin();
  propParent.checkout();
  p.setValue(newPropValue);
  p.save();
  propParent.restore(v, false);
  assertEquals("On restore of a OnParentVersion-INITIALIZE property P, the current value of P must be left unchanged.", p.getString(), newPropValue);
}
origin: apache/jackrabbit

/**
 * Test the restore of a OnParentVersion-IGNORE property
 *
 * @throws javax.jcr.RepositoryException
 */
public void testRestoreProp() throws RepositoryException {
  Node propParent = p.getParent();
  propParent.checkout();
  Version v = propParent.checkin();
  propParent.checkout();
  p.setValue(newPropValue);
  p.save();
  propParent.restore(v, false);
  assertEquals("On restore of a OnParentVersion-IGNORE property P, the current value of P must be left unchanged.", p.getString(), newPropValue);
}
origin: apache/jackrabbit-oak

@Test
public void saveOnNewProperty() throws RepositoryException {
  assumeTrue(!NodeImpl.SAVE_SESSION);
  try {
    foo.setProperty("p3", "v3").save();
    fail("Expected UnsupportedRepositoryOperationException");
  } catch (UnsupportedRepositoryOperationException e) {
    assertTrue(e.getCause() instanceof CommitFailedException);
  } finally {
    session.refresh(false);
  }
}
origin: apache/jackrabbit-oak

@Test
public void saveMissesProperty() throws RepositoryException {
  assumeTrue(!NodeImpl.SAVE_SESSION);
  try {
    prop1.setValue("changed");
    prop2.setValue("changed");
    prop1.save();
    fail("Expected UnsupportedRepositoryOperationException");
  } catch (UnsupportedRepositoryOperationException e) {
    assertTrue(e.getCause() instanceof CommitFailedException);
  } finally {
    session.refresh(false);
  }
}
javax.jcrPropertysave

Popular methods of Property

  • getString
    Returns a String representation of the value of this property. A shortcut for Property.getValue().g
  • getValues
    Returns an array of all the values of this property. Used to access multi-value properties. The arra
  • getValue
    Returns the value of this property as a Value object. The object returned is a copy of the stored va
  • getName
  • getType
    Returns the type of this Property. One of: * PropertyType.STRING * PropertyType.BINARY * Property
  • getBinary
    Returns a Binary representation of the value of this property. A shortcut for Property.getValue().g
  • getBoolean
    Returns a boolean representation of the value of this property. A shortcut for Property.getValue().
  • remove
  • isMultiple
    Returns true if this property is multi-valued andfalse if this property is single-valued.
  • getDate
    Returns a Calendar representation of the value of this property. A shortcut for Property.getValue()
  • getLong
    Returns a long representation of the value of this property. A shortcut for Property.getValue().get
  • getDefinition
    Returns the property definition that applies to this property. In some cases there may appear to be
  • getLong,
  • getDefinition,
  • setValue,
  • getParent,
  • getPath,
  • getNode,
  • getLength,
  • getDouble,
  • getStream,
  • getSession

Popular in Java

  • Making http post requests using okhttp
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • addToBackStack (FragmentTransaction)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JPanel (javax.swing)
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now