Class BaseOpenProjectObject
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
com.xwiki.projectmanagement.openproject.model.BaseOpenProjectObject
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
- Direct Known Subclasses:
ColoredOpenProjectObject,Project,User,WorkPackage
Describes the base object for Open Project objects.
- Since:
- 1.0
- Version:
- $Id$
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.BaseOpenProjectObject(com.fasterxml.jackson.databind.JsonNode jsonNode) Create a BaseOpenProjectObject from a JsonNode. -
Method Summary
Modifier and TypeMethodDescriptiongetId()getName()getSelf()Gets the reference to itself, including their value and reference link.voidinitializeSelfWithPath(String connectionUrl, String resourcePath) Initializes the self link of the object from a connection URL and a resource path.voidvoidsetId(int id) voidvoidSets the reference to itself, including their value and reference link.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Field Details
-
KEY_ID
The key identifying the id property of the open project object.- See Also:
-
KEY_NAME
The key identifying the name property of the open project object.- See Also:
-
-
Constructor Details
-
BaseOpenProjectObject
public BaseOpenProjectObject()Default constructor. -
BaseOpenProjectObject
public BaseOpenProjectObject(com.fasterxml.jackson.databind.JsonNode jsonNode) Create a BaseOpenProjectObject from a JsonNode.- Parameters:
jsonNode- the JsonNode containing the base open project object information.
-
-
Method Details
-
getId
- Returns:
- the id of the work item project.
-
setId
public void setId(int id) - Parameters:
id- seegetId().
-
getName
- Returns:
- the name of the work item project.
-
setName
- Parameters:
name- seegetName().
-
getSelf
Gets the reference to itself, including their value and reference link.- Returns:
- the assignee as a
Linkable
-
setSelf
Sets the reference to itself, including their value and reference link.- Parameters:
self- the self to set as aLinkable
-
getMapEntries
- Returns:
- the map.
-
putEntry
- Parameters:
key- the key.value- the value.
-
initializeSelfWithPath
Initializes the self link of the object from a connection URL and a resource path.- Parameters:
connectionUrl- the connection URL to the Open Project instance.resourcePath- the resource path of the resource.- Since:
- 1.1
-