Class EditorKey
java.lang.Object
com.arubanetworks.meridian.editor.EditorKey
- All Implemented Interfaces:
Serializable
EditorKey represents a globally-unique ID to an object created in the Meridian Editor.<p>Objects created in the Editor can have multiple ID components and this class helps locate
an object based on the various components needed.</p>
<p>
Here's an example: A Meridian "Placemark" has an ID (
Placemark.key
), but it is
only unique to the parent Map containing it. The Map also has an ID, but it is only unique to the
parent App containing it. The App has its own ID, which is globally unique, and so that is the
root key with a `null` parent.
<p>
Putting it all together:
<p>
```java
String placemarkId = placemarkKey.getId();
String placemarkMapId = placemarkKey.getParent().getId();
String placemarkAppId = placemarkKey.getParent().getParent().getId();
```
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
static EditorKey
Constructs an <code>EditorKey</code> to a known Meridian App IDstatic EditorKey
Constructs an <code>EditorKey</code> to a known Meridian Map ID found in the given Meridian App ID.static EditorKey
Constructs an <code>EditorKey</code> to a known Meridian Map ID found in the given Meridian App ID.static EditorKey
forPlacemark
(String placemarkId, EditorKey mapKey) Constructs a key to a known Meridian Placemark ID found in the Meridian Map with the given key.static EditorKey
forPlacemark
(String placemarkId, String mapId, String appId) Constructs a key to a known Meridian Placemark ID found in the Meridian Map and App with the given ids.static EditorKey
static EditorKey
fromJSON
(JSONObject jsonObject) getId()
int
hashCode()
toJSON()
toString()
-
Constructor Details
-
EditorKey
Constructor for a new <code>EditorKey</code>.- Parameters:
id
- The Meridian ID of a known key, must not be <code>null</code> or empty.parent
- The known parent key for this Meridian ID, may be <code>null</code>.- Throws:
IllegalArgumentException
- if ID is invalid
-
EditorKey
Constructor for a new <code>EditorKey</code>, the parent key will be <code>null</code>.- Parameters:
id
- The Meridian ID of a known key, must not be null.- Throws:
IllegalArgumentException
- if ID is invalid
-
-
Method Details
-
getId
-
getParent
-
forApp
Constructs an <code>EditorKey</code> to a known Meridian App ID- Parameters:
appId
- The Meridian App ID for the returned key. must not be <code>null</code> or empty- Throws:
IllegalArgumentException
- if appId is invalid
-
forMap
Constructs an <code>EditorKey</code> to a known Meridian Map ID found in the given Meridian App ID.- Parameters:
mapId
- The Meridian Map ID for the returned key, must not be <code>null</code> or emptyappId
- The Meridian App ID for the returned key. must not be <code>null</code> or empty- Throws:
IllegalArgumentException
- if mapId or appId is invalid
-
forMap
Constructs an <code>EditorKey</code> to a known Meridian Map ID found in the given Meridian App ID.- Parameters:
mapId
- The Meridian Map ID for the returned key, must not be <code>null</code> or emptyappKey
- The Meridian App Key for the returned key. must not be <code>null</code> or empty- Throws:
IllegalArgumentException
- if mapId or appKey is invalid
-
forPlacemark
Constructs a key to a known Meridian Placemark ID found in the Meridian Map with the given key.- Parameters:
placemarkId
- A known Meridian Placemark ID, must not be <code>null</code> or emptymapKey
- A known Meridian Map key, must not be <code>null</code> or empty- Throws:
IllegalArgumentException
- if mapKey or placemarkId is invalid
-
forPlacemark
Constructs a key to a known Meridian Placemark ID found in the Meridian Map and App with the given ids.- Parameters:
placemarkId
- A known Meridian Placemark ID, must not be <code>null</code> or emptymapId
- A known Meridian Map id, must not be <code>null</code> or emptyappId
- A known Meridian App id, must not be <code>null</code> or empty- Throws:
IllegalArgumentException
- if mapId or appId or placemarkId is invalid
-
equals
-
toString
-
toJSON
-
fromJSON
-
fromJSON
-
hashCode
public int hashCode()
-