org.xwiki.gwt.wysiwyg.client.plugin.link
Enum LinkConfig.LinkType

java.lang.Object
  extended by java.lang.Enum<LinkConfig.LinkType>
      extended by org.xwiki.gwt.wysiwyg.client.plugin.link.LinkConfig.LinkType
All Implemented Interfaces:
Serializable, Comparable<LinkConfig.LinkType>
Enclosing class:
LinkConfig

public static enum LinkConfig.LinkType
extends Enum<LinkConfig.LinkType>

Link types.


Enum Constant Summary
ATTACHMENT
          Link targeting an attached file.
EMAIL
          External link to an email address.
EXTERNAL
          External link (default for any unrecognized link).
NEW_WIKIPAGE
          Internal link targeting a new page.
WIKIPAGE
          Internal link targeting an existent page.
 
Method Summary
static LinkConfig.LinkType getByClassName(String className)
           
 String getClassName()
           
static LinkConfig.LinkType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LinkConfig.LinkType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

EXTERNAL

public static final LinkConfig.LinkType EXTERNAL
External link (default for any unrecognized link).


NEW_WIKIPAGE

public static final LinkConfig.LinkType NEW_WIKIPAGE
Internal link targeting a new page.


WIKIPAGE

public static final LinkConfig.LinkType WIKIPAGE
Internal link targeting an existent page.


ATTACHMENT

public static final LinkConfig.LinkType ATTACHMENT
Link targeting an attached file.


EMAIL

public static final LinkConfig.LinkType EMAIL
External link to an email address. Currently it doesn't have a dedicated CSS class name.

Method Detail

values

public static LinkConfig.LinkType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (LinkConfig.LinkType c : LinkConfig.LinkType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static LinkConfig.LinkType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getClassName

public String getClassName()
Returns:
the CSS class name associated with this link type

getByClassName

public static LinkConfig.LinkType getByClassName(String className)
Parameters:
className - a CSS class name used to mark a specific type of link
Returns:
the LinkConfig.LinkType corresponding to the given class name, null if none of the link types match the given class name


Copyright © 2004–2015 XWiki. All rights reserved.