com.kuka.nav.fleet.graph.properties
Class Restriction

java.lang.Object
  extended by com.kuka.nav.fleet.graph.properties.AbstractProperty
      extended by com.kuka.nav.fleet.graph.properties.Restriction
All Implemented Interfaces:
Property, Serializable

public final class Restriction
extends AbstractProperty

Component property to form the robot type permission system. The restriction is always set for all robots and if present, forbids all robots except those with permissions.

See Also:
Serialized Form

Constructor Summary
Restriction()
          Instantiates a new restriction property.
 
Method Summary
 String getValueToDisplay()
          Returns the value(s) in a way to show it in a UI.
static boolean isAllowed(PropertyHolder propHolder, Integer robotTypeId)
          Tests whether a robot type has permission to use an edge or node.
static boolean isRestricted(PropertyHolder propHolder, Integer robotTypeId)
          Tests whether a robot type is not allowed to use an edge or node.
static Restriction parse(String s)
          Used to deserialize this property from a string.
static void restrict(PropertyHolder propHolder, Integer robotTypeId)
          Prevents any robot of the given robot type to move on the edge or node to which the given PropertyHolder belongs.
 String toString()
           
 
Methods inherited from class com.kuka.nav.fleet.graph.properties.AbstractProperty
equals, fireChanged, getAllowedTypes, getId, hashCode, setId, tryGetParamFromString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Restriction

public Restriction()
Instantiates a new restriction property.

Method Detail

toString

public String toString()
Overrides:
toString in class Object

isRestricted

public static boolean isRestricted(PropertyHolder propHolder,
                                   Integer robotTypeId)
Tests whether a robot type is not allowed to use an edge or node. Per default, every robot type has permission.

Parameters:
propHolder - a property holder
robotTypeId - a robot type
Returns:
true if the robot type has no permission for the given edge or node

isAllowed

public static boolean isAllowed(PropertyHolder propHolder,
                                Integer robotTypeId)
Tests whether a robot type has permission to use an edge or node. Per default, every robot type has permission.

Parameters:
propHolder - a property holder
robotTypeId - a robot type
Returns:
true if the robot type has permission for the given edge or node

restrict

public static void restrict(PropertyHolder propHolder,
                            Integer robotTypeId)
Prevents any robot of the given robot type to move on the edge or node to which the given PropertyHolder belongs.

Parameters:
propHolder - the property holder of the edge or node
robotTypeId - the id of the robot type

parse

public static Restriction parse(String s)
Used to deserialize this property from a string.

Parameters:
s - a string
Returns:
an object with values derived from the string

getValueToDisplay

public String getValueToDisplay()
Description copied from interface: Property
Returns the value(s) in a way to show it in a UI.

Returns:
the values


Copyright © 2019. All rights reserved.