Class NativeEntityPropertiesClient
java.lang.Object
com.codebarrel.jira.entityproperties.NativeEntityPropertiesClient
- All Implemented Interfaces:
EntityPropertiesClient
-
Constructor Summary
ConstructorsConstructorDescriptionNativeEntityPropertiesClient(EntityPropertyServiceCompatibilityFactory entityPropertyServiceCompatibilityFactory, UserPropertyManager userPropertyManager, ApplicationUser currentUser) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteProperty(Entity entity, String propertyKey) Deletes the property for a given key and entity<T> TgetProperty(Class<T> clazz, Entity entity, String propertyKey) Retrieves a value object of type T for the given entity and property key.getPropertyKeys(Entity entity) Retrieves a set of all property keys for the given entity.booleansetProperty(Entity entity, String propertyKey, Object value) Sets a new property value (serializing the object to JSON first).
-
Constructor Details
-
NativeEntityPropertiesClient
public NativeEntityPropertiesClient(EntityPropertyServiceCompatibilityFactory entityPropertyServiceCompatibilityFactory, UserPropertyManager userPropertyManager, ApplicationUser currentUser)
-
-
Method Details
-
getPropertyKeys
Description copied from interface:EntityPropertiesClientRetrieves a set of all property keys for the given entity.Note: for users, the entity key is the user key (not username)
- Specified by:
getPropertyKeysin interfaceEntityPropertiesClient- Parameters:
entity- The entity to look up properties for- Returns:
- A set of all keys for the given entity
-
deleteProperty
Description copied from interface:EntityPropertiesClientDeletes the property for a given key and entityNote: for users, the entity key is the user key (not username)
- Specified by:
deletePropertyin interfaceEntityPropertiesClient- Parameters:
entity- The entity for which the property will be deletedpropertyKey- The property to delete
-
setProperty
Description copied from interface:EntityPropertiesClientSets a new property value (serializing the object to JSON first). The value object needs to be annotated correctly with Jackson to serialize it.Note: for users, the entity key is the user key (not username)
- Specified by:
setPropertyin interfaceEntityPropertiesClient- Parameters:
entity- The entity for which the property will be storedpropertyKey- The property key under which the property will be storedvalue- The value object to store as JSON.
-
getProperty
Description copied from interface:EntityPropertiesClientRetrieves a value object of type T for the given entity and property key.Note: for users, the entity key is the user key (not username)
- Specified by:
getPropertyin interfaceEntityPropertiesClient- Parameters:
clazz- The type of property to retrieveentity- The entity for which the property will be retrievedpropertyKey- The property key to look up.- Returns:
- The deserialized value object
-