Methods Summary |
---|
public static void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
|
public int | addElementProperty(ElementProperty value)
return addElementProperty(value, true);
|
public int | addElementProperty(ElementProperty value, boolean overwrite)
ElementProperty old = getElementPropertyByName(value.getName());
if(old != null) {
throw new ConfigException(StringManager.getManager(MailResource.class).getString("cannotAddDuplicate", "ElementProperty"));
}
return this.addValue(ELEMENT_PROPERTY, value, overwrite);
|
public void | dump(java.lang.StringBuffer str, java.lang.String indent)
String s;
Object o;
org.netbeans.modules.schema2beans.BaseBean n;
str.append(indent);
str.append("Description"); // NOI18N
str.append(indent+"\t"); // NOI18N
str.append("<"); // NOI18N
o = this.getDescription();
str.append((o==null?"null":o.toString().trim())); // NOI18N
str.append(">\n"); // NOI18N
this.dumpAttributes(DESCRIPTION, 0, str, indent);
str.append(indent);
str.append("ElementProperty["+this.sizeElementProperty()+"]"); // NOI18N
for(int i=0; i<this.sizeElementProperty(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getElementProperty(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(ELEMENT_PROPERTY, i, str, indent);
}
|
public java.lang.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("MailResource\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
|
public static java.lang.String | getDefaultAttributeValue(java.lang.String attr)
if(attr == null) return null;
attr = attr.trim();
if(attr.equals(ServerTags.STORE_PROTOCOL)) return "imap".trim();
if(attr.equals(ServerTags.STORE_PROTOCOL_CLASS)) return "com.sun.mail.imap.IMAPStore".trim();
if(attr.equals(ServerTags.TRANSPORT_PROTOCOL)) return "smtp".trim();
if(attr.equals(ServerTags.TRANSPORT_PROTOCOL_CLASS)) return "com.sun.mail.smtp.SMTPTransport".trim();
if(attr.equals(ServerTags.DEBUG)) return "false".trim();
if(attr.equals(ServerTags.OBJECT_TYPE)) return "user".trim();
if(attr.equals(ServerTags.ENABLED)) return "true".trim();
return null;
|
public static java.lang.String | getDefaultDebug()Get the default value of Debug from dtd
return "false".trim();
|
public static java.lang.String | getDefaultEnabled()Get the default value of Enabled from dtd
return "true".trim();
|
public static java.lang.String | getDefaultObjectType()Get the default value of ObjectType from dtd
return "user".trim();
|
public static java.lang.String | getDefaultStoreProtocol()Get the default value of StoreProtocol from dtd
return "imap".trim();
|
public static java.lang.String | getDefaultStoreProtocolClass()Get the default value of StoreProtocolClass from dtd
return "com.sun.mail.imap.IMAPStore".trim();
|
public static java.lang.String | getDefaultTransportProtocol()Get the default value of TransportProtocol from dtd
return "smtp".trim();
|
public static java.lang.String | getDefaultTransportProtocolClass()Get the default value of TransportProtocolClass from dtd
return "com.sun.mail.smtp.SMTPTransport".trim();
|
public java.lang.String | getDescription()Return the Description of the Element mail-resource
return (String) getValue(ServerTags.DESCRIPTION);
|
public ElementProperty | getElementProperty(int index)
return (ElementProperty)this.getValue(ELEMENT_PROPERTY, index);
|
public ElementProperty[] | getElementProperty()
return (ElementProperty[])this.getValues(ELEMENT_PROPERTY);
|
public ElementProperty | getElementPropertyByName(java.lang.String id)
if (null != id) { id = id.trim(); }
ElementProperty[] o = getElementProperty();
if (o == null) return null;
for (int i=0; i < o.length; i++) {
if(o[i].getAttributeValue(Common.convertName(ServerTags.NAME)).equals(id)) {
return o[i];
}
}
return null;
|
public java.lang.String | getFrom()Getter for From of the Element mail-resource
return getAttributeValue(ServerTags.FROM);
|
public java.lang.String | getHost()Getter for Host of the Element mail-resource
return getAttributeValue(ServerTags.HOST);
|
public java.lang.String | getJndiName()Getter for JndiName of the Element mail-resource
return getAttributeValue(ServerTags.JNDI_NAME);
|
public java.lang.String | getObjectType()Getter for ObjectType of the Element mail-resource
return getAttributeValue(ServerTags.OBJECT_TYPE);
|
protected java.lang.String | getRelativeXPath()get the xpath representation for this element
returns something like abc[@name='value'] or abc
depending on the type of the bean
String ret = null;
ret = "mail-resource" + (canHaveSiblings() ? "[@jndi-name='" + getAttributeValue("jndi-name") +"']" : "") ;
return (null != ret ? ret.trim() : null);
|
public java.lang.String | getStoreProtocol()Getter for StoreProtocol of the Element mail-resource
return getAttributeValue(ServerTags.STORE_PROTOCOL);
|
public java.lang.String | getStoreProtocolClass()Getter for StoreProtocolClass of the Element mail-resource
return getAttributeValue(ServerTags.STORE_PROTOCOL_CLASS);
|
public java.lang.String | getTransportProtocol()Getter for TransportProtocol of the Element mail-resource
return getAttributeValue(ServerTags.TRANSPORT_PROTOCOL);
|
public java.lang.String | getTransportProtocolClass()Getter for TransportProtocolClass of the Element mail-resource
return getAttributeValue(ServerTags.TRANSPORT_PROTOCOL_CLASS);
|
public java.lang.String | getUser()Getter for User of the Element mail-resource
return getAttributeValue(ServerTags.USER);
|
void | initialize(int options)
|
public boolean | isDebug()Getter for Debug of the Element mail-resource
return toBoolean(getAttributeValue(ServerTags.DEBUG));
|
public boolean | isEnabled()Getter for Enabled of the Element mail-resource
return toBoolean(getAttributeValue(ServerTags.ENABLED));
|
public ElementProperty | newElementProperty()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new ElementProperty();
|
public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
|
public int | removeElementProperty(ElementProperty value)
return this.removeValue(ELEMENT_PROPERTY, value);
|
public int | removeElementProperty(ElementProperty value, boolean overwrite)
return this.removeValue(ELEMENT_PROPERTY, value, overwrite);
|
public void | setDebug(boolean v, boolean overwrite)Modify the Debug of the Element mail-resource
setAttributeValue(ServerTags.DEBUG, ""+(v==true), overwrite);
|
public void | setDebug(boolean v)Modify the Debug of the Element mail-resource
setAttributeValue(ServerTags.DEBUG, ""+(v==true));
|
public void | setDescription(java.lang.String v)Modify the Description of the Element mail-resource
setValue(ServerTags.DESCRIPTION, (null != v ? v.trim() : null));
|
public void | setElementProperty(ElementProperty[] value)
this.setValue(ELEMENT_PROPERTY, value);
|
public void | setEnabled(boolean v, boolean overwrite)Modify the Enabled of the Element mail-resource
setAttributeValue(ServerTags.ENABLED, ""+(v==true), overwrite);
|
public void | setEnabled(boolean v)Modify the Enabled of the Element mail-resource
setAttributeValue(ServerTags.ENABLED, ""+(v==true));
|
public void | setFrom(java.lang.String v, boolean overwrite)Modify the From of the Element mail-resource
setAttributeValue(ServerTags.FROM, v, overwrite);
|
public void | setFrom(java.lang.String v)Modify the From of the Element mail-resource
setAttributeValue(ServerTags.FROM, v);
|
public void | setHost(java.lang.String v, boolean overwrite)Modify the Host of the Element mail-resource
setAttributeValue(ServerTags.HOST, v, overwrite);
|
public void | setHost(java.lang.String v)Modify the Host of the Element mail-resource
setAttributeValue(ServerTags.HOST, v);
|
public void | setJndiName(java.lang.String v, boolean overwrite)Modify the JndiName of the Element mail-resource
setAttributeValue(ServerTags.JNDI_NAME, v, overwrite);
|
public void | setJndiName(java.lang.String v)Modify the JndiName of the Element mail-resource
setAttributeValue(ServerTags.JNDI_NAME, v);
|
public void | setObjectType(java.lang.String v, boolean overwrite)Modify the ObjectType of the Element mail-resource
setAttributeValue(ServerTags.OBJECT_TYPE, v, overwrite);
|
public void | setObjectType(java.lang.String v)Modify the ObjectType of the Element mail-resource
setAttributeValue(ServerTags.OBJECT_TYPE, v);
|
public void | setStoreProtocol(java.lang.String v, boolean overwrite)Modify the StoreProtocol of the Element mail-resource
setAttributeValue(ServerTags.STORE_PROTOCOL, v, overwrite);
|
public void | setStoreProtocol(java.lang.String v)Modify the StoreProtocol of the Element mail-resource
setAttributeValue(ServerTags.STORE_PROTOCOL, v);
|
public void | setStoreProtocolClass(java.lang.String v, boolean overwrite)Modify the StoreProtocolClass of the Element mail-resource
setAttributeValue(ServerTags.STORE_PROTOCOL_CLASS, v, overwrite);
|
public void | setStoreProtocolClass(java.lang.String v)Modify the StoreProtocolClass of the Element mail-resource
setAttributeValue(ServerTags.STORE_PROTOCOL_CLASS, v);
|
public void | setTransportProtocol(java.lang.String v, boolean overwrite)Modify the TransportProtocol of the Element mail-resource
setAttributeValue(ServerTags.TRANSPORT_PROTOCOL, v, overwrite);
|
public void | setTransportProtocol(java.lang.String v)Modify the TransportProtocol of the Element mail-resource
setAttributeValue(ServerTags.TRANSPORT_PROTOCOL, v);
|
public void | setTransportProtocolClass(java.lang.String v, boolean overwrite)Modify the TransportProtocolClass of the Element mail-resource
setAttributeValue(ServerTags.TRANSPORT_PROTOCOL_CLASS, v, overwrite);
|
public void | setTransportProtocolClass(java.lang.String v)Modify the TransportProtocolClass of the Element mail-resource
setAttributeValue(ServerTags.TRANSPORT_PROTOCOL_CLASS, v);
|
public void | setUser(java.lang.String v, boolean overwrite)Modify the User of the Element mail-resource
setAttributeValue(ServerTags.USER, v, overwrite);
|
public void | setUser(java.lang.String v)Modify the User of the Element mail-resource
setAttributeValue(ServerTags.USER, v);
|
public int | sizeElementProperty()
return this.size(ELEMENT_PROPERTY);
|
public void | validate()
|