congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Property.setValue
Code IndexAdd Tabnine to your IDE (free)

How to use
setValue
method
in
javax.jcr.Property

Best Java code snippets using javax.jcr.Property.setValue (Showing top 20 results out of 405)

Refine searchRefine arrow

  • Session.save
origin: apache/jackrabbit

  public void call() throws RepositoryException {
    prop.setValue("modified");
    testRootNode.getSession().save();
  }
}, Event.PROPERTY_CHANGED);
origin: apache/jackrabbit

/**
 * Test the persistence of a property modified with a String parameter and
 * saved from the Session Requires a single-value String (PROP_VALUE_2)
 */
public void testStringSession() throws RepositoryException {
  property1.setValue(PROP_VALUE_2);
  superuser.save();
  assertEquals("String node property not saved", PROP_VALUE_2, property1.getString());
}
origin: apache/jackrabbit

  public void call() throws RepositoryException {
    prop.setValue("modified");
    prop.getSession().save();
  }
}, Event.PROPERTY_CHANGED);
origin: org.onehippo.cms7/hippo-repository-engine

/**
 * Set the autoexport:enabled property to false in the repository. This method should only be called in an exception
 * handler, as it assumes the current session state is garbage and aggressively clears it.
 * @throws RepositoryException
 */
private void disableAutoExportJcrProperty() throws RepositoryException {
  // this method is almost certainly being called while current session state is somehow unreliable
  // therefore, before attempting to work with the repo, we should attempt to reset to a good state
  eventProcessorSession.refresh(false);
  final Property autoExportEnableProperty = autoExportConfigNode.getProperty(AutoExportConstants.CONFIG_ENABLED_PROPERTY_NAME);
  autoExportEnableProperty.setValue(false);
  eventProcessorSession.save();
}
origin: apache/jackrabbit

/**
 * Test the deletion of a property by assigning it a null value, saved from
 * the Session
 */
public void testRemoveMultiValueSession() throws RepositoryException {
  property2.setValue((Value[]) null);
  superuser.save();
  try {
    node.getProperty(propertyName2);
    fail("The property should not exist anymore, as a null Value has been assigned");
  } catch (PathNotFoundException e) {
    //success : the property has been deleted by assigning it a null value
  }
}
origin: apache/jackrabbit

/**
 * Test the deletion of a property by assigning it a null value, saved from
 * the Session
 */
public void testRemoveBooleanSession() throws RepositoryException {
  property1.setValue((Value) null);
  superuser.save();
  try {
    node.getProperty(propertyName1);
    fail("The property should not exist anymore, as a null Value has been assigned");
  } catch (PathNotFoundException e) {
    //success : the property has been deleted by assigning it a null value
  }
}
origin: apache/jackrabbit

/**
 * Test the deletion of a property by assigning it a null value, saved from
 * the Session
 */
public void testRemoveDoubleSession() throws RepositoryException {
  property1.setValue((Value) null);
  superuser.save();
  try {
    node.getProperty(propertyName1);
    fail("The property should not exist anymore, as a null Decimal has been assigned");
  } catch (PathNotFoundException e) {
    //success : the property has been deleted by assigning it a null value
  }
}
origin: apache/jackrabbit

/**
 * Test the deletion of a property by assigning it a null value, saved from
 * the Session
 */
public void testRemoveNodeSession() throws RepositoryException {
  property1.setValue((Value) null);
  superuser.save();
  try {
    node.getProperty(propertyName1);
    fail("The property should not exist anymore, as a null Value has been assigned");
  } catch (PathNotFoundException e) {
    //success : the property has been deleted by assigning it a null value
  }
}
origin: apache/jackrabbit

/**
 * Test the deletion of a property by assigning it a null value, saved from
 * the Session
 */
public void testRemoveMultiStringSession() throws RepositoryException {
  property2.setValue((String[]) null);
  superuser.save();
  try {
    node.getProperty(propertyName2);
    fail("The property should not exist anymore, as a null Value has been assigned");
  } catch (PathNotFoundException e) {
    //success : the property has been deleted by assigning it a null value
  }
}
origin: apache/jackrabbit

/**
 * Test the deletion of a property by assigning it a null value, saved from
 * the Session
 */
public void testRemoveDoubleSession() throws RepositoryException {
  property1.setValue((Value) null);
  superuser.save();
  try {
    node.getProperty(propertyName1);
    fail("The property should not exist anymore, as a null Double has been assigned");
  } catch (PathNotFoundException e) {
    //success : the property has been deleted by assigning it a null value
  }
}
origin: apache/jackrabbit

  /**
   * Test the deletion of a property by assigning it a null value, saved from
   * the Session
   */
  public void testRemoveCalendarSession() throws RepositoryException {
    property1.setValue((Calendar) null);
    superuser.save();

    try {
      node.getProperty(propertyName1);
      fail("The property should not exist anymore, as a null Calendar has been assigned");
    } catch (PathNotFoundException e) {
      //success : the property has been deleted by assigning it a null value
    }
  }
}
origin: apache/jackrabbit

