FileDocCategorySizeDatePackage
SunEjbJar.javaAPI DocGlassfish v2 API42210Fri May 04 22:34:42 BST 2007com.sun.enterprise.tools.common.dd.ejb

SunEjbJar

public class SunEjbJar extends com.sun.enterprise.tools.common.dd.SunBaseBean
This generated bean class SunEjbJar matches the schema element sun-ejb-jar Generated on Wed Aug 13 10:43:32 PDT 2003 This class matches the root element of the DTD, and is the root of the following bean graph: sun-ejb-jar : SunEjbJar security-role-mapping : SecurityRoleMapping[0,n] role-name : String ( | principal-name : String | group-name : String )[1,n] enterprise-beans : EnterpriseBeans name : String? unique-id : String? ejb : Ejb[0,n] ejb-name : String jndi-name : String? ejb-ref : EjbRef[0,n] ejb-ref-name : String jndi-name : String resource-ref : ResourceRef[0,n] res-ref-name : String jndi-name : String default-resource-principal : DefaultResourcePrincipal? name : String password : String resource-env-ref : ResourceEnvRef[0,n] resource-env-ref-name : String jndi-name : String service-ref : ServiceRef[0,n] service-ref-name : String port-info : PortInfo[0,n] service-endpoint-interface : String? wsdl-port : WsdlPort? namespaceURI : String localpart : String stub-property : StubProperty[0,n] name : String value : String call-property : CallProperty[0,n] name : String value : String call-property : CallProperty[0,n] name : String value : String wsdl-override : String? service-impl-class : String? service-qname : ServiceQname? namespaceURI : String localpart : String pass-by-reference : String? cmp : Cmp? mapping-properties : String? is-one-one-cmp : String? one-one-finders : OneOneFinders? finder : Finder[1,n] method-name : String query-params : String? query-filter : String? query-variables : String? query-ordering : String? principal : Principal? name : String mdb-connection-factory : MdbConnectionFactory? jndi-name : String default-resource-principal : DefaultResourcePrincipal? name : String password : String jms-durable-subscription-name : String? jms-max-messages-load : String? ior-security-config : IorSecurityConfig? transport-config : TransportConfig? integrity : String confidentiality : String establish-trust-in-target : String establish-trust-in-client : String as-context : AsContext? auth-method : String realm : String required : String sas-context : SasContext? caller-propagation : String is-read-only-bean : String? refresh-period-in-seconds : String? commit-option : String? cmt-timeout-in-seconds : String? gen-classes : GenClasses? remote-impl : String? local-impl : String? remote-home-impl : String? local-home-impl : String? bean-pool : BeanPool? steady-pool-size : String? resize-quantity : String? max-pool-size : String? pool-idle-timeout-in-seconds : String? max-wait-time-in-millis : String? bean-cache : BeanCache? max-cache-size : String? resize-quantity : String? is-cache-overflow-allowed : String? cache-idle-timeout-in-seconds : String? removal-timeout-in-seconds : String? victim-selection-policy : String? mdb-resource-adapter : MdbResourceAdapter? resource-adapter-mid : String activation-config : ActivationConfig? description : String? activation-config-property : ActivationConfigProperty[1,n] activation-config-property-name : String activation-config-property-value : String webservice-endpoint : WebserviceEndpoint[0,n] port-component-name : String endpoint-address-uri : String? login-config : LoginConfig? auth-method : String transport-guarantee : String? service-qname : ServiceQname? namespaceURI : String localpart : String tie-class : String? servlet-impl-class : String? session : Session? checkpoint-location : String? quick-checkpoint : String? checkpointed-methods : CheckpointedMethods? description : String? method : Method[1,n] description : String? method-intf : String? method-name : String method-params : MethodParams? method-param : String[0,n] pm-descriptors : PmDescriptors? pm-descriptor : PmDescriptor[1,n] pm-identifier : String pm-version : String pm-config : String? pm-class-generator : String pm-mapping-factory : String? pm-inuse : PmInuse pm-identifier : String pm-version : String cmp-resource : CmpResource? jndi-name : String default-resource-principal : DefaultResourcePrincipal? name : String password : String property : PropertyElement[0,n] name : String value : String create-tables-at-deploy : String? drop-tables-at-undeploy : String? database-vendor-name : String? schema-generator-properties : SchemaGeneratorProperties? property : PropertyElement[0,n] name : String value : String message-destination : MessageDestination[0,n] message-destination-name : String jndi-name : String webservice-description : WebserviceDescription[0,n] webservice-description-name : String wsdl-publish-location : String?

Fields Summary
static Vector
comparators
public static final String
SECURITY_ROLE_MAPPING
public static final String
ENTERPRISE_BEANS
Constructors Summary
public SunEjbJar()

	// NOI18N

	    
		this(null, Common.USE_DEFAULT_VALUES);
	
public SunEjbJar(Node doc, int options)

		this(Common.NO_DEFAULT_VALUES);
		initFromNode(doc, options);
	
public SunEjbJar(int options)

		super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
		initOptions(options);
	
Methods Summary
public static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddSecurityRoleMapping(com.sun.enterprise.tools.common.dd.SecurityRoleMapping value)

		return this.addValue(SECURITY_ROLE_MAPPING, value);
	
public static com.sun.enterprise.tools.common.dd.ejb.SunEjbJarcreateGraph(org.w3c.dom.Node doc)

		return new SunEjbJar(doc, Common.NO_DEFAULT_VALUES);
	
public static com.sun.enterprise.tools.common.dd.ejb.SunEjbJarcreateGraph(java.io.InputStream in)

		return createGraph(in, false);
	
