org.opennms.web.map.view
Class VMap

java.lang.Object
  extended by org.opennms.web.map.db.Map
      extended by org.opennms.web.map.view.VMap

public final class VMap
extends Map

Author:
micmas TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Field Summary
static String DEFAULT_NAME
           
 
Fields inherited from class org.opennms.web.map.db.Map
ACCESS_MODE_ADMIN, ACCESS_MODE_GROUP, ACCESS_MODE_USER, AUTOMATICALLY_GENERATED_MAP, DELETED_MAP, USER_GENERATED_MAP
 
Constructor Summary
VMap()
          Create a new VMap with empty name.
VMap(int id, String name, String background, String owner, String accessMode, String userLastModifies, float scale, int offsetX, int offsetY, String type, int width, int height)
           
VMap(Map map)
          Copy constructor: create a VMap with all properties and elements of the input VMap without time informations (create time, lastmodifiedtime) and id that will be automatically setted.
VMap(VMap map)
          Copy constructor: create a VMap with all properties and elements of the input VMap without time informations (create time, lastmodifiedtime) and id that will be automatically setted.
 
Method Summary
 void addElement(VElement ve)
           
 void addElements(List<VElement> elems)
           
 void addElements(VElement[] ve)
           
 void addLink(VLink link)
           
 void addLinks(List<VLink> elems)
           
 void addLinks(VLink[] vl)
           
 boolean containsElement(int id, String type)
           
 boolean containsLink(VLink link)
           
 VElement[] getAllElements()
           
 VLink[] getAllLinks()
           
 VElement[] getCloneAllElements()
           
 VElement getElement(int id, String type)
           
 VLink[] getLinksOnElement(int id, String type)
           
 boolean isNew()
           
 int linksize()
           
 void removeAllElements()
           
 void removeAllLinks()
           
 VElement removeElement(int id, String type)
           
 void removeElements(int[] ids, String type)
           
 VLink removeLink(VLink link)
           
 VLink[] removeLinksOnElement(int id, String type)
           
 List<VLink> removeLinksOnElementList(int id, String type)
           
 void setAccessMode(String accessMode)
           
 void setBackground(String background)
           
 void setCreateTime(Timestamp createTime)
           
 void setHeight(int height)
           
 void setId(int id)
           
 void setLastModifiedTime(Timestamp lastModifiedTime)
           
 void setName(String name)
           
 void setOffsetX(int offsetX)
           
 void setOffsetY(int offsetY)
           
 void setOwner(String owner)
           
 void setScale(float scale)
           
 void setType(String type)
           
 void setUserLastModifies(String userLastModifies)
           
 void setWidth(int width)
           
 int size()
           
 
Methods inherited from class org.opennms.web.map.db.Map
getAccessMode, getBackground, getCreateTime, getGroup, getHeight, getId, getLastModifiedTime, getName, getOffsetX, getOffsetY, getOwner, getScale, getType, getUserLastModifies, getWidth, setAsNew, setGroup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NAME

public static final String DEFAULT_NAME
See Also:
Constant Field Values
Constructor Detail

VMap

public VMap()
Create a new VMap with empty name.


VMap

public VMap(VMap map)
Copy constructor: create a VMap with all properties and elements of the input VMap without time informations (create time, lastmodifiedtime) and id that will be automatically setted.

Parameters:
map -

VMap

public VMap(Map map)
Copy constructor: create a VMap with all properties and elements of the input VMap without time informations (create time, lastmodifiedtime) and id that will be automatically setted.

Parameters:
map -

VMap

public VMap(int id,
            String name,
            String background,
            String owner,
            String accessMode,
            String userLastModifies,
            float scale,
            int offsetX,
            int offsetY,
            String type,
            int width,
            int height)
Parameters:
id -
name -
background -
owner -
accessMode -
userLastModifies -
scale -
offsetX -
offsetY -
type -
Method Detail

setId

public void setId(int id)
Overrides:
setId in class Map

addElement

public void addElement(VElement ve)

addElements

public void addElements(VElement[] ve)

addElements

public void addElements(List<VElement> elems)

addLink

public void addLink(VLink link)

addLinks

public void addLinks(VLink[] vl)

addLinks

public void addLinks(List<VLink> elems)

removeElement

public VElement removeElement(int id,
                              String type)

removeLink

public VLink removeLink(VLink link)

removeLinksOnElement

public VLink[] removeLinksOnElement(int id,
                                    String type)

getLinksOnElement

public VLink[] getLinksOnElement(int id,
                                 String type)

removeLinksOnElementList

public List<VLink> removeLinksOnElementList(int id,
                                            String type)

removeElements

public void removeElements(int[] ids,
                           String type)

getElement

public VElement getElement(int id,
                           String type)

getAllElements

public VElement[] getAllElements()

getAllLinks

public VLink[] getAllLinks()

getCloneAllElements

public VElement[] getCloneAllElements()

removeAllElements

public void removeAllElements()

removeAllLinks

public void removeAllLinks()

size

public int size()

linksize

public int linksize()

containsElement

public boolean containsElement(int id,
                               String type)

containsLink

public boolean containsLink(VLink link)

setAccessMode

public void setAccessMode(String accessMode)
Overrides:
setAccessMode in class Map
Parameters:
accessMode - The accessMode to set.

setBackground

public void setBackground(String background)
Overrides:
setBackground in class Map
Parameters:
background - The background to set.

setCreateTime

public void setCreateTime(Timestamp createTime)
Overrides:
setCreateTime in class Map
Parameters:
createTime - The createTime to set.

setLastModifiedTime

public void setLastModifiedTime(Timestamp lastModifiedTime)
Overrides:
setLastModifiedTime in class Map
Parameters:
lastModifiedTime - The lastModifiedTime to set.

setName

public void setName(String name)
Overrides:
setName in class Map
Parameters:
name - The name to set.

setOffsetX

public void setOffsetX(int offsetX)
Overrides:
setOffsetX in class Map
Parameters:
offsetX - The offsetX to set.

setOffsetY

public void setOffsetY(int offsetY)
Overrides:
setOffsetY in class Map
Parameters:
offsetY - The offsetY to set.

setOwner

public void setOwner(String owner)
Overrides:
setOwner in class Map
Parameters:
owner - The owner to set.

setScale

public void setScale(float scale)
Overrides:
setScale in class Map
Parameters:
scale - The scale to set.

setType

public void setType(String type)
Overrides:
setType in class Map
Parameters:
type - The type to set.

setWidth

public void setWidth(int width)
Overrides:
setWidth in class Map

setHeight

public void setHeight(int height)
Overrides:
setHeight in class Map

setUserLastModifies

public void setUserLastModifies(String userLastModifies)
Overrides:
setUserLastModifies in class Map
Parameters:
userLastModifies - The userLastModifies to set.

isNew

public boolean isNew()
Overrides:
isNew in class Map


Copyright © 2009. All Rights Reserved.