public interface ExternalPropertiesAPI
Modifier and Type | Method and Description |
---|---|
void |
declareExternalPropertyName(Property property)
Creates a new external property name.
|
void |
deletePropertyEntirely(String propertyName)
Delete ALL VALUES of this property for EVERY REQUIREMENT
and also delete the property name's metadata.
|
void |
setExternalProperty(RequirementKey key,
Property property)
Set an external property for a given requirement.
|
int |
setExternalPropertyBulk(List<Requirement> requirements,
Property property)
Set an external property for many requirements at a time.
|
int |
setExternalPropertyBulk(long pageId,
Property property)
Set an external property for all the requirements of a page.
|
void setExternalProperty(@Nonnull RequirementKey key, @Nonnull Property property) throws com.playsql.requirementyogi.exceptions.RequirementNotFoundException, com.playsql.requirementyogi.exceptions.UndeclaredExternalPropertyException
null
to delete the value for this requirement.
- The 'indexation'
For example, an int can be "bold" in the value, and simple in the 'indexation'.
This method is not optimized for repetitive calls.key
- the key of the requirement. You can use RequirementKeyBean for example.property
- the property. See above for its format.com.playsql.requirementyogi.exceptions.RequirementNotFoundException
- if the requirement wasn't found.com.playsql.requirementyogi.exceptions.UndeclaredExternalPropertyException
- if the external property wasn't declared beforehand,
even if you are just trying to remove the value.IllegalArgumentException
- if the property's type is not EXTERNALvoid declareExternalPropertyName(@Nonnull Property property)
property
- the property name and its type. We don't use the other values.void deletePropertyEntirely(@Nonnull String propertyName)
propertyName
- the name of the property to deleteint setExternalPropertyBulk(long pageId, @Nonnull Property property) throws com.playsql.requirementyogi.exceptions.UndeclaredExternalPropertyException
pageId
- the page id. If invalid, the operation is a no-op.property
- the property to add. It must already have been declared. If you want to remove all values,
set property.value = null.com.playsql.requirementyogi.exceptions.UndeclaredExternalPropertyException
- if the property hasn't been declared yet.int setExternalPropertyBulk(@Nonnull List<Requirement> requirements, @Nonnull Property property) throws com.playsql.requirementyogi.exceptions.UndeclaredExternalPropertyException
requirements
- the list of requirements. If empty, the operation is a no-op. Cannot be null.
If some requirements cannot be found, their property will not be set.property
- the property to add. It must already have been declared. If you want to remove all values,
set property.value = null.com.playsql.requirementyogi.exceptions.UndeclaredExternalPropertyException
- if the property hasn't been declared yet.Copyright © 2022 Requirement Yogi. All rights reserved.