public static com.sun.enterprise.tools.common.dd.ejb.SunEjbJarcreateGraph(java.io.InputStream in, boolean validate)

		Document doc = GraphManager.createXmlDocument(in, validate);
		return createGraph(doc);
	
public static com.sun.enterprise.tools.common.dd.ejb.SunEjbJarcreateGraph()

		try {
			return new SunEjbJar();
		}
		catch (Schema2BeansException e) {
			throw new RuntimeException(e.getMessage());
		}
	
public voiddump(java.lang.StringBuffer str, java.lang.String indent)

		String s;
		Object o;
		org.netbeans.modules.schema2beans.BaseBean n;
		str.append(indent);
		str.append("SecurityRoleMapping["+this.sizeSecurityRoleMapping()+"]");	// NOI18N
		for(int i=0; i<this.sizeSecurityRoleMapping(); i++)
		{
			str.append(indent+"\t");
			str.append("#"+i+":");
			n = (org.netbeans.modules.schema2beans.BaseBean) this.getSecurityRoleMapping(i);
			if (n != null)
				n.dump(str, indent + "\t");	// NOI18N
			else
				str.append(indent+"\tnull");	// NOI18N
			this.dumpAttributes(SECURITY_ROLE_MAPPING, i, str, indent);
		}

		str.append(indent);
		str.append("EnterpriseBeans");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getEnterpriseBeans();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(ENTERPRISE_BEANS, 0, str, indent);

	
public java.lang.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("SunEjbJar\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public EnterpriseBeansgetEnterpriseBeans()

		return (EnterpriseBeans)this.getValue(ENTERPRISE_BEANS);
	
public com.sun.enterprise.tools.common.dd.SecurityRoleMapping[]getSecurityRoleMapping()

		return (SecurityRoleMapping[])this.getValues(SECURITY_ROLE_MAPPING);
	
public com.sun.enterprise.tools.common.dd.SecurityRoleMappinggetSecurityRoleMapping(int index)

		return (SecurityRoleMapping)this.getValue(SECURITY_ROLE_MAPPING, index);
	
protected voidinitFromNode(org.w3c.dom.Node doc, int options)

		if (doc == null)
		{
			doc = GraphManager.createRootElementNode("sun-ejb-jar");	// NOI18N
			if (doc == null)
				throw new Schema2BeansException(Common.getMessage(
					"CantCreateDOMRoot_msg", "sun-ejb-jar"));
		}
		Node n = GraphManager.getElementNode("sun-ejb-jar", doc);	// NOI18N
		if (n == null)
			throw new Schema2BeansException(Common.getMessage(
				"DocRootNotInDOMGraph_msg", "sun-ejb-jar", doc.getFirstChild().getNodeName()));

		this.graphManager.setXmlDocument(doc);

		// Entry point of the createBeans() recursive calls
		this.createBean(n, this.graphManager());
		this.initialize(options);
	
protected voidinitOptions(int options)

		// The graph manager is allocated in the bean root
		this.graphManager = new GraphManager(this);
		this.createRoot("sun-ejb-jar", "SunEjbJar",	// NOI18N
			Common.TYPE_1 | Common.TYPE_BEAN, SunEjbJar.class);

		// Properties (see root bean comments for the bean graph)
		this.createProperty("security-role-mapping", 	// NOI18N
			SECURITY_ROLE_MAPPING, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			SecurityRoleMapping.class);
		this.createProperty("enterprise-beans", 	// NOI18N
			ENTERPRISE_BEANS, 
			Common.TYPE_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			EnterpriseBeans.class);
		this.initialize(options);
	
voidinitialize(int options)


	
private voidreadObject(java.io.ObjectInputStream in)

		try{
			init(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
			String strDocument = in.readUTF();
			// System.out.println("strDocument='"+strDocument+"'");
			ByteArrayInputStream bais = new ByteArrayInputStream(strDocument.getBytes());
			Document doc = GraphManager.createXmlDocument(bais, false);
			initOptions(Common.NO_DEFAULT_VALUES);
			initFromNode(doc, Common.NO_DEFAULT_VALUES);
		}
		catch (Schema2BeansException e) {
			e.printStackTrace();
			throw new RuntimeException(e.getMessage());
		}
	
public static voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public intremoveSecurityRoleMapping(com.sun.enterprise.tools.common.dd.SecurityRoleMapping value)

		return this.removeValue(SECURITY_ROLE_MAPPING, value);
	
public voidsetEnterpriseBeans(EnterpriseBeans value)

		this.setValue(ENTERPRISE_BEANS, value);
	
public voidsetSecurityRoleMapping(int index, com.sun.enterprise.tools.common.dd.SecurityRoleMapping value)

		this.setValue(SECURITY_ROLE_MAPPING, index, value);
	
public voidsetSecurityRoleMapping(com.sun.enterprise.tools.common.dd.SecurityRoleMapping[] value)

		this.setValue(SECURITY_ROLE_MAPPING, value);
	
public intsizeSecurityRoleMapping()

		return this.size(SECURITY_ROLE_MAPPING);
	
public voidvalidate()

		boolean restrictionFailure = false;
		// Validating property securityRoleMapping
		for (int _index = 0; _index < sizeSecurityRoleMapping(); ++_index) {
			SecurityRoleMapping element = getSecurityRoleMapping(_index);
			if (element != null) {
				element.validate();
			}
		}
		// Validating property enterpriseBeans
		if (getEnterpriseBeans() == null) {
			throw new org.netbeans.modules.schema2beans.ValidateException("getEnterpriseBeans() == null", "enterpriseBeans", this);	// NOI18N
		}
		getEnterpriseBeans().validate();
	
private voidwriteObject(java.io.ObjectOutputStream out)

		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		write(baos);
		String str = baos.toString();;
		// System.out.println("str='"+str+"'");
		out.writeUTF(str);