/**
 * Test the deletion of a property by assigning it a null value, saved from
 * the Session
 */
public void testRemoveValueSession() throws RepositoryException {
  Value sv = null;
  property1.setValue(sv);
  superuser.save();
  try {
    node.getProperty(propertyName1);
    fail("The property should not exist anymore, as a null Value has been assigned");
  } catch (PathNotFoundException e) {
    //success : the property has been deleted by assigning it a null value
  }
}
origin: apache/jackrabbit

  /**
   * Test the deletion of a property by assigning it a null value, saved from
   * the Session
   */
  public void testRemoveLongSession() throws RepositoryException {
    property1.setValue((Value) null);
    superuser.save();

    try {
      node.getProperty(propertyName1);
      fail("The property should not exist anymore, as a null Value has been assigned");
    } catch (PathNotFoundException e) {
      //success : the property has been deleted by assigning it a null value
    }
  }
}
origin: apache/jackrabbit

/**
 * Test the deletion of a property by assigning it a null value, saved from
 * the Session
 */
public void testRemoveStringSession() throws RepositoryException {
  String sv = null;
  property1.setValue(sv);
  superuser.save();
  try {
    node.getProperty(propertyName1);
    fail("The property should not exist anymore, as a null String has been assigned");
  } catch (PathNotFoundException e) {
    //success : the property has been deleted by assigning it a null value
  }
}
origin: apache/jackrabbit

/**
 * Test the deletion of a value in a multi-value property
 */
public void testNullMultiValue() throws RepositoryException {
  property2.setValue(new Value[]{null, sv2});
  superuser.save();
  assertEquals("Null value not removed", Arrays.asList(property2.getValues()), Arrays.asList(new Value[]{sv2}));
}
origin: apache/jackrabbit

/**
 * Test the persistence of a property modified with an multi-value Value
 * parameter and saved from the Session Requires a multi-value Value (mv2)
 */
public void testMultiValueSession() throws RepositoryException {
  property2.setValue(mv2);
  superuser.save();
  assertEquals("Node property not saved", Arrays.asList(mv2), Arrays.asList(property2.getValues()));
}
origin: com.cognifide.qa.bb/bb-aem-common

/**
 * Removes node property.
 *
 * @param nodePath     Absolute path to node.
 * @param propertyName Property name.
 * @throws RepositoryException if problem with jcr repository occurred
 */
public void removeNodeProperty(String nodePath, String propertyName) throws RepositoryException {
 LOG.debug("Removing property '{}' from node '{}'", propertyName, nodePath);
 session.refresh(true);
 session.getNode(nodePath).getProperty(propertyName).setValue((String) null);
 session.save();
}
origin: apache/jackrabbit

/**
 * Test the persistence of a property modified with a Value parameter, and
 * saved from the parent Node Requires a single-value Value (sv2)
 */
public void testValueParent() throws RepositoryException {
  property1.setValue(sv2);
  testRootNode.getSession().save();
  assertEquals("Value node property not saved", sv2, property1.getValue());
}
origin: apache/jackrabbit

/**
 * Test the persistence of a property modified with an multi-value String
 * parameter and saved from the Session Requires a multi-value String (mv)
 */
public void testMultiStringSession() throws RepositoryException {
  String[] mv = new String[]{PROP_VALUE_1, PROP_VALUE_2};
  property2.setValue(mv);
  superuser.save();
  Value[] values = property2.getValues();
  List<String> strValues = new ArrayList<String>();
  for (int i = 0; i < values.length; i++) {
    strValues.add(values[i].getString());
  }
  assertEquals("Node property not saved", Arrays.asList(mv), strValues);
}
origin: apache/jackrabbit

/**
 * Test the persistence of a property modified with a Value parameter and
 * saved from the Session Requires a single-value Value (sv2)
 */
public void testValueSession() throws RepositoryException {
  property1.setValue(sv2);
  superuser.save();
  assertEquals("Value node property not saved", sv2, property1.getValue());
}
javax.jcrPropertysetValue

Javadoc

Sets the value of this property to value. Same as #setValue(Value value) except that the value is specified as a double.

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,
  • getParent,
  • getPath,
  • getNode,
  • getLength,
  • getDouble,
  • getStream,
  • getSession

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now