com.yworks.yfiles.server.graphml.flexio
Class SymbolicPackageNameRegistry

java.lang.Object
  extended bycom.yworks.yfiles.server.graphml.flexio.SymbolicPackageNameRegistry

public class SymbolicPackageNameRegistry
extends java.lang.Object

This registry can be used to map packages to symbolic package names. Objects that want to make use of the ReflectionBasesSerializer or ReflectionBasedDeserializer have to register their package with a symbolic package name these (de)serializer use.


Method Summary
static boolean add(java.lang.String packageName, java.lang.String symbolicPackageName)
          Adds a mapping between the package name and a symbolic package name.
static boolean containsPackageName(java.lang.String packageName)
          Returns if the given package name is mapped to any symbolic package name.
static boolean containsSymbolicPackageName(java.lang.String symbolicPackageName)
          Returns if any package in the registry is mapped to this symbolic package name.
static java.lang.String getPackageName(java.lang.String symbolicPackageName)
          Deprecated. replaced by getPackageNames(String)()
static java.util.Collection getPackageNames(java.lang.String symbolicPackageName)
          Returns the package names that the given symbolic name is mapped to.
static java.lang.String getSymbolicPackageName(java.lang.String packageName)
          Returns the symbolic package name for the given package name.
static boolean remove(java.lang.String packageName)
          Removes the mapping between the given package name and it's symbolic package name from the registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public static boolean add(java.lang.String packageName,
                          java.lang.String symbolicPackageName)
Adds a mapping between the package name and a symbolic package name. If there already exists a mapping for the given package name, the existing mapping will not be replaced, and this method will return false.

Parameters:
packageName - The name of the package to set a symbolic name for.
symbolicPackageName - The symbolic name used for this packageW
Returns:
If the mapping was added to the registry or not.

remove

public static boolean remove(java.lang.String packageName)
Removes the mapping between the given package name and it's symbolic package name from the registry.

Parameters:
packageName - The package name to remove the mapping.
Returns:
false, if there is no such package name in the registry, true otherwise.

containsSymbolicPackageName

public static boolean containsSymbolicPackageName(java.lang.String symbolicPackageName)
Returns if any package in the registry is mapped to this symbolic package name.

Parameters:
symbolicPackageName - The symbolic package name to find a package mapping for.
Returns:
if any package in the registry is mapped to this symbolic package name.

getSymbolicPackageName

public static java.lang.String getSymbolicPackageName(java.lang.String packageName)
Returns the symbolic package name for the given package name.

Parameters:
packageName - The package name for which the symbolic package name shall be looked up.
Returns:
The symbolic package name mapped to this package name.

containsPackageName

public static boolean containsPackageName(java.lang.String packageName)
Returns if the given package name is mapped to any symbolic package name.

Parameters:
packageName - The package name to check for a mapping
Returns:
if there exists a mapping for the given package name

getPackageName

public static java.lang.String getPackageName(java.lang.String symbolicPackageName)
Deprecated. replaced by getPackageNames(String)()

As a symbolic package name can be mapped to multiple package names, this method is now deprecated. Use getPackageNames(String) instead.

Parameters:
symbolicPackageName - The symbolic package name for which the package name shall be looked up.
Returns:
The package name the given symbolic package name is mapped to.

getPackageNames

public static java.util.Collection getPackageNames(java.lang.String symbolicPackageName)
Returns the package names that the given symbolic name is mapped to.

Parameters:
symbolicPackageName - The symbolic package name for which the package name shall be looked up.
Returns:
The package names the given symbolic package name is mapped to.


Copyright © 2000-2013 yWorks GmbH. All rights reserved