Diff
Added: trunk/openejb3/container/openejb-core/src/main/java/org/openejb/ejbjar/EjbJar.java (2596 => 2597)
--- trunk/openejb3/container/openejb-core/src/main/java/org/openejb/ejbjar/EjbJar.java 2006-04-05 09:33:25 UTC (rev 2596)
+++ trunk/openejb3/container/openejb-core/src/main/java/org/openejb/ejbjar/EjbJar.java 2006-04-09 03:10:50 UTC (rev 2597)
@@ -0,0 +1,345 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.openejb.ejbjar;
+
+import java.util.List;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class EjbJar {
+
+ List<String> description;
+ List<String> displayName;
+ List<Javaee.Icon> icons;
+ List<EnterpriseBean> enterpriseBeans;
+ List<Interceptor> interceptors;
+ List<Relationships> relationships;
+ AssemblyDescriptor assemblyDescriptor;
+ String ejbClientJar;
+ String version;
+ Boolean metadataComplete;
+ String id;
+
+ public static class ActivationConfigProperty {
+ String activationConfigPropertyName;
+ String activationConfigPropertyValue;
+ }
+
+ public static class ActivationConfig {
+ String id;
+ List<String> description;
+ List<ActivationConfigProperty> activationConfigProperties;
+ }
+
+ public static class ApplicationException {
+ String id;
+ String exceptionClass;
+ boolean rollback;
+ }
+
+ public static class AroundInvoke {
+ String className;
+ String methodName;
+ }
+
+ public static class AssemblyDescriptor {
+ String id;
+ List<Javaee.SecurityRole> securityRoles;
+ List<MethodPermission> methodPermissions;
+ List<ContainerTransaction> containerTransactions;
+ List<InterceptorBinding> interceptorBindings;
+ List<Javaee.MessageDestination> messageDestinations;
+ List<ExcludeList> excludeLists;
+ List<ApplicationException> applicationExceptions;
+ }
+
+
+ public static class CmpField {
+ String id;
+ List<String> description;
+ String fieldName;
+ }
+
+ public static class CmrField {
+ String id;
+ List<String> description;
+ String cmrFieldName;
+ String cmrFieldType;
+ }
+
+ public static class ContainerTransaction {
+ String id;
+ List<String> description;
+ String method;
+ String transactionAttribute;
+
+ }
+
+ public static class EjbRelation {
+ String id;
+ List<String> description;
+ String ejbRelationName;
+ //TODO
+ EjbRelationshipRole ejbRelationshipRole;
+ }
+
+ public static class EjbRelationshipRole {
+ String id;
+ String ejbRelationshipRoleName;
+ Multiplicity multiplicity;
+ boolean cascadeDelete;
+
+// String ejbName;
+ RelationshipRoleSource relationshipRoleSource;
+ CmrField cmrField;
+ }
+
+ public static enum Multiplicity {
+ ONE,
+ MANY;
+ }
+
+ public static class EnterpriseBean {
+ String id;
+ List<String> description;
+ List<String> displayName;
+ List<Javaee.Icon> icons;
+ String ejbName;
+ String mappedName;
+ String home;
+ String remote;
+ String localHome;
+ String local;
+ String ejbClass;
+ List<Javaee.EnvEntry> envEntries;
+ List<Javaee.EjbRef> ejbRefs;
+ List<Javaee.EjbLocalRef> ejbLocalRefs;
+ List<WsClient.ServiceRef> serviceRefs;
+ List<Javaee.ResourceEnvRef> resourceEnvRefs;
+ List<Javaee.ResourceRef> resourceRefs;
+ List<Javaee.MessageDestinationRef> messageDestinationRefs;
+ List<Javaee.PersistenceContextRef> persistenceContextRefs;
+ List<Javaee.PersistenceUnitRef> persistenceUnitRefs;
+
+ // For aggregation
+ List<Javaee.JndiEnvironmentRef> jndiEnvironmentRefs;
+
+ List<Javaee.PostConstruct> postConstructs;
+ List<Javaee.PreDestroy> preDestroys;
+
+ List<Javaee.SecurityRoleRef> securityRoleRefs;
+ SecurityIdentity securityIdentity;
+ }
+
+ public static class Entity extends EnterpriseBean {
+ String id;
+ PersistenceType persistenceType;
+ String primaryKeyClass;
+ boolean reenterant;
+ String cmpVersion;
+ String abstractSchemaName;
+ List<CmpField> cmpFields;
+ String primkeyField;
+ Query query;
+ }
+
+ public static enum PersistenceType {
+ BEAN,
+ CONTAINER;
+ }
+
+ public static class ExcludeList {
+ String id;
+ List<String> description;
+ List<Method> methods;
+ }
+
+ public static class InitMethod {
+ String id;
+ NamedMethod createMethod;
+ NamedMethod beanMethod;
+ }
+
+ public static class InterceptorBinding {
+ String id;
+ List<String> description;
+ String ejbName;
+ List<String> interceptorClasses;
+ InterceptorOrder interceptorOrder;
+ boolean excludeDefaultInterceptors;
+ NamedMethod method;
+ }
+
+ public static class InterceptorOrder {
+ String id;
+ List<String> interceptorClasses;
+ }
+
+ public static class Interceptor {
+ String id;
+ List<String> description;
+ String interceptorClass;
+ List<AroundInvoke> aroundInvokes;
+ List<PostActivate> postActivates;
+ List<PrePassivate> prePassivates;
+ List<Javaee.EnvEntry> envEntries;
+ List<Javaee.EjbRef> ejbRefs;
+ List<Javaee.EjbLocalRef> ejbLocalRefs;
+ List<WsClient.ServiceRef> serviceRefs;
+ List<Javaee.ResourceEnvRef> resourceEnvRefs;
+ List<Javaee.ResourceRef> resourceRefs;
+ List<Javaee.MessageDestinationRef> messageDestinationRefs;
+ List<Javaee.PersistenceContextRef> persistenceContextRefs;
+ List<Javaee.PersistenceUnitRef> persistenceUnitRefs;
+
+ // For aggregation
+ List<Javaee.JndiEnvironmentRef> jndiEnvironmentRefs;
+
+ List<Javaee.PostConstruct> postConstructs;
+ List<Javaee.PreDestroy> preDestroys;
+ }
+
+ public static class MessageDrivenBean extends EnterpriseBean {
+ String id;
+ String messagingType;
+ NamedMethod timeoutMethod;
+ String transactionMethod;
+ String messageDestinationType;
+ String messageDestinationLink;
+ ActivationConfig activationConfig;
+ List<AroundInvoke> aroundInvokes;
+ }
+
+ public static class MethodParams {
+ String id;
+ List<String> methodParam;
+ }
+
+ public static class MethodPermission {
+ String id;
+ List<String> description;
+ List<String> roleNames;
+ boolean unchecked;
+ }
+
+ public static class Method {
+ String id;
+ List<String> description;
+ String ejbName;
+ MethodIntfType methodIntf;
+ String methodName;
+ MethodParams methodParams;
+ }
+
+ public static enum MethodIntfType {
+ HOME,
+ REMOTE,
+ LOCALHOME,
+ LOCAL,
+ SERVICEENDPOINT;
+ }
+
+ public static class NamedMethod {
+ String id;
+ String methodName;
+ MethodParams methodParams;
+ }
+
+ public static class QueryMethod {
+ String id;
+ String methodName;
+ MethodParams methodParams;
+ }
+
+ public static class Query {
+ String id;
+ List<String> description;
+ QueryMethod queryMethod;
+ ResultTypeMapping resultTypeMapping;
+ String ejbQl;
+ }
+
+ public static enum ResultTypeMapping {
+ LOCAL,
+ REMOTE;
+ }
+
+ public static class RelationshipRoleSource {
+ String id;
+ List<String> description;
+ String ejbName;
+ }
+
+ public static class Relationships {
+ String id;
+ List<String> description;
+ List<EjbRelation> ejbRelations;
+ }
+
+ public static class RemoveMethod {
+ String id;
+ NamedMethod beanMethod;
+ boolean retainIfException;
+ }
+
+ public static class SecurityIdentity {
+ String id;
+ boolean useCallerIdentity;
+ Javaee.RunAs runAs;
+ }
+
+ public static class Session extends EnterpriseBean {
+ String id;
+ List<String> businessLocal;
+ String serviceEndpoint;
+ SessionType sessionType;
+ NamedMethod timeoutMethod;
+ List<InitMethod> initMethods;
+ List<RemoveMethod> removeMethods;
+ TransactionType transactionType;
+ List<AroundInvoke> aroundInvokes;
+ List<PostActivate> postActivates;
+ List<PrePassivate> prePassivates;
+ }
+
+ public static class PostActivate extends Javaee.LifecycleCallback {
+ }
+
+ public static class PrePassivate extends Javaee.LifecycleCallback {
+ }
+
+ public static enum SessionType {
+ STATEFUL,
+ STATELESS;
+ }
+
+ public static enum TransactionType {
+ BEAN,
+ CONTAINER;
+ }
+
+ public static enum TransactionAttributeType {
+ MANDATORY,
+ REQUIRED,
+ REQUIRES_NEW,
+ SUPPORTS,
+ NOT_SUPPORTED,
+ NEVER;
+ }
+
+}
Added: trunk/openejb3/container/openejb-core/src/main/java/org/openejb/ejbjar/Javaee.java (2596 => 2597)
--- trunk/openejb3/container/openejb-core/src/main/java/org/openejb/ejbjar/Javaee.java 2006-04-05 09:33:25 UTC (rev 2596)
+++ trunk/openejb3/container/openejb-core/src/main/java/org/openejb/ejbjar/Javaee.java 2006-04-09 03:10:50 UTC (rev 2597)
@@ -0,0 +1,190 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.openejb.ejbjar;
+
+import java.util.List;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class Javaee {
+
+ public abstract static class AbstractEjbRef extends JndiEnvironmentRef {
+ String ejbRefName;
+ EjbRefType ejbRefType;
+ String localHome;
+ String local;
+ String ejbLink;
+ }
+
+ public static class EjbLocalRef extends AbstractEjbRef {
+ String localHome;
+ String local;
+ }
+
+ public static class EjbRef extends AbstractEjbRef {
+ String home;
+ String remote;
+ }
+
+ public static class EnvEntry extends JndiEnvironmentRef {
+ String envEntryName;
+ String envEntryType;
+ String envEntryValue;
+
+ }
+ public static class Icon {
+ String id;
+ String smallIcon;
+ String largeIcon;
+
+ }
+ public static class InjectionTarget {
+ String injectionTargetClass;
+ String injectionTargetName;
+ }
+
+ public static enum EjbRefType {
+ ENTITY,
+ SESSION;
+ }
+
+ public static class Listener {
+ String id;
+ List<String> description;
+ List<String> displayName;
+ List<Icon> icons;
+ String listenerClass;
+ }
+
+ public static class JndiEnvironmentRef {
+ String id;
+ List<String> description;
+ String mappedName;
+ List<InjectionTarget> injectionTargets;
+ }
+
+ public static class MessageDestinationRef extends JndiEnvironmentRef {
+ String messageDestinationRefName;
+ String messageDestinationType;
+ MessageDestinationUsage messageDestinationUsage;
+ String messageDestinationLink;
+ }
+
+ public static enum MessageDestinationUsage {
+ CONSUMES,
+ PRODUCES,
+ CONSUMESPRODUCES;
+ }
+
+ public static class MessageDestination {
+ String id;
+ String messageDestinationName;
+ List<String> description;
+ List<String> displayName;
+ List<Icon> icons;
+ String mappedName;
+ }
+
+ // TODO: Not used yet
+ public static class ParamValue {
+ String id;
+ List<String> description;
+ String paramName;
+ String paramType;
+ }
+
+
+ public static class PersistenceContextRef extends JndiEnvironmentRef {
+ String persistenceContextRefName;
+ String persistenceUnitName;
+ PersistenceContextType persistenceContextType;
+ List<PersistenceProperty> persistenceProperties;
+
+ }
+
+ public static class Property {
+ String id;
+ String name;
+ String value;
+ }
+
+ public static class PersistenceProperty extends Property {
+ }
+
+ public static enum PersistenceContextType {
+ TRANSACTION,
+ EXTENDED;
+ }
+
+ public static class PersistenceUnitRef extends JndiEnvironmentRef {
+ String persistenceUnitRefName;
+ String persistenceUnitName;
+ }
+
+ public static enum ResAuth {
+ APPLICATION,
+ CONTAINER;
+ }
+
+ public static enum ResourceSharingScope {
+ SHARABLE,
+ UNSHARABLE;
+ }
+
+ public static class ResourceEnvRef extends JndiEnvironmentRef {
+ String resourceEnvRefName;
+ String resourceEnvRefType;
+ }
+
+ public static class ResourceRef extends JndiEnvironmentRef {
+ String resRefName;
+ String resType;
+ ResAuth resAuth;
+ ResourceSharingScope resourceSharingScope;
+ }
+
+ public static class RunAs {
+ String id;
+ List<String> description;
+ String roleName;
+ }
+
+ public static class PostConstruct extends LifecycleCallback {
+ }
+
+ public static class PreDestroy extends LifecycleCallback {
+ }
+
+ public static class LifecycleCallback {
+ String lifecycleCallbackClass;
+ String lifecycleCallbackMethod;
+ }
+
+ public static class SecurityRole {
+ String id;
+ List<String> description;
+ String roleName;
+ }
+
+ public static class SecurityRoleRef {
+ String id;
+ List<String> description;
+ String roleName;
+ String roleLink;
+ }
+}
Added: trunk/openejb3/container/openejb-core/src/main/java/org/openejb/ejbjar/WsClient.java (2596 => 2597)
--- trunk/openejb3/container/openejb-core/src/main/java/org/openejb/ejbjar/WsClient.java 2006-04-05 09:33:25 UTC (rev 2596)
+++ trunk/openejb3/container/openejb-core/src/main/java/org/openejb/ejbjar/WsClient.java 2006-04-09 03:10:50 UTC (rev 2597)
@@ -0,0 +1,84 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.openejb.ejbjar;
+
+import java.util.List;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class WsClient {
+ public static class PortComponentRef {
+ String id;
+ String serviceEndpointInterface;
+ boolean enableMtom;
+ String portComponentLink;
+ }
+
+ public static class ServiceRef extends Javaee.JndiEnvironmentRef {
+ List<String> displayName;
+ List<Javaee.Icon> icons;
+ String serviceRefName;
+ String serviceInterface;
+ String serviceRefType;
+ String wsdlFile;
+ String jaxrpcMappingFile;
+ String serviceQname;
+ String portComponentRef;
+ List<Handler> handlers;
+ List<HandlerChain> handlerChains;
+ }
+
+ public static class HandlerChain {
+ String id;
+ Target target;
+ List<Handler> handlers;
+ }
+
+ public static class Handler {
+ String id;
+ List<String> description;
+ List<String> displayName;
+ List<Javaee.Icon> icons;
+ String handlerClass;
+ List<InitParam> initParams;
+ List<String> soapHeaders;
+ List<String> soapRoles;
+ List<String> portNames;
+ }
+
+ public static class InitParam extends Javaee.ParamValue {
+ }
+
+ public abstract static class Target {
+ String id;
+ }
+
+ public static class QNamePattern extends Target {
+ String pattern;
+ }
+
+ public static class ServiceNamePattern extends QNamePattern {
+ }
+
+ public static class PortNamePattern extends QNamePattern {
+ }
+
+ public static class ProtocolBindings extends Target {
+ List<String> bindings;
+ }
+}