/** * @return the display name */ public String getDisplayName() { return super.getName(); }
/** * add a prefix mapping * @param mapping the mapping * @param uri the uri */ public void addPrefixMapping(String mapping, String uri) { Map<String, String> prefixMapping = getPrefixMapping(); if (prefixMapping == null) { prefixMapping = new java.util.HashMap<String, String>(); addExtraAttribute("prefix-mapping", prefixMapping); } prefixMapping.put(mapping, uri); }
/** * 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. * * @param trialName the suggested name * @param descriptors The Set of Descriptor objects to whose name attribute will not be the same as the return * @return the unique String */ public static String createUniqueNameAmongstNamedDescriptors(String trialName, Set<? extends Descriptor> descriptors) { Vector<String> v = new Vector<String>(); for (Descriptor next : descriptors) { v.addElement(next.getName()); } return createUniqueNameAmongst(trialName, v); }
/** * Add a new deployment-extension for this descriptor * * @param de descriptor to add */ @SuppressWarnings("unchecked") public void addDeploymentExtension(DeploymentExtensionDescriptor de) { Vector<DeploymentExtensionDescriptor> extensions = (Vector<DeploymentExtensionDescriptor>) getExtraAttribute("deployment-extension"); if (extensions == null) { extensions = new Vector<DeploymentExtensionDescriptor>(); addExtraAttribute("deployment-extension", extensions); } extensions.add(de); }
displayLocalizedMap(sb, displayNames); displayLocalizedMap(sb, descriptions); displayLocalizedMap(sb, smallIcons); displayLocalizedMap(sb, largeIcons); Map<String, String> prefix = getPrefixMapping(); if (prefix != null) sb.append("\n Prefix Mapping = ").append(prefix); Iterator itr = getDeploymentExtensions(); if (itr != null && itr.hasNext()) { do { sb.append("\n Deployment Extension : "); ((Descriptor) (itr.next())).print(sb); } while (itr.hasNext());
/** * Returns a formatted version of me as a String. */ public void print(StringBuffer toStringBuffer) { toStringBuffer.append("Field: ").append(super.getName()).append("@").append(super.getDescription()); }
/** * @return the map of prefix to namepace uri */ @SuppressWarnings("unchecked") public Map<String, String> getPrefixMapping() { return (Map<String, String>) getExtraAttribute("prefix-mapping"); }
/** * Get the description * @return description. */ public String getDescription(){ return super.getDescription(); }
/** * The description text of this descriptor as a String. * * @return the description text of this descriptor */ public String getDescription() { return getLocalizedDescription(null); }
/** * notify of a new prefix mapping used in this document */ public void addPrefixMapping(String prefix, String uri) { Object o = getDescriptor(); if (o instanceof Descriptor) { Descriptor descriptor = (Descriptor) o; descriptor.addPrefixMapping(prefix, uri); } }
/** * @returns an entry name unique amongst names in this archive based on the triel name. */ protected String getUniqueEntryFilenameFor(Archive archive, String trialName) throws IOException { Vector entriesNames = new Vector(); Enumeration e = archive.entries(); while (e != null && e.hasMoreElements()) { entriesNames.add(e.nextElement()); } return Descriptor.createUniqueFilenameAmongst(trialName, entriesNames); }
/** * write the deployment extension nodes associated with this node * * @param parentNode parent node for the DOM tree * @param descriptor the deployment extension descriptor * * @note this was an iterim feature of the J2EE 1.4 platform, I leave it * here for now because it may reappear in a later platform release, I put * it private so that it is not misused in the meantime. */ private void writeDeploymentExtensionDescriptor( Node parentNode, Descriptor descriptor) { Iterator itr = descriptor.getDeploymentExtensions(); if (itr==null) { return; } DeploymentExtensionNode subNode = new DeploymentExtensionNode(); subNode.writeDescriptor(parentNode, itr); }
/** ** Returns a String representation of this environment property. */ public void print(StringBuffer toStringBuffer) { toStringBuffer.append("Env-Prop: ").append(super.getName()).append("@"); printInjectableResourceInfo(toStringBuffer); toStringBuffer.append("@").append(this.getType()).append("@").append(this.getValue()).append("@").append("@").append(super.getDescription()); }
/** * @return an iterator on the deployment-extension */ public Iterator getDeploymentExtensions() { Vector extensions = (Vector) getExtraAttribute("deployment-extension"); if (extensions != null) { return extensions.iterator(); } return null; }
/** * Returns a formatted String of my state. */ public void print(StringBuffer toStringBuffer) { toStringBuffer.append("UserDataConstraint "); toStringBuffer.append(" description ").append(super.getDescription()); toStringBuffer.append(" transportGuarantee ").append(getTransportGuarantee()); } }
/** * @return the display name */ public String getDisplayName() { return getName(); }
/** * get display name. */ public String getDisplayName() { // bug#4745178 other code requires the // display name to be localized. return super.getName(); }
/** * Generate the name of an environment dependency in the java: * namespace. This is the lookup string used by a component to access * the dependency. */ private String descriptorToLogicalJndiName(Descriptor descriptor) { // If no java: prefix is specified, default to component scope. String rawName = descriptor.getName(); return (rawName.startsWith(JAVA_COLON)) ? rawName : JAVA_COMP_ENV_STRING + rawName; }
/** * Returns true if I have an ejb descriptor by that name. */ public boolean hasEjbByName(String name) { for (Iterator itr = this.getEjbs().iterator(); itr.hasNext();) { Descriptor next = (Descriptor) itr.next(); if (next.getName().equals(name)) { return true; } } return false; }