public class Descriptor extends DynamicAttributesDescriptor
Modifier and Type | Field and Description |
---|---|
static String |
DESCRIPTION_CHANGED |
static String |
DESCRIPTOR_CHANGED
Notification String for a general descriptor change.
|
String |
docType |
static String |
LARGE_ICON_CHANGED |
static String |
NAME_CHANGED |
static String |
SMALL_ICON_CHANGED |
Modifier | Constructor and Description |
---|---|
|
Descriptor()
The default constructor.
|
protected |
Descriptor(Descriptor other)
The copy constructor.
|
|
Descriptor(String name,
String description)
Constructs a descriptor with given
name, description.
|
Modifier and Type | Method and Description |
---|---|
<T extends Descriptor> |
addDescriptorExtension(T dde)
Add a child descriptor to the parent descriptor as an extension.
|
void |
addPrefixMapping(String mapping,
String uri)
add a prefix mapping
|
static String |
createUniqueFilenameAmongst(String trialName,
Vector<String> otherNames)
Returns String based on the trial name that is guaramteed to be different
from any of the strings in the vector of String names.
|
static String |
createUniqueNameAmongst(String trialName,
Vector<String> otherNames)
Returns String based on the trial name that is guaramteed to be different
from any of the strings in the vector of String names.
|
static String |
createUniqueNameAmongstNamedDescriptors(String trialName,
Set<? extends Descriptor> descriptors)
Returns String based on the trial name that is guaramteed to be different
from any of the strings returnsed by the getName() call in any of the Descriptor objects in the Set supplied.
|
void |
fillDocType(InputStream in) |
Iterator |
getDeploymentExtensions() |
String |
getDescription()
The description text of this descriptor as a String.
|
<T extends Descriptor> |
getDescriptorExtension(Class<T> c)
Get child descriptor extension for a given type.
|
<T extends Descriptor> |
getDescriptorExtensions(Class<T> c)
Get all child descriptor extensions for a given type.
|
String |
getDisplayName() |
String |
getDocType() |
String |
getLargeIconUri()
The large icon name of this descriptor as a String.
|
String |
getLocalizedDescription(String lang) |
Map<? extends String,? extends String> |
getLocalizedDescriptions() |
String |
getLocalizedDisplayName(String language) |
Map<? extends String,? extends String> |
getLocalizedDisplayNames() |
String |
getLocalizedLargeIconUri(String lang) |
Map |
getLocalizedLargeIconUris() |
String |
getLocalizedSmallIconUri(String lang) |
Map<? extends String,? extends String> |
getLocalizedSmallIconUris() |
String |
getName()
The name of this descriptor as a String.
|
Map<String,String> |
getPrefixMapping() |
String |
getSmallIconUri()
The small icon name of this descriptor as a String.
|
static boolean |
isBoundsChecking()
Answers whether the object model is bounds checking.
|
void |
print(StringBuilder sb)
A String representation of this object.
|
static void |
setBoundsChecking(boolean b)
Sets a global flag to enable or disable boudsn checking
of deployment information
|
void |
setDescription(String description)
Sets the description text of this descriptor.
|
void |
setDisplayName(String name)
sets the display name for this bundle
|
void |
setLargeIconUri(String largeIconUri)
Sets the large icon name of this descriptor as a String.
|
void |
setLocalizedDescription(String lang,
String description)
Add a localized description for this descriptor
|
void |
setLocalizedDisplayName(String lang,
String displayName)
Add a localized display name for this descriptor
|
void |
setLocalizedLargeIconUri(String lang,
String uri)
Sets the large icon uri for a particular language
|
void |
setLocalizedSmallIconUri(String lang,
String uri)
set the localized small icon uri for the passed language
|
void |
setName(String name)
Sets the name of this descriptor.
|
void |
setSmallIconUri(String smallIconUri)
Sets the small icon name of this descriptor as a String.
|
void |
visit(DescriptorVisitor aVisitor)
Visitor API implementation, all descriptors must be visitable
|
addExtraAttribute, getExtraAttribute, getExtraAttributes, removeExtraAttribute, toString
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
public static final String DESCRIPTOR_CHANGED
public static final String NAME_CHANGED
public static final String DESCRIPTION_CHANGED
public static final String LARGE_ICON_CHANGED
public static final String SMALL_ICON_CHANGED
public String docType
public Descriptor()
protected Descriptor(Descriptor other)
other
- the source descriptorpublic <T extends Descriptor> void addDescriptorExtension(T dde)
dde
- the child descriptorpublic <T extends Descriptor> List<T> getDescriptorExtensions(Class<T> c)
c
- the child descriptor typepublic <T extends Descriptor> T getDescriptorExtension(Class<T> c)
c
- the child descriptor typepublic static void setBoundsChecking(boolean b)
b
- true for bounds checking on, false else.public static boolean isBoundsChecking()
public void setName(String name)
name
- the new name of the descriptor.public String getName()
public void setLocalizedDisplayName(String lang, String displayName)
lang
- the local identifier (null if using default locale)displayName
- the localized stringpublic String getLocalizedDisplayName(String language)
language
- the languagepublic Map<? extends String,? extends String> getLocalizedDisplayNames()
public void setDisplayName(String name)
name
- the display namepublic String getDisplayName()
public void setDescription(String description)
description
- the new description text of the descriptor.public String getDescription()
public void setLocalizedDescription(String lang, String description)
lang
- the local identifier (null if using default locale)description
- the localized stringpublic String getLocalizedDescription(String lang)
lang
- the local languagepublic Map<? extends String,? extends String> getLocalizedDescriptions()
public void setLocalizedLargeIconUri(String lang, String uri)
lang
- the language identifieruri
- the large icon uripublic String getLocalizedLargeIconUri(String lang)
lang
- the language or null for the current localepublic Map getLocalizedLargeIconUris()
public void setLocalizedSmallIconUri(String lang, String uri)
lang
- the languageuri
- the uri for the small iconpublic String getLocalizedSmallIconUri(String lang)
lang
- the languagepublic Map<? extends String,? extends String> getLocalizedSmallIconUris()
public String getLargeIconUri()
public void setLargeIconUri(String largeIconUri)
largeIconUri
- the large icon name of this descriptorpublic String getSmallIconUri()
public void setSmallIconUri(String smallIconUri)
smallIconUri
- the small icon name of this descriptorpublic static String createUniqueFilenameAmongst(String trialName, Vector<String> otherNames)
trialName
- the suggested nameotherNames
- The Vector of String objects none of which will be the same as the returnpublic static String createUniqueNameAmongst(String trialName, Vector<String> otherNames)
trialName
- the suggested nameotherNames
- The Vector of String objects none of which will be the same as the returnpublic static String createUniqueNameAmongstNamedDescriptors(String trialName, Set<? extends Descriptor> descriptors)
trialName
- the suggested namedescriptors
- The Set of Descriptor objects to whose name attribute will not be the same as the returnpublic Iterator getDeploymentExtensions()
public void addPrefixMapping(String mapping, String uri)
mapping
- the mappinguri
- the uripublic Map<String,String> getPrefixMapping()
public void print(StringBuilder sb)
print
in class DynamicAttributesDescriptor
public void visit(DescriptorVisitor aVisitor)
aVisitor
- the visitor implementationpublic String getDocType()
public void fillDocType(InputStream in)
Copyright © 2019. All rights reserved.