public final class GenericIndexResourceType extends Object implements OnmsResourceType
Constructor and Description |
---|
GenericIndexResourceType(ResourceStorageDao resourceStorageDao,
String name,
String label,
String resourceLabelExpression,
StorageStrategy storageStrategy)
Constructor for GenericIndexResourceType.
|
Modifier and Type | Method and Description |
---|---|
protected static Map<String,GenericIndexResourceType> |
createTypes(Map<String,ResourceType> configuredResourceTypes,
ResourceStorageDao resourceStorageDao) |
OnmsResource |
getChildByName(OnmsResource parent,
String index)
Retrieves a child resource with the given name from the parent.
|
String |
getLabel()
getLabel
|
String |
getLinkForResource(OnmsResource resource)
getLinkForResource
|
String |
getName()
getName
|
OnmsResource |
getResourceByPath(ResourcePath path,
OnmsResource parent) |
List<OnmsResource> |
getResourcesForParent(OnmsResource parent)
Returns the set of resources that are available on the given
parent.
|
StorageStrategy |
getStorageStrategy()
getStorageStrategy
|
boolean |
isResourceTypeOnParent(OnmsResource parent)
Returns true if one on more instances of the resource type
are present on the parent resource.
|
String |
toString() |
public GenericIndexResourceType(ResourceStorageDao resourceStorageDao, String name, String label, String resourceLabelExpression, StorageStrategy storageStrategy)
Constructor for GenericIndexResourceType.
resourceStorageDao
- a ResourceStorageDao
object.name
- a String
object.label
- a String
object.resourceLabelExpression
- a String
object.storageStrategy
- a StorageStrategy
object.public String getName()
getName
getName
in interface OnmsResourceType
String
object.public String getLabel()
getLabel
getLabel
in interface OnmsResourceType
String
object.public StorageStrategy getStorageStrategy()
getStorageStrategy
StorageStrategy
object.public boolean isResourceTypeOnParent(OnmsResource parent)
isResourceTypeOnParent
in interface OnmsResourceType
public List<OnmsResource> getResourcesForParent(OnmsResource parent)
getResourcesForParent
in interface OnmsResourceType
public OnmsResource getChildByName(OnmsResource parent, String index)
getChildByName
in interface OnmsResourceType
public String getLinkForResource(OnmsResource resource)
getLinkForResource
getLinkForResource
in interface OnmsResourceType
resource
- a OnmsResource
object.String
object.public OnmsResource getResourceByPath(ResourcePath path, OnmsResource parent)
protected static Map<String,GenericIndexResourceType> createTypes(Map<String,ResourceType> configuredResourceTypes, ResourceStorageDao resourceStorageDao)
Copyright © 2018. All rights reserved.