Package org.saidone.restless.client
Class Properties
java.lang.Object
org.saidone.restless.client.Properties
Typed property factories shared by all write clients. Singular factories create scalars; plural factories
create explicit lists, including singleton and empty lists. Use
nullValue() to clear a scalar and
an empty plural factory to clear a list. Omit a property to preserve it on update.
The repository validates value kinds and cardinality against its dictionary; scalars and lists are never implicitly interchanged. These factories do not depend on Alfresco repository classes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.saidone.restless.api.Propertybool(boolean value) Creates a boolean scalar.static org.saidone.restless.api.PropertyCreates a list of boolean values in input order.static org.saidone.restless.api.Propertydecimal(double value) Creates a floating-point scalar.static org.saidone.restless.api.Propertydecimals(double... values) Creates a list of finite floating-point values in input order.static org.saidone.restless.api.Propertyinteger(long value) Creates a signed 64-bit integer scalar.static org.saidone.restless.api.Propertyintegers(long... values) Creates a list of signed 64-bit integers in input order.static org.saidone.restless.api.PropertyCreates a node reference scalar for dictionary validation by the repository.static org.saidone.restless.api.PropertyCreates a list of node references in input order.static org.saidone.restless.api.PropertyExplicit null for a single-valued property; list properties use an empty list instead.static org.saidone.restless.api.PropertyCreates a qualified-name scalar.static org.saidone.restless.api.PropertyCreates a list of qualified names in input order.static org.saidone.restless.api.PropertyCreates a text scalar.static org.saidone.restless.api.PropertyCreates a list of text values in input order.static org.saidone.restless.api.PropertyCreates a timestamp scalar at millisecond precision.static org.saidone.restless.api.Propertytimestamps(Instant... values) Creates a list of timestamps at millisecond precision.
-
Constructor Details
-
Properties
public Properties()
-
-
Method Details
-
text
Creates a text scalar.- Parameters:
value- text to store- Returns:
- a single-valued property
-
texts
Creates a list of text values in input order.- Parameters:
values- text values; an empty list clears the property- Returns:
- a multi-valued property
-
integer
public static org.saidone.restless.api.Property integer(long value) Creates a signed 64-bit integer scalar.- Parameters:
value- integral value- Returns:
- a single-valued property
-
integers
public static org.saidone.restless.api.Property integers(long... values) Creates a list of signed 64-bit integers in input order.- Parameters:
values- integral values; an empty list clears the property- Returns:
- a multi-valued property
-
decimal
public static org.saidone.restless.api.Property decimal(double value) Creates a floating-point scalar.- Parameters:
value- finite floating-point value- Returns:
- a single-valued property
- Throws:
IllegalArgumentException- if the value is NaN or infinite
-
decimals
public static org.saidone.restless.api.Property decimals(double... values) Creates a list of finite floating-point values in input order.- Parameters:
values- floating-point values; an empty list clears the property- Returns:
- a multi-valued property
- Throws:
IllegalArgumentException- if any value is NaN or infinite
-
bool
public static org.saidone.restless.api.Property bool(boolean value) Creates a boolean scalar.- Parameters:
value- boolean value- Returns:
- a single-valued property
-
booleans
Creates a list of boolean values in input order.- Parameters:
values- non-null boolean values; an empty list clears the property- Returns:
- a multi-valued property
-
timestamp
Creates a timestamp scalar at millisecond precision.- Parameters:
value- instant to encode as Unix epoch milliseconds- Returns:
- a single-valued property
-
timestamps
Creates a list of timestamps at millisecond precision.- Parameters:
values- instants in input order; an empty list clears the property- Returns:
- a multi-valued property
-
nodeRef
Creates a node reference scalar for dictionary validation by the repository.- Parameters:
value- Alfresco node reference- Returns:
- a single-valued property
-
nodeRefs
Creates a list of node references in input order.- Parameters:
values- Alfresco node references; an empty list clears the property- Returns:
- a multi-valued property
-
qname
Creates a qualified-name scalar.- Parameters:
value- name in prefixed or expanded QName form- Returns:
- a single-valued property
-
qnames
Creates a list of qualified names in input order.- Parameters:
values- prefixed or expanded names; an empty list clears the property- Returns:
- a multi-valued property
-
nullValue
public static org.saidone.restless.api.Property nullValue()Explicit null for a single-valued property; list properties use an empty list instead.